Changeset 452 for trunk/src/civ_matlab.m


Ignore:
Timestamp:
Jun 12, 2012, 8:53:51 PM (12 years ago)
Author:
sommeria
Message:

bugs repaired

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ_matlab.m

    r445 r452  
    5151check_civ1=0;%default
    5252check_patch1=0;%default
    53 
     53        ImageFileA=Param.Civ1.ImageA;
     54        ImageFileB=Param.Civ1.ImageB;
     55        if isfield(Param,'Civ2')
     56            ImageFileA_civ2=Param.Civ2.ImageA;
     57             ImageFileB_civ2=Param.Civ2.ImageB;
     58        end
    5459% case of input Param set by an xml file (batch mode)
    5560if ischar(Param)
     
    98103    else
    99104        if isfield(par_civ1,'ImageA')&&(ischar(par_civ1.ImageA)||strcmp(class(par_civ1.ImageA),'VideoReader')) % case with no image: only the PIV grid is calculated           
    100             [Field,ParamOut,errormsg] = read_field(par_civ1.ImageA,par_civ1.FileTypeA,[],par_civ1.FrameIndexA);
     105            [Field,ParamOut,errormsg] = read_field(ImageFileA,par_civ1.FileTypeA,par_civ1.ImageA,par_civ1.FrameIndexA);
    101106            if ~isempty(errormsg)
    102107                errormsg=['error in civ_matlab/read_field:' errormsg];
     
    106111        end
    107112        if isfield(par_civ1,'ImageB')&& (ischar(par_civ1.ImageB)||strcmp(class(par_civ1.ImageB),'VideoReader'))
    108             [Field,ParamOut,errormsg] = read_field(par_civ1.ImageB,par_civ1.FileTypeB,[],par_civ1.FrameIndexB);
     113            [Field,ParamOut,errormsg] = read_field(ImageFileB,par_civ1.FileTypeB,par_civ1.ImageB,par_civ1.FrameIndexB);
    109114            if ~isempty(errormsg)
    110115                errormsg=['error in civ_matlab/read_field:' errormsg];
     
    242247    if ~isfield (Param,'Civ1') || ~strcmp(Param.Civ1.ImageA,par_civ2.ImageA)
    243248        %read first image if not already done for civ1
    244         [Field,ParamOut,errormsg] = read_field(par_civ2.ImageA,par_civ2.FileTypeA,[],par_civ2.FrameIndexA);
     249        [Field,ParamOut,errormsg] = read_field(ImageFileA_civ2,par_civ2.FileTypeA,par_civ2.ImageA,par_civ2.FrameIndexA);
    245250                    if ~isempty(errormsg)
    246251                errormsg=['error in civ_matlab/read_field:' errormsg];
     
    253258    if ~isfield (Param,'Civ1') || ~strcmp(Param.Civ1.ImageB,par_civ2.ImageB)
    254259        %read first image if not already done for civ1
    255         [Field,ParamOut,errormsg] = read_field(par_civ2.ImageB,par_civ2.FileTypeB,[],par_civ2.FrameIndexB);
     260        [Field,ParamOut,errormsg] = read_field(ImageFileB_civ2,par_civ2.FileTypeB,par_civ2.ImageB,par_civ2.FrameIndexB);
    256261         if ~isempty(errormsg)
    257262                errormsg=['error in civ_matlab/read_field:' errormsg];
Note: See TracChangeset for help on using the changeset viewer.