Ignore:
Timestamp:
Feb 24, 2016, 7:39:00 PM (8 years ago)
Author:
sommeria
Message:

'new'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series/stereo_civ.m

    r924 r927  
    2121%     .Patch2:
    2222% ncfile: name of a netcdf file to be created for the result (extension .nc)
    23 
    24 %=======================================================================
    25 % Copyright 2008-2016, LEGI UMR 5519 / CNRS UGA G-INP, Grenoble, France
    26 %   http://www.legi.grenoble-inp.fr
    27 %   Joel.Sommeria - Joel.Sommeria (A) legi.cnrs.fr
    2823%
    29 %     This file is part of the toolbox UVMAT.
    30 %
     24%AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
     25%  Copyright 2011-2015, LEGI / CNRS UJF G-INP, Joel.Sommeria@legi.grenoble-inp.fr
     26%AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
     27%     This is part of the toolbox UVMAT.
     28%
    3129%     UVMAT is free software; you can redistribute it and/or modify
    32 %     it under the terms of the GNU General Public License as published
    33 %     by the Free Software Foundation; either version 2 of the license,
    34 %     or (at your option) any later version.
    35 %
     30%     it under the terms of the GNU General Public License as published by
     31%     the Free Software Foundation; either version 2 of the License, or
     32%     (at your option) any later version.
     33% 
    3634%     UVMAT is distributed in the hope that it will be useful,
    3735%     but WITHOUT ANY WARRANTY; without even the implied warranty of
    3836%     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    39 %     GNU General Public License (see LICENSE.txt) for more details.
    40 %=======================================================================
     37%     GNU General Public License (open UVMAT/COPYING.txt) for more details.
     38%AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    4139
    4240function [Data,errormsg,result_conv]= stereo_civ(Param)
     
    6765    Data.OutputSubDirMode='auto'; %select the last subDir in the input table as root of the output subdir name (option 'all'/'first'/'last', 'all' by default)
    6866    Data.OutputFileMode='NbInput_i';% one output file expected per value of i index (used for waitbar)
     67    Data.CheckOverwriteVisible='on'; % manage the overwrite of existing files (default=1)
     68
    6969    return
    7070end
     
    168168end
    169169if isempty(i1_series_Civ1)||(~isempty(PairCiv2) && isempty(i1_series_Civ2))
    170     disp_uvmat('ERROR','no image pair fo civ in the input file index range',checkrun)
     170    disp_uvmat('ERROR','no image pair for civ in the input file index range',checkrun)
    171171    return
    172172end
     
    265265tic
    266266%%%%% MAIN LOOP %%%%%%
     267CheckOverwrite=1;%default
     268if isfield(Param,'CheckOverwrite')
     269    CheckOverwrite=Param.CheckOverwrite;
     270end
     271
    267272for ifield=1:NbField
    268273    update_waitbar(WaitbarHandle,ifield/NbField)
     
    282287        ncfile2=fullfile_uvmat(RootPath_A,Civ1Dir,[RootFile_A,'_Light'],'.nc',NomTypeNc,i2_series_Civ1(ifield),[],...
    283288            j1_series_Civ1(ifield),j2_series_Civ1(ifield));
     289       
     290     if (~CheckOverwrite && exist(ncfile,'file')) || (~CheckOverwrite && exist(ncfile2,'file'))
     291            disp('existing output file already exists, skip to next field')
     292            result_conv=0;
     293            continue% skip iteration if the mode overwrite is desactivated and the result file already exists
     294     end   
     295   
    284296       
    285297    %% Civ1
     
    845857       
    846858    end
    847    end
    848 
    849   disp(['ellapsed time for the loop ' num2str(toc) ' s'])
     859end
     860disp(['ellapsed time for the loop ' num2str(toc) ' s'])
     861tic
     862while toc < rand(1)*10
     863    for i = 1:100000, sqrt(1237); end
     864end
    850865
    851866
     
    10991114[npy,npx]=size(result_conv);
    11001115result_conv(result_conv<1)=1; %set to 1 correlation values smaller than 1 (to avoid divergence in the log)
    1101 %the following 8 lines are copyright (c) 1998, Uri Shavit, Roi Gurka, Alex Liberzon, Technion ï¿œ Israel Institute of Technology
     1116%the following 8 lines are copyright (c) 1998, Uri Shavit, Roi Gurka, Alex Liberzon, Technion ??? Israel Institute of Technology
    11021117%http://urapiv.wordpress.com
    11031118peaky = y;
     
    11361151        for j=-1:1
    11371152            %following 15 lines based on
    1138             %H. Nobach ï¿œ M. Honkanen (2005)
     1153            %H. Nobach ??? M. Honkanen (2005)
    11391154            %Two-dimensional Gaussian regression for sub-pixel displacement
    11401155            %estimation in particle image velocimetry or particle position
    11411156            %estimation in particle tracking velocimetry
    1142             %Experiments in Fluids (2005) 38: 511ï¿œ515
     1157            %Experiments in Fluids (2005) 38: 511???515
    11431158            c10(j+2,i+2)=i*log(result_conv(y+j, x+i));
    11441159            c01(j+2,i+2)=j*log(result_conv(y+j, x+i));
Note: See TracChangeset for help on using the changeset viewer.