Ignore:
Timestamp:
Dec 15, 2014, 10:03:23 PM (6 years ago)
Author:
sommeria
Message:

various bugs repaired

File:
1 edited

Legend:

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

    r834 r844  
    8787[tild,i1_series,i2_series,j1_series,j2_series]=get_file_series(Param);
    8888for iview=1:size(Param.InputTable,1)
    89     XmlFileName=find_imadoc(Param.InputTable{1,1},Param.InputTable{1,2},Param.InputTable{1,3},Param.InputTable{1,5});
     89    XmlFileName=find_imadoc(Param.InputTable{iview,1},Param.InputTable{iview,2},Param.InputTable{iview,3},Param.InputTable{iview,5});
    9090    if isempty(XmlFileName)
    9191        disp_uvmat('ERROR', [XmlFileName ' not found'],checkrun)
     
    285285        end
    286286        [A,Rangx,Rangy]=phys_ima(A,XmlData,1);
     287       
     288
     289        PhysImageA=fullfile_uvmat(RootPath_A,Civ1Dir,RootFile_A,'.png','_1a',i1_series_Civ1(ifield),[],1);
     290        PhysImageB=fullfile_uvmat(RootPath_A,Civ1Dir,RootFile_A,'.png','_1a',i1_series_Civ1(ifield),[],2);
     291        imwrite(A{1},PhysImageA)
     292        imwrite(A{2},PhysImageB)
    287293        par_civ1.ImageA=A{1};
    288294        par_civ1.ImageB=A{2};
     
    414420    if isfield (Param.ActionInput,'Civ2')
    415421        par_civ2=Param.ActionInput.Civ2;
    416         par_civ2.ImageA=[];
    417         par_civ2.ImageB=[];
     422        par_civ2.ImageA=par_civ1.ImageA;
     423        par_civ2.ImageB=par_civ1.ImageB;
    418424        %         if ~isfield(Param.Civ1,'ImageA')
    419425        i1=i1_series_Civ2(ifield);
     
    430436            j2=j2_series_Civ2(ifield);
    431437        end
    432         ImageName_A_Civ2=fullfile_uvmat(RootPath_A,SubDir_A,RootFile_A,FileExt_A,NomType_A,i1,[],j1);
    433        
    434         if strcmp(ImageName_A_Civ2,ImageName_A) && isequal(FrameIndex_A_Civ1(ifield),FrameIndex_A_Civ2(ifield))
    435             par_civ2.ImageA=par_civ1.ImageA;
    436         else
    437             [par_civ2.ImageA,VideoObject_A] = read_image(ImageName_A_Civ2,FileType_A,VideoObject_A,FrameIndex_A_Civ2(ifield));
    438         end
    439         ImageName_B_Civ2=fullfile_uvmat(RootPath_B,SubDir_B,RootFile_B,FileExt_B,NomType_B,i2,[],j2);
    440         if strcmp(ImageName_B_Civ2,ImageName_B) && isequal(FrameIndex_B_Civ1(ifield),FrameIndex_B_Civ2)
    441             par_civ2.ImageB=par_civ1.ImageB;
    442         else
    443             [par_civ2.ImageB,VideoObject_B] = read_image(ImageName_B_Civ2,FileType_B,VideoObject_B,FrameIndex_B_Civ2(ifield));
    444         end
    445        
    446         ncfile=fullfile_uvmat(RootPath_A,OutputDir,RootFile_A,'.nc',NomTypeNc,i1,i2,...
    447             j1,j2);
    448438        par_civ2.ImageWidth=FileInfo_A.Width;
    449439        par_civ2.ImageHeight=FileInfo_A.Height;
     
    498488        ibx2=ceil(par_civ2.CorrBoxSize(1)/2);
    499489        iby2=ceil(par_civ2.CorrBoxSize(2)/2);
    500         par_civ2.SearchBoxSize(1)=2*ibx2+9;% search ara +-4 pixels around the guess
    501         par_civ2.SearchBoxSize(2)=2*iby2+9;
    502         Civ2_Dt=time(i2+1,j2+1)-time(i1+1,j1+1);
    503         par_civ2.SearchBoxShift=(Civ2_Dt/Data.Civ1_Dt)*[Shiftx(nbval>=1)./nbval(nbval>=1) Shifty(nbval>=1)./nbval(nbval>=1)];
     490%         par_civ2.SearchBoxSize(1)=2*ibx2+9;% search ara +-4 pixels around the guess
     491%         par_civ2.SearchBoxSize(2)=2*iby2+9;
     492        par_civ2.SearchBoxShift=[Shiftx(nbval>=1)./nbval(nbval>=1) Shifty(nbval>=1)./nbval(nbval>=1)];
    504493        par_civ2.Grid=[par_civ2.Grid(nbval>=1,1)-par_civ2.SearchBoxShift(:,1)/2 par_civ2.Grid(nbval>=1,2)-par_civ2.SearchBoxShift(:,2)/2];% grid taken at the extrapolated origin of the displacement vectors
    505494        if par_civ2.CheckDeformation
     
    509498            par_civ2.DVDY=DVDY./nbval;
    510499        end
    511         % caluclate velocity data (y and v in indices, reverse to y component)
     500        % calculate velocity data (y and v in indices, reverse to y component)
    512501        [xtable ytable utable vtable ctable F] = civ (par_civ2);
    513502        list_param=(fieldnames(Param.ActionInput.Civ2))';
     
    518507        Data.Civ2_ImageB=ImageName_B;
    519508        Data.Civ2_Time=(time(i2+1,j2+1)+time(i1+1,j1+1))/2;
    520         Data.Civ2_Dt=Civ2_Dt;
    521         %         Data.Civ2_Time=1;
    522         %         Data.Civ2_Dt=1;
     509        Data.Civ2_Dt=0;
    523510        for ilist=1:length(list_param)
    524511            Data.(Civ2_param{4+ilist})=Param.ActionInput.Civ2.(list_param{ilist});
Note: See TracChangeset for help on using the changeset viewer.