Changeset 999 for trunk/src


Ignore:
Timestamp:
Feb 17, 2017, 12:17:59 PM (7 years ago)
Author:
g7moreau
Message:
  • Remove tab and end of line space
Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ_3D.m

    r977 r999  
    1 %'civ_3D': function associated with the interface 'civ_3D.fig' for PIV in volume   
     1%'civ_3D': function associated with the interface 'civ_3D.fig' for PIV in volume
    22%------------------------------------------------------------------------
    33%  provides an interface for the software CIVx
     
    5555% varargin   command line arguments to civ_3D (see VARARGIN)
    5656global test_batch patch_new_exe%=1 if patch processing available
    57 %filebase: root name 
     57%filebase: root name
    5858%nom_type: nomencalture used ('png_old','_i_j'...)
    5959%list of field numbers to process
    60 %subdir: subdirectory of the opened netcdf file 
     60%subdir: subdirectory of the opened netcdf file
    6161%ind_opening: operation number advised for beginning (1=civ1,2=fix1,3=patch1,4=civ2,5=fix2,6=patch2),
    6262%ind_a_opening ind_b_opening chosen pair from the opened netcdf file
     
    7070nom_type=[]; % nomenclature type
    7171ext=[];
    72 testall=0; 
     72testall=0;
    7373browse=[];
    7474
    75 %load the initial parameters if the interface is started from uvmat 
     75%load the initial parameters if the interface is started from uvmat
    7676if ~isempty(varargin)% the interface is opened from uvmat
    7777    varcell=varargin{1};
     
    9595    ind_opening=1; % proposed operation number (1=civ1,2=fix1,3=patch1,4=civ2,5=fix2,6=patch2)
    9696    ind_a_opening=1; % proposed index in the menu of fields a
    97     ind_b_opening=2; % proposed index in the menu of fields b   
     97    ind_b_opening=2; % proposed index in the menu of fields b
    9898end
    9999
    100100if exist('ext','var') & length(ext)>1 & (~isempty(imformats(ext([2:end])))|...
    101101                       isequal(ext,'.avi')|isequal(ext,'.AVI'));%if an image file has been opened by uvmat
    102         browse.ext_ima=ext; 
     102        browse.ext_ima=ext;
    103103        if exist('nom_type_read','var')
    104104            browse.nom_type_ima=nom_type_read; % the image nomenclature is stored
     
    116116
    117117% set(handles.ImaDoc,'String',ext)
    118  
     118
    119119%read names of the .exe file to adjust the interface according to
    120120%available prog
     
    139139    end
    140140end
    141    
     141
    142142patch_new_exe='';
    143143todo_patch='';
     
    152152if isfield(sparam,'SGE')
    153153    sge=str2num(sparam.SGE);
    154 end   
     154end
    155155name_todo=fullfile(todo_path,'TODO.txt')
    156156test_batch=1;
     
    160160    test_batch=0;
    161161end
    162 if exist(name_todo,'file')~=2 
     162if exist(name_todo,'file')~=2
    163163    msgbox_uvmat('ERROR',['no batch distributed processing available, queue file ' name_todo ' absent']);
    164164  %  test_batch=0;  % Problems to detect file on linux/nfs filesystems
     
    233233else
    234234    num_ref_j=floor((num_a+num_b)/2);
    235     browse.incr_pair(2)=num_b-num_a; 
     235    browse.incr_pair(2)=num_b-num_a;
    236236end
    237237set(handles.first_i,'String',num2str(num_ref_i));
     
    240240set(handles.browse_root,'UserData',browse);
    241241if ~isempty(varargin)% the interface is opened from uvmat
    242     displ_filebase_Callback(hObject, eventdata, handles); 
     242    displ_filebase_Callback(hObject, eventdata, handles);
    243243end
    244244
     
    275275         end
    276276         if isfield(h,'RootPath')&ischar(h.RootPath)
    277 %                 oldfile=h.filebase{1} 
     277%                 oldfile=h.filebase{1}
    278278                 oldfile=h.RootPath;
    279279         end
     
    291291
    292292[FileName, PathName, filtindex] = uigetfile( menu, 'Pick a file',oldfile);
    293 fileinput=[PathName FileName];%complete file name 
     293fileinput=[PathName FileName];%complete file name
    294294sizf=size(fileinput);
    295295if (~ischar(fileinput)|~isequal(sizf(1),1)),return;end %stop if fileinput not a character string
     
    327327if length(ext)>1 & (~isempty(imformats(ext([2:end])))||...
    328328                       isequal(lower(ext),'.avi')||isequal(ext,'.vol'));%if an image file has been opened by uvmat
    329     browse.ext_ima=ext; 
     329    browse.ext_ima=ext;
    330330    browse.nom_type_ima=nom_type;
    331331    browse.field_count=str2num(field_count);
     
    335335if isequal(ext,'.nc')
    336336    browse.nom_type_nc=nom_type;
    337     ind_opening=2;% propose 'fix' as the default option   
     337    ind_opening=2;% propose 'fix' as the default option
    338338    Data=nc2struct(fileinput,[]);
    339339    if isfield(Data,'fix') & isequal(Data.fix,1)
     
    379379    set(handles.first_i,'String',num2str(ref_i));
    380380    set(handles.last_i,'String',num2str(ref_i));
    381     set(handles.ref_i,'String',num2str(ref_i)); 
     381    set(handles.ref_i,'String',num2str(ref_i));
    382382end
    383383if isequal(ind_opening,1)
     
    427427field_count=1;%default
    428428nom_type_nc=[];
    429 npx=[];%default 
     429npx=[];%default
    430430npy=[];
    431431TimeUnit='s'; %default
     
    437437ext=get(handles.ImaDoc,'String');
    438438browse=get(handles.browse_root,'UserData');%default
    439 if ~isempty(browse) 
     439if ~isempty(browse)
    440440    if isfield(browse,'ext_ima')
    441441        ext_ima=browse.ext_ima;
     
    468468if isfield(browse,'pxcmx') & isfield(browse,'pxcmy')
    469469    pxcmx=num2str(browse.pxcmx);
    470     pxcmy=num2str(browse.pxcmy); 
     470    pxcmy=num2str(browse.pxcmy);
    471471else
    472472    pxcmx=1;%default
    473     pxcmy=1; 
     473    pxcmy=1;
    474474end
    475475 %look for an image documentation file
     
    481481         ext='.civ_3D';
    482482         set(handles.ImaDoc,'String','.civ_3D')
    483     elseif exist([filebase '.avi'],'file') 
     483    elseif exist([filebase '.avi'],'file')
    484484         ext='.avi';
    485485         set(handles.ImaDoc,'String','.avi')
     
    511511        if isfield(XmlData,'GeometryCalib')
    512512            tsai=XmlData.GeometryCalib;
    513             if isfield(tsai,'f') & isfield(tsai,'Tz') & isfield(tsai,'dpx') & isfield(tsai,'dpy')& isfield(tsai,'R') 
     513            if isfield(tsai,'f') & isfield(tsai,'Tz') & isfield(tsai,'dpx') & isfield(tsai,'dpy')& isfield(tsai,'R')
    514514                 rot2D=tsai.R([1:2],[1,2]);
    515515                 pxcmx_search=tsai.f * sqrt(det(rot2D))/(tsai.Tz*tsai.dpx);
    516                  pxcmy_search=tsai.f * sqrt(det(rot2D))/(tsai.Tz*tsai.dpy);           
     516                 pxcmy_search=tsai.f * sqrt(det(rot2D))/(tsai.Tz*tsai.dpy);
    517517            end
    518             if isfield(tsai,'CoordUnit') 
     518            if isfield(tsai,'CoordUnit')
    519519                 CoordUnit=tsai.CoordUnit;
    520520            end
    521         end               
     521        end
    522522        if isempty(ext_ima_read)
    523523              ext_ima='.png';%default
     
    531531                nom_type_ima=nom_type_read;
    532532        end
    533        
    534 elseif isequal(ext,'.avi')|isequal(ext,'.AVI') 
     533
     534elseif isequal(ext,'.avi')|isequal(ext,'.AVI')
    535535        nom_type_ima='avi';
    536536        ext_ima=ext;
     
    542542            nbfield=info.NumFrames;%number of frames
    543543        end
    544         time=(dt*[0:nbfield-1])';%list of image times   
     544        time=(dt*[0:nbfield-1])';%list of image times
    545545        set(handles.dt,'String',num2str(dt*1000));%store the time interval between successive images
    546        
    547      % no image documentation file found: look for a series of existing images or .nc files 
    548 elseif ~isequal(ext,'.nc') 
     546
     547     % no image documentation file found: look for a series of existing images or .nc files
     548elseif ~isequal(ext,'.nc')
    549549        subdir=get(handles.subdir_civ1,'String');
    550550        incr_pair=[0 0];%default
     
    572572        field_i=field_count;%look for the minimum file number in the series
    573573        idetect=1;
    574         while idetect==1 
     574        while idetect==1
    575575                    field_i=field_i-1;
    576576                    imagename=name_generator(filebase,field_i,1,ext_ima,nom_type_ima);
     
    592592end
    593593if isequal(nom_type_ima,'none')% no file numbering used
    594   first_i=1; 
     594  first_i=1;
    595595  last_i=1;
    596596   first_j=1;
     
    653653    end
    654654end
    655 mode_Callback(hObject, eventdata, handles) 
     655mode_Callback(hObject, eventdata, handles)
    656656
    657657%%%%%% initialize waitbars and RUN button
     
    666666    set(handles.BATCH,'BackgroundColor',[1 0 0])
    667667end
    668    
     668
    669669%%%%% store the root input filename for future opening
    670670dir_perso=prefdir;
     
    678678    relnumb=str2num(Release(3:4));
    679679    if relnumb >= 14
    680         save (profil_perso,'RootPath','-V6'); %store the root name for future opening of uvmat 
     680        save (profil_perso,'RootPath','-V6'); %store the root name for future opening of uvmat
    681681    else
    682682        save (profil_perso,'RootPath'); %store the root name for future opening of uvmat
     
    742742         displ_num(3,index)=0;
    743743         displ_num(4,index)=0;
    744      end       
     744     end
    745745     set(handles.jtext,'Visible','On')
    746746     set(handles.first_j,'Visible','On')
     
    764764        set(handles.ref_i,'Visible','Off')
    765765    end
    766 elseif isequal(mode,'series(Di)') | isequal(mode,'st_series(Di)') 
     766elseif isequal(mode,'series(Di)') | isequal(mode,'st_series(Di)')
    767767     for index=1:min(nbfield-1,200)
    768768         displ_num(1,index)=0;
     
    778778     set(handles.ref_i,'Visible','On')
    779779elseif isequal(mode,'displacement')%the pairs have the same indices
    780      displ_num(1,1)=0; 
     780     displ_num(1,1)=0;
    781781     displ_num(2,1)=0;
    782782     displ_num(3,1)=0;
     
    812812        set(handles.ref_j,'Visible','Off')
    813813    end
    814 end 
     814end
    815815set(handles.list_pair_civ1,'UserData',displ_num);
    816816find_netcpair_civ1(hObject, eventdata, handles)
     
    855855    else
    856856        nom_type_nc='_i_j1-j2';
    857     end   
     857    end
    858858end
    859859browse.nom_type_nc=nom_type_nc;
     
    874874if isempty(time)
    875875    time=[0 1];
    876 end 
     876end
    877877displ_num=get(handles.list_pair_civ1,'UserData');
    878878
    879 %eliminate the first pairs inconsistent with the position 
     879%eliminate the first pairs inconsistent with the position
    880880if isempty(displ_num)
    881881    nbpair=0;
     
    890890nbpair=min(200,nbpair);%limit the number of displayed pairs to 200
    891891
    892 %look for existing processed pairs involving the field at the middle of the series if civ1 will not 
     892%look for existing processed pairs involving the field at the middle of the series if civ1 will not
    893893% be performed, while the result is needed for next steps.
    894894displ_pair={''};
     
    897897if get(handles.CIV1,'Value')==0 %
    898898    dirname=fullfile(filepath,subdir_civ1,ext_dir);
    899     if ~exist(fullfile(filepath,subdir_civ1,ext_dir),'dir') 
     899    if ~exist(fullfile(filepath,subdir_civ1,ext_dir),'dir')
    900900         msgbox_uvmat('ERROR',['no civ1 file available: subdirectory ' subdir_civ1 ' does not exist']);
    901901         set(handles.list_pair_civ1,'String',{});
    902902         return
    903903    end
    904     for ipair=1:nbpair   
     904    for ipair=1:nbpair
    905905        filename=name_generator(filebase,ref_i+displ_num(3,ipair),ref_j+displ_num(1,ipair),'.nc',nom_type_nc,1,...
    906906        ref_i+displ_num(4,ipair),ref_j+displ_num(2,ipair),subdir_civ1);
     
    908908    end
    909909    if ~exist('select','var') | isequal(select,zeros(size(1:nbpair)))
    910         if isfield(browse,'incr_pair') 
     910        if isfield(browse,'incr_pair')
    911911            num_i1=ref_i-floor(browse.incr_pair(1)/2);
    912912            num_i2=ref_i+ceil(browse.incr_pair(1)/2);
     
    917917            testpair=1;
    918918        else
    919             if  isequal(mode,'series(Dj)') | isequal(mode,'st_series(Dj)') 
     919            if  isequal(mode,'series(Dj)') | isequal(mode,'st_series(Dj)')
    920920                msgbox_uvmat('ERROR',['no civ1 file available for the selected reference index j=' num2str(ref_j) ' and subdirectory ' subdir_civ1]);
    921921            else
     
    928928    end
    929929end
    930 if isequal(mode,'series(Di)') 
     930if isequal(mode,'series(Di)')
    931931    if testpair
    932               displ_pair{1}=['Di= ' num2str(-floor(browse.incr_pair(1)/2)) '|' num2str(ceil(browse.incr_pair(1)/2))];       
    933     else 
     932              displ_pair{1}=['Di= ' num2str(-floor(browse.incr_pair(1)/2)) '|' num2str(ceil(browse.incr_pair(1)/2))];
     933    else
    934934       for ipair=1:nbpair
    935           if select(ipair)         
     935          if select(ipair)
    936936              dt=time(ref_i+displ_num(4,ipair),1)-time(ref_i+displ_num(3,ipair),1);%time interval dt
    937937              displ_pair{ipair}=['Di= ' num2str(-floor(ipair/2)) '|' num2str(ceil(ipair/2)) ' :dt= ' num2str(dt*1000)];
    938           else 
     938          else
    939939             displ_pair{ipair}='...'; %pair not displayed in the menu
    940940          end
     
    947947           displ_pair{ipair}=['j= ' num2stra(displ_num(1,ipair),nom_type_ima) '-' num2stra(displ_num(2,ipair),nom_type_ima) ...
    948948                        ' :dt= ' num2str(dt*1000)];
    949        else 
     949       else
    950950          displ_pair{ipair}='...'; %pair not displayed in the menu
    951         end   
     951        end
    952952   end
    953953elseif isequal(mode,'displacement')
    954     displ_pair={'Di=Dj=0'}; 
    955 end   
     954    displ_pair={'Di=Dj=0'};
     955end
    956956set(handles.list_pair_civ1,'String',displ_pair');
    957957ichoice=min(find(select));
     
    968968set(gcf,'Pointer','arrow')
    969969%--------------------------------------------------------------
    970 % determine the menu for civ2 pairs depending on the existing netcdf file at the 
    971 %middle of the series set by first_i, incr, last_i 
     970% determine the menu for civ2 pairs depending on the existing netcdf file at the
     971%middle of the series set by first_i, incr, last_i
    972972%--------------------------------------------------------------
    973973function find_netcpair_civ2(hObject, eventdata, handles)
     
    10021002    else
    10031003        nom_type_nc='_i_j1-j2';
    1004     end   
     1004    end
    10051005end
    10061006browse.nom_type_nc=nom_type_nc;
     
    10321032
    10331033
    1034 %eliminate the first pairs inconsistent with the position 
     1034%eliminate the first pairs inconsistent with the position
    10351035if isempty(displ_num)
    10361036    nbpair=0;
    10371037else
    10381038    nbpair=length(displ_num(1,:));%nbre of displayed pairs
    1039     if  isequal(mode,'series(Di)') | isequal(mode,'st_series(Di)') 
     1039    if  isequal(mode,'series(Di)') | isequal(mode,'st_series(Di)')
    10401040        nbpair=min(2*ref_i-1,nbpair);%limit the number of pairs with positive first index
    1041     elseif  isequal(mode,'series(Dj)') | isequal(mode,'st_series(Dj)') 
     1041    elseif  isequal(mode,'series(Dj)') | isequal(mode,'st_series(Dj)')
    10421042        nbpair=min(2*ref_j-1,nbpair);%limit the number of pairs with positive first index
    10431043    end
     
    10451045nbpair=min(200,nbpair);%limit the number of displayed pairs to 200
    10461046
    1047 %look for existing processed pairs involving the field at the middle of the series if civ1 will not 
     1047%look for existing processed pairs involving the field at the middle of the series if civ1 will not
    10481048% be performed, while the result is needed for next steps.
    10491049displ_pair={''}; %default
    10501050select=ones(size(1:nbpair));%default =1 for nubers of displayed pairs
    10511051if get(handles.CIV2,'Value')==0 & get(handles.CIV1,'Value')==0 & get(handles.FIX1,'Value')==0 & get(handles.PATCH1,'Value')==0%&...
    1052     if ~exist(fullfile(filepath,subdir_civ2,ext_dir),'dir') 
     1052    if ~exist(fullfile(filepath,subdir_civ2,ext_dir),'dir')
    10531053         errordlg(['no civ2 file available: subdirectory ' subdir_civ2 ' does not exist'])
    10541054         set(handles.list_pair_civ2,'String',{});
    10551055         return
    10561056    end
    1057     for ipair=1:nbpair       
     1057    for ipair=1:nbpair
    10581058        [filename]=name_generator(filebase,ref_i+displ_num(3,ipair),ref_j+displ_num(1,ipair),'.nc',nom_type_nc,1,...
    10591059        ref_i+displ_num(4,ipair),ref_j+displ_num(2,ipair),subdir_civ1);
     
    10611061    end
    10621062    if  isequal(select,zeros(size(1:nbpair)))
    1063         if isfield(browse,'incr_pair') 
     1063        if isfield(browse,'incr_pair')
    10641064            num_i1=ref_i-floor(browse.incr_pair(1)/2);
    10651065            num_i2=ref_i+floor((browse.incr_pair(1)+1)/2);
     
    10691069            select(1)=exist(filename,'file');
    10701070        else
    1071             if  isequal(mode,'series(Dj)') | isequal(mode,'st_series(Dj)') 
     1071            if  isequal(mode,'series(Dj)') | isequal(mode,'st_series(Dj)')
    10721072                msgbox_uvmat('ERROR',['no civ2 file available for the selected reference index j=' num2str(ref_j) ' and subdirectory ' subdir_civ2])
    10731073            else
     
    10791079    end
    10801080end
    1081 if isequal(mode,'series(Di)')  | isequal(mode,'st_series(Di)') 
     1081if isequal(mode,'series(Di)')  | isequal(mode,'st_series(Di)')
    10821082    if  ~isequal(get(handles.ext_txt,'String'),'dt(ms)=')
    10831083       for ipair=1:nbpair
     
    10851085              dt=time(ref_i+displ_num(4,ipair),ref_j+displ_num(2,ipair))-time(ref_i+displ_num(3,ipair),ref_j+displ_num(1,ipair));%time interval dt
    10861086              displ_pair{ipair}=['Di= ' num2str(-floor(ipair/2)) '|' num2str(ceil(ipair/2)) ' :dt= ' num2str(dt*1000)];
    1087           else 
     1087          else
    10881088             displ_pair{ipair}='...'; %pair not displayed in the menu
    10891089          end
     
    10931093         if select(ipair)
    10941094            displ_pair{ipair}=['Di= ' num2str(-floor(ipair/2)) '|' num2str(ceil(ipair/2)) ' :dt= ' num2str(dt_unit*ipair)];
    1095          else 
     1095         else
    10961096            displ_pair{ipair}='...'; %pair not displayed in the menu
    10971097         end
     
    11031103              dt=time(ref_i+displ_num(4,ipair),ref_j+displ_num(2,ipair))-time(ref_i+displ_num(3,ipair),ref_j+displ_num(1,ipair));%time interval dt
    11041104              displ_pair{ipair}=['Dj= ' num2str(-floor(ipair/2)) '|' num2str(ceil(ipair/2)) ' :dt= ' num2str(dt*1000)];
    1105           else 
     1105          else
    11061106             displ_pair{ipair}='...'; %pair not displayed in the menu
    11071107          end
     
    11131113           displ_pair{ipair}=['j= ' num2stra(displ_num(1,ipair),nom_type_ima) '-' num2stra(displ_num(2,ipair),nom_type_ima) ...
    11141114                        ' :dt= ' num2str(dt*1000)];
    1115        else 
     1115       else
    11161116          displ_pair{ipair}='...'; %pair not displayed in the menu
    1117        end   
     1117       end
    11181118   end
    11191119elseif isequal(mode,'displacement')
    1120     displ_pair={'Di=Dj=0'}; 
    1121 end   
     1120    displ_pair={'Di=Dj=0'};
     1121end
    11221122set(handles.list_pair_civ2,'String',displ_pair');
    11231123ichoice=min(find(select));
     
    11281128set(gcf,'Pointer','arrow')
    11291129%----------------------------------------------------
    1130 %  determine the list of index pairs of processing file 
     1130%  determine the list of index pairs of processing file
    11311131%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    11321132function [num1_civ1,num2_civ1,num_a_civ1,num_b_civ1,num1_civ2,num2_civ2,num_a_civ2,num_b_civ2]=...
     
    11501150    set(handles.RUN, 'Enable','On'), set(handles.RUN,'BackgroundColor',[1 0 0]),return,end;
    11511151num1=[first_i:incr:last_i];
    1152 if isequal (mode,'series(Di)') 
     1152if isequal (mode,'series(Di)')
    11531153     %recognize the pair civ1 from the display
    1154         indsel=find((double(str_civ1)<48)|(double(str_civ1)>57));% character indices of non numerical characters
     1154    indsel=find((double(str_civ1)<48)|(double(str_civ1)>57));% character indices of non numerical characters
    11551155    str_raw=str_civ1(indsel);
    11561156    indsepar=find(str_raw=='|'); %character index of the separator
     
    11601160    else
    11611161        d2=str2num(str_civ1([indsel(indsepar)+1:indsel(indsepar+1)-1]));
    1162     end   
     1162    end
    11631163    %recognize the pair civ2 from the display
    11641164    num1_civ1=num1-d1;% set of first image numbers
     
    12511251set(handles.list_pair_civ2,'Value',index_pair);
    12521252
    1253 %update first_i and last_i according to the chosen image pairs 
     1253%update first_i and last_i according to the chosen image pairs
    12541254mode_list=get(handles.mode,'String');
    12551255mode_value=get(handles.mode,'Value');
     
    12811281    set(handles.first_j,'String',num2str(num1(1)));
    12821282    set(handles.last_j,'String',num2str(num1(end)));
    1283 end 
     1283end
    12841284
    12851285%------------------------------------------------------------------
     
    12871287function list_pair_civ2_Callback(hObject, eventdata, handles)
    12881288
    1289 index_pair=get(handles.list_pair_civ2,'Value');%get the selected position index in the menu 
    1290 
    1291 %update first_i and last_i according to the chosen image pairs 
     1289index_pair=get(handles.list_pair_civ2,'Value');%get the selected position index in the menu
     1290
     1291%update first_i and last_i according to the chosen image pairs
    12921292mode_list=get(handles.mode,'String');
    12931293mode_value=get(handles.mode,'Value');
     
    13191319    set(handles.first_j,'String',num2str(num1(1)));
    13201320    set(handles.last_j,'String',num2str(num1(end)));
    1321 end 
     1321end
    13221322
    13231323
     
    13921392    return
    13931393end
    1394  
     1394
    13951395%choice of batch priority
    13961396ind_answer=2;
     
    14041404                'SelectionMode','single',...
    14051405                'ListString',str,'ListSize',[200 200],'Name','job priority','InitialValue',3);
    1406         if isequal(v,0) % to handle Cancel button and figure close, 
     1406        if isequal(v,0) % to handle Cancel button and figure close,
    14071407           return % a better way should be create
    14081408        end
     
    14261426    cur_dir=pwd;
    14271427    if ~isequal(cur_dir(2:3),':\')
    1428         cd(matlabroot); %move to the Matlab root directory if the current Matlab dir does not allow the dos command or is M: 
     1428        cd(matlabroot); %move to the Matlab root directory if the current Matlab dir does not allow the dos command or is M:
    14291429    end
    14301430    [ss,ww]=dos(['net use ' filebase(1:2)]);
     
    14571457
    14581458[num1_civ1,num2_civ1,num_a_civ1,num_b_civ1,num1_civ2,num2_civ2,num_a_civ2,num_b_civ2]=...
    1459 find_pair_indices(handles,mode); %determine the pairs of processing file 
     1459find_pair_indices(handles,mode); %determine the pairs of processing file
    14601460
    14611461%check dir
     
    14911491nbfield=length(num1_civ1);
    14921492nbslice=length(num_a_civ1);
    1493    
     1493
    14941494%check the existence of the netcdf and image files involved
    14951495% if box_test(1)==1;%CIV1 activated
    1496 detect=1; 
     1496detect=1;
    14971497while detect==1 %name a new subdir if one of the netcdf files already exists
    14981498      for ifile=1:nbfield
     
    15291529            cd(currentdir)
    15301530            return
    1531      end     
     1531     end
    15321532     if ~exist(filecell_ima2_civ1{ifile},'file')
    15331533            msgbox_uvmat('ERROR',[filecell_ima2_civ1{ifile} ' not found'])
     
    15391539end
    15401540
    1541 cd(currentdir);%come back to the initial working directory 
     1541cd(currentdir);%come back to the initial working directory
    15421542% if ~isequal(m2,'')
    15431543%      msgbox(m2);%error message for directory creation
     
    15491549
    15501550for ifile=1:nbfield
    1551     i_cmd=0; 
     1551    i_cmd=0;
    15521552       cmd='#!/bin/bash';
    15531553       cmd=char({cmd;'#$ -cwd'});
     
    15561556    filename_cmx([end-1:end])='cm';%name of cmx file
    15571557    filename_cmx=[filename_cmx 'x'];
    1558    
     1558
    15591559%CIV1
    15601560    if box_test(1)==1
     
    15751575        civAllxml=set(civAllxml,1,'name','civ3d3c');
    15761576    %    save(civAllxml)
    1577         par_civ1_3d_xml=fullfile(par_civ1.path,[resu_file '.xml']);%[par_civ1.path '/test_to_change.xml'];
    1578          pvalue=num2str((1-ind_answer)*500)
    1579         save(civAllxml,par_civ1_3d_xml);
     1577        par_civ1_3d_xml=fullfile(par_civ1.path,[resu_file '.xml']);%[par_civ1.path '/test_to_change.xml'];
     1578     pvalue=num2str((1-ind_answer)*500)
     1579        save(civAllxml,par_civ1_3d_xml);
    15801580     nb_processor='8';
    1581         ['echo /CIVX/bin/MPI/lam-7.1.3_g95/bin/mpirun C  ' Civ3D3CBin ' -p ' par_civ1_3d_xml '|qsub -p ' pvalue ' -q lam.q -pe lam_loose ' nb_processor ' -e ' par_civ1_3d_xml '.errors -o ' par_civ1_3d_xml '.log' ]
    1582         eval ( ['!echo /CIVX/bin/MPI/lam-7.1.3_g95/bin/mpirun C  ' Civ3D3CBin ' -p ' par_civ1_3d_xml '|qsub -p ' pvalue ' -q lam.q -pe lam_loose ' nb_processor ' -e ' par_civ1_3d_xml '.errors -o ' par_civ1_3d_xml '.log' ])
    1583 
    1584     end           
     1581    ['echo /CIVX/bin/MPI/lam-7.1.3_g95/bin/mpirun C  ' Civ3D3CBin ' -p ' par_civ1_3d_xml '|qsub -p ' pvalue ' -q lam.q -pe lam_loose ' nb_processor ' -e ' par_civ1_3d_xml '.errors -o ' par_civ1_3d_xml '.log' ]
     1582    eval ( ['!echo /CIVX/bin/MPI/lam-7.1.3_g95/bin/mpirun C  ' Civ3D3CBin ' -p ' par_civ1_3d_xml '|qsub -p ' pvalue ' -q lam.q -pe lam_loose ' nb_processor ' -e ' par_civ1_3d_xml '.errors -o ' par_civ1_3d_xml '.log' ])
     1583
     1584    end
    15851585end
    15861586
     
    15911591[Path,Name]=fileparts(filebase);
    15921592namefig=fullfile(Path,subdir_civ2,Name);
    1593 detect=1; 
     1593detect=1;
    15941594while detect==1
    15951595    namefigfull=[namefig '.fig'];
     
    16191619        end
    16201620
    1621  
     1621
    16221622%----------------------------------------------------
    16231623function first_j_Callback(hObject, eventdata, handles)
     
    17141714    num_a=1;
    17151715    num_b=1;
    1716 elseif isequal (mode, 'series(Dj)') 
     1716elseif isequal (mode, 'series(Dj)')
    17171717    num1=1;
    17181718    num2=1;
     
    17521752subdir=get(handles.subdir_civ1,'String');
    17531753set(handles.subdir_civ2,'String',subdir);
    1754 if get(handles.CIV1,'Value')==0 
     1754if get(handles.CIV1,'Value')==0
    17551755    find_netcpair_civ1(hObject, eventdata, handles); %update the list of available pairs from netcdf files in the new directory
    17561756end
     
    18281828    set(handles.get_mask_civ2,'Value',1)
    18291829    set(handles.get_mask_fix2,'Value',1)
    1830 end 
     1830end
    18311831set(handles.mask_fix1,'String',mask_displ)
    18321832set(handles.mask_civ2,'String',mask_displ)
     
    18581858else
    18591859    set(handles.get_mask_fix2,'Value',1)
    1860 end 
     1860end
    18611861set(handles.mask_civ2,'String',mask_displ)
    18621862set(handles.mask_fix2,'String',mask_displ)
     
    18841884if isequal(mask_displ,'no mask')
    18851885    set(handles.get_mask_fix2,'Value',0)
    1886 end 
     1886end
    18871887set(handles.mask_fix2,'String',mask_displ)
    18881888end
     
    18901890%---------------------------------------
    18911891function [nbslice, flag_mask]=get_mask(filebase,handles)
    1892 %detect mask files, images with appropriate file base 
     1892%detect mask files, images with appropriate file base
    18931893%[filebase '_' xx 'mask'], xx=nbslice
    18941894%flag_mask=1 indicates detection
     
    19301930          nbslice=1;
    19311931    end
    1932 end   
     1932end
    19331933%------------------------------
    19341934
     
    20132013value=get(handles.browse_gridciv1,'Value');
    20142014if value
    2015         filebase=get(handles.displ_filebase,'String');
    2016         [FileName, PathName, filterindex] = uigetfile( ...
     2015    filebase=get(handles.displ_filebase,'String');
     2016    [FileName, PathName, filterindex] = uigetfile( ...
    20172017           {'*.grid', ' (*.grid)';
    20182018            '*.grid',  '.grid files '; ...
    20192019            '*.*', 'All Files (*.*)'}, ...
    20202020            'Pick a file',filebase);
    2021         filegrid=fullfile(PathName,FileName);
     2021    filegrid=fullfile(PathName,FileName);
    20222022    if isempty(FileName)|isempty(PathName)|isequal(FileName,0)|~exist(filegrid,'file')
    20232023        set(handles.browse_gridciv1,'Value',0);
    20242024        set(handles.grid_civ1,'string','');
    2025             set(handles.dx_civ1,'Visible','on');
    2026             set(handles.dy_civ1,'Visible','on');
    2027             set(handles.grid_civ2,'string','');
     2025        set(handles.dx_civ1,'Visible','on');
     2026        set(handles.dy_civ1,'Visible','on');
     2027        set(handles.grid_civ2,'string','');
    20282028        if get(handles.CIV2,'Value')
    2029                 set(handles.dx_civ2,'Visible','on');
    2030                 set(handles.dy_civ2,'Visible','on');
     2029            set(handles.dx_civ2,'Visible','on');
     2030            set(handles.dy_civ2,'Visible','on');
    20312031        end
    20322032    else
    2033                 set(handles.grid_civ1,'string',filegrid);
    2034                 set(handles.dx_civ1,'Visible','off');
    2035                 set(handles.dy_civ1,'Visible','off');
    2036                 set(handles.grid_civ2,'string',filegrid);
    2037                 set(handles.dx_civ2,'Visible','off');
    2038                 set(handles.dy_civ2,'Visible','off');
     2033        set(handles.grid_civ1,'string',filegrid);
     2034        set(handles.dx_civ1,'Visible','off');
     2035        set(handles.dy_civ1,'Visible','off');
     2036        set(handles.grid_civ2,'string',filegrid);
     2037        set(handles.dx_civ2,'Visible','off');
     2038        set(handles.dy_civ2,'Visible','off');
    20392039% set(handles.grid_patch1,'string',filegrid);
    20402040% set(handles.grid_patch2,'string',filegrid);
     
    20422042else
    20432043    set(handles.grid_civ1,'string','');
    2044         set(handles.dx_civ1,'Visible','on');
    2045         set(handles.dy_civ1,'Visible','on');
    2046         set(handles.grid_civ2,'string','');
     2044    set(handles.dx_civ1,'Visible','on');
     2045    set(handles.dy_civ1,'Visible','on');
     2046    set(handles.grid_civ2,'string','');
    20472047    if get(handles.CIV2,'Value')
    2048             set(handles.dx_civ2,'Visible','on');
    2049             set(handles.dy_civ2,'Visible','on');
     2048        set(handles.dx_civ2,'Visible','on');
     2049        set(handles.dy_civ2,'Visible','on');
    20502050    end
    20512051end
     
    22862286    set(handles.MaxIma2,'Visible','off')
    22872287    set(handles.ImaThreshold2,'Value',0)
    2288     if isequal(get(handles.FIX2,'Value'),0) & isequal(get(handles.PATCH2,'Value'),0) 
     2288    if isequal(get(handles.FIX2,'Value'),0) & isequal(get(handles.PATCH2,'Value'),0)
    22892289        set(handles.list_pair_civ2,'Visible','off')
    22902290        set(handles.subdir_civ2,'Visible','off')
     
    23232323% set(handles.rho_civ2_title,'Visible','off')
    23242324% set(handles.frame_subdirciv2,'BackgroundColor',[0.831 0.816 0.784])
    2325 % if isequal(get(handles.FIX2,'Value'),0) & isequal(get(handles.PATCH2,'Value'),0) 
     2325% if isequal(get(handles.FIX2,'Value'),0) & isequal(get(handles.PATCH2,'Value'),0)
    23262326%     set(handles.list_pair_civ2,'Visible','off')
    23272327%     set(handles.subdir_civ2,'Visible','off')
     
    23672367set(handles.inf_sup2,'Visible','off')
    23682368set(handles.field_ref2,'Visible','off')
    2369 if isequal(get(handles.CIV2,'Value'),0) & isequal(get(handles.PATCH2,'Value'),0) 
     2369if isequal(get(handles.CIV2,'Value'),0) & isequal(get(handles.PATCH2,'Value'),0)
    23702370    set(handles.list_pair_civ2,'Visible','off')
    23712371    set(handles.subdir_civ2,'Visible','off')
     
    24072407set(handles.get_gridpatch2,'Visible','off')
    24082408set(handles.grid_patch2,'Visible','off')
    2409 if isequal(get(handles.CIV2,'Value'),0) & isequal(get(handles.FIX2,'Value'),0) 
     2409if isequal(get(handles.CIV2,'Value'),0) & isequal(get(handles.FIX2,'Value'),0)
    24102410    set(handles.list_pair_civ2,'Visible','off')
    24112411    set(handles.subdir_civ2,'Visible','off')
     
    24592459par.ratioHoverZ=1;
    24602460
    2461 %     
     2461%
    24622462% %----------------------------------------------------------------
    24632463% function par=read_param_civ2(handles,file_ima)
     
    24692469%     par.dx=get(handles.dx_civ2,'String');
    24702470%     par.dy=get(handles.dy_civ2,'String');
    2471 %     if isequal(str2num(par.dx),[]) 
     2471%     if isequal(str2num(par.dx),[])
    24722472%          if isempty(get(handles.grid_civ2,'String'));
    24732473%              par.dx='0'; %just read by civ_3D program, not used
     
    24872487%     par.pxcmx=get(handles.pxcmx,'String');
    24882488%     par.pxcmy=get(handles.pxcmy,'String');
    2489 %     if isempty(str2num(par.pxcmx)) |isempty(str2num(par.pxcmy)) 
     2489%     if isempty(str2num(par.pxcmx)) |isempty(str2num(par.pxcmy))
    24902490%         par.pxcmx='1';
    24912491%          par.pxcmy='1';
     
    25152515%changes : filename_cmx -> filename ( no extension )
    25162516
    2517             if isequal(par.Dt,'0')
    2518                 par.Dt='1' ;%case of 'displacement' mode
    2519             end         
    2520  
     2517    if isequal(par.Dt,'0')
     2518        par.Dt='1' ;%case of 'displacement' mode
     2519    end
     2520
    25212521    textcmx={'##############   CMX file';...
    25222522    ['FirstImage ' par.filename_ima_a];...
     
    25552555    %             timeL2=clock;
    25562556    %     timciv1=etime(timeL2,timeL1)
    2557           if sge 
     2557          if sge
    25582558          cmd_CIV1=[civ1_exe ' -f ' filename '.cmx' ]; % redirect standard output to the log file
    25592559          else
     
    25612561          end
    25622562    if(isunix)
    2563         [Rootbat,Filebat,extbat]=fileparts(namelog);
    2564         ncName=fullfile(Rootbat,[ Filebat '.nc']);
    2565             cmd_CIV1=char({cmd_CIV1 ; ['mv ' namelog  ' ' namelog '.civ1.log'];['chmod g+w ' ncName]});
     2563        [Rootbat,Filebat,extbat]=fileparts(namelog);
     2564        ncName=fullfile(Rootbat,[ Filebat '.nc']);
     2565        cmd_CIV1=char({cmd_CIV1 ; ['mv ' namelog  ' ' namelog '.civ1.log'];['chmod g+w ' ncName]});
    25662566    else
    25672567        cmd_CIV1=char({cmd_CIV1 ; ['copy /Y ' namelog ' ' namelog '.civ1.log']});
     
    25772577    civ1.image1=par.filename_ima_a;
    25782578    civ1.image2=par.filename_ima_b;
    2579     civ1.imageSize_X=par.npx; 
     2579    civ1.imageSize_X=par.npx;
    25802580    civ1.imageSize_Y=par.npy;
    25812581    civ1.outputFileName=[filename '.nc'];
     
    26022602    civ1.pixcmy=par.pxcmy;
    26032603    civ1.convectFlow='n';
    2604  
     2604
    26052605    xml_civ1_parameters=civ1;
    2606    
     2606
    26072607%---------------------------------------------------------
    26082608%CIV2  CIV2  CIV2 CIV2
     
    26132613   if isequal(par.Dt,'0')
    26142614                par.Dt='1' ;%case of 'displacement' mode
    2615   end 
     2615  end
    26162616textcmx={'##############   CMX file';...
    26172617['FirstImage ' par.filename_ima_a];...
     
    26202620['Mask ' par.maskflag];...
    26212621['MaskName ' par.maskname];...
    2622 ['ImageSize ' par.npx ' ' par.npy];...   
     2622['ImageSize ' par.npx ' ' par.npy];...
    26232623['CorrelationBoxesSize ' par.ibx ' ' par.iby];...
    26242624['SearchBoxeSize ' par.ibx ' ' par.iby];...
     
    26602660if isempty(dir(helpfile)), errordlg('Please put the help file uvmat_doc.html in the directory UVMAT/UVMAT_DOC')
    26612661else
    2662 web([helpfile '#civ_3D'])   
     2662web([helpfile '#civ_3D'])
    26632663end
    26642664
     
    26752675    A=uint16(A);
    26762676elseif isequal(nom_type,'raw_SMD')
    2677     [fid,message]=fopen(filename,'r');   
     2677    [fid,message]=fopen(filename,'r');
    26782678    B=fread(fid,Inf,'int16',0,'ieee-le');%read 16 bit binary file
    26792679    A=(reshape(B,npx,npy))'; %remplissage ligne par ligne avec une matrice colonne ? transposer(uB) pour avoir une matrice ligne
     
    26882688    A=uint16(A);
    26892689end
    2690        
     2690
    26912691%----------------------------------------------------------------
    26922692%Executes on carriage return on the time interval dt
     
    27182718mode_value=get(handles.mode,'Value');
    27192719mode=mode_list{mode_value};
    2720 if isequal(get(handles.CIV1,'Value'),0)| isequal(mode,'series(Di)') 
     2720if isequal(get(handles.CIV1,'Value'),0)| isequal(mode,'series(Di)')
    27212721    find_netcpair_civ1(hObject, eventdata, handles);% update the menu of pairs depending on the available netcdf files
    27222722end
     
    27312731mode_value=get(handles.mode,'Value');
    27322732mode=mode_list{mode_value};
    2733 if isequal(get(handles.CIV1,'Value'),0)| isequal(mode,'series(Dj)') 
     2733if isequal(get(handles.CIV1,'Value'),0)| isequal(mode,'series(Dj)')
    27342734    find_netcpair_civ1(hObject, eventdata, handles);% update the menu of pairs depending on the available netcdf files
    27352735end
     
    27472747    browse.nom_type_ima1=browse.nom_type_ima;
    27482748    set(handles.browse_root,'UserData',browse);
    2749     set(handles.displ_filebase2,'Visible','On');%mkes the second file input window visible 
     2749    set(handles.displ_filebase2,'Visible','On');%mkes the second file input window visible
    27502750    set(handles.displ_filebase2,'String',filebase);
    27512751    mode_store=get(handles.mode,'String');%get the present 'mode'
     
    27722772        '*.*', 'All Files (*.*)'}, ...
    27732773        'Pick a file',filebase);
    2774    
     2774
    27752775fileinput=[PathName FileName];
    27762776sizf=size(fileinput);
     
    28202820set(handles.thresh_vel,'String','1');%default threshold
    28212821set(handles.ref_fix1,'Enable','on')
    2822  
     2822
    28232823%---------------------------------------------------------------
    28242824% --- Executes on button press in get_ref_fix2.
     
    28502850%     [path,name]=fileparts(ref.filebase);
    28512851    set(handles.ref_fix2,'String',[fullfile(ref.subdir,File) '....nc']);
    2852     set(handles.ref_fix2,'UserData',ref)   
     2852    set(handles.ref_fix2,'UserData',ref)
    28532853    menu_field{1}='civ1';
    28542854%     [cte_detect,vdt,cte_read]=read_netcdf(fileinput,{'patch','civ2','patch2'});
     
    28932893    set(handles.ref_fix1,'String','');
    28942894    set(handles.thresh_vel1,'String','0');
    2895  
     2895
    28962896
    28972897%------------------------------------------------------
     
    30923092
    30933093
    3094 %'name2display': extracts the root name and field numbers from an input filename 
     3094%'name2display': extracts the root name and field numbers from an input filename
    30953095%--------------------------------------------------------------------
    30963096%[RootPath,RootFile,field_count,str2,str_a,str_b,ext,nom_type,subdir]=name2display(fileinput)
     
    31613161last=double(last_str);%corresponding ascii code
    31623162penult=double(RootFile(indcur-1));%ascii code of the penultimate character
    3163 testsub=0; %default 
     3163testsub=0; %default
    31643164% % case of an indexed series in a single file
    31653165% if strcmpi(ext,'.avi')
     
    31683168% %the penultimate character is a number and the last one a letter (lower case: last >= 97 && last <= 122
    31693169% %                                                                 capital
    3170 % %                                                                 letter:  last >= 65 && last <= 90) 
     3170% %                                                                 letter:  last >= 65 && last <= 90)
    31713171if  penult >= 48 && penult <= 57 && ((last >= 65 && last <= 90)||(last >= 97 && last <= 122))
    31723172    str_a=last_str; %extract appendix a,b,c... or A,B,C... as output.
     
    31853185    else
    31863186        nom_type=[nom_type 'a'];
    3187     end   
     3187    end
    31883188elseif strcmp(filelit(end-2:end),'-_-_')%new  nomenclature appendix num1-num2_num_a-num_b
    31893189    field_count=num0;
     
    32013201    testsub=1;
    32023202    indcur=separ1-1;
    3203 elseif strcmp(filelit(end-2:end),'__-')%new  nomenclature appendix num1_num2-num2 
     3203elseif strcmp(filelit(end-2:end),'__-')%new  nomenclature appendix num1_num2-num2
    32043204    indcur=separ1-1;
    32053205    field_count=num1;
     
    32313231elseif RootFile(indcur-2)=='_'% search appendix a,b,c,d
    32323232    lasts=RootFile(indcur-1:indcur);
    3233 %     if isequal(length(last),2) 
     3233%     if isequal(length(last),2)
    32343234        str_a=lasts(1);%put appendix a,b,c, ou d
    32353235        str_b=lasts(2);%put appendix a,b,c, ou d
     
    32373237        field_count=RootFile(separ0+1:separ1-1);
    32383238        indcur=separ0;
    3239         if double(lasts) >= 97 & double(lasts)<= 122 
     3239        if double(lasts) >= 97 & double(lasts)<= 122
    32403240            nom_type='_ab';
    32413241            testsub=1;
    3242         elseif double(lasts) >= 65 & double(lasts) <= 90 
     3242        elseif double(lasts) >= 65 & double(lasts) <= 90
    32433243            nom_type='_AB';
    32443244            testsub=1;
     
    32493249%search for other names with counter
    32503250else
    3251     if length(ext)>1     
     3251    if length(ext)>1
    32523252            num=1;count=0; % extract the numerical appendix
    32533253            while num==1;
    32543254                filascii=double(RootFile(indcur));
    32553255                if (48>filascii)||(filascii>57); % select the non-numerical characters
    3256                     num=0; 
     3256                    num=0;
    32573257                else
    32583258                    indcur=indcur-1; count=count+1;
    32593259                end
    32603260            end
    3261             if count~=0   
     3261            if count~=0
    32623262                field_count=RootFile(indcur+1:indcur+count);% set the selected field number'%03d'
    32633263                charstring=['%0' num2str(length(field_count)) 'd'];
  • trunk/src/toolbox_calib/init_intrinsic_param.m

    r926 r999  
    99%OUTPUT: fc: Camera focal length
    1010%        cc: Principal point coordinates
    11 %             kc: Distortion coefficients
     11%        kc: Distortion coefficients
    1212%        alpha_c: skew coefficient
    1313%        KK: The camera matrix (containing fc, cc and alpha_c)
     
    8989
    9090for kk=1:n_ima,
    91    
     91
    9292    if active_images(kk),
    93        
     93
    9494        eval(['Hkk = H_' num2str(kk) ';']);
    95        
    96         Hkk = Sub_cc * Hkk;   
    97        
     95
     96        Hkk = Sub_cc * Hkk;
     97
    9898        % Extract vanishing points (direct and diagonals):
    99        
     99
    100100        V_hori_pix = Hkk(:,1);
    101101        V_vert_pix = Hkk(:,2);
    102102        V_diag1_pix = (Hkk(:,1)+Hkk(:,2))/2;
    103103        V_diag2_pix = (Hkk(:,1)-Hkk(:,2))/2;
    104        
     104
    105105        V_hori_pix = V_hori_pix/norm(V_hori_pix);
    106106        V_vert_pix = V_vert_pix/norm(V_vert_pix);
    107107        V_diag1_pix = V_diag1_pix/norm(V_diag1_pix);
    108108        V_diag2_pix = V_diag2_pix/norm(V_diag2_pix);
    109        
     109
    110110        a1 = V_hori_pix(1);
    111111        b1 = V_hori_pix(2);
    112112        c1 = V_hori_pix(3);
    113        
     113
    114114        a2 = V_vert_pix(1);
    115115        b2 = V_vert_pix(2);
    116116        c2 = V_vert_pix(3);
    117        
     117
    118118        a3 = V_diag1_pix(1);
    119119        b3 = V_diag1_pix(2);
    120120        c3 = V_diag1_pix(3);
    121        
     121
    122122        a4 = V_diag2_pix(1);
    123123        b4 = V_diag2_pix(2);
    124124        c4 = V_diag2_pix(3);
    125        
     125
    126126        A_kk = [a1*a2  b1*b2;
    127127            a3*a4  b3*b4];
    128        
     128
    129129        b_kk = -[c1*c2;c3*c4];
    130        
    131        
     130
     131
    132132        A = [A;A_kk];
    133133        b = [b;b_kk];
    134        
     134
    135135    end;
    136    
     136
    137137end;
    138138
     
    148148end;
    149149
    150    
     150
    151151
    152152if two_focals_init
     
    185185fprintf(1,'Principal point:       cc = [ %3.5f   %3.5f ]\n',cc);
    186186fprintf(1,'Skew:             alpha_c = [ %3.5f ]   => angle of pixel = %3.5f degrees\n',alpha_c,90 - atan(alpha_c)*180/pi);
    187 fprintf(1,'Distortion:            kc = [ %3.5f   %3.5f   %3.5f   %3.5f   %5.5f ]\n',kc);   
     187fprintf(1,'Distortion:            kc = [ %3.5f   %3.5f   %3.5f   %3.5f   %5.5f ]\n',kc);
  • trunk/src/toolbox_calib/normalize_pixel.m

    r926 r999  
    4141
    4242if norm(kc) ~= 0,
    43         % Third: Compensate for lens distortion:
    44         xn = comp_distortion_oulu(x_distort,kc);
     43    % Third: Compensate for lens distortion:
     44    xn = comp_distortion_oulu(x_distort,kc);
    4545else
    4646   xn = x_distort;
Note: See TracChangeset for help on using the changeset viewer.