Changeset 387 for trunk/src/civ_matlab.m


Ignore:
Timestamp:
Apr 4, 2012, 3:31:30 PM (12 years ago)
Author:
sommeria
Message:

several bugs corrected: mask, color image...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ_matlab.m

    r386 r387  
    1414%INPUT:
    1515% Param: input images and processing parameters
     16%     .Civ1: for civ1
     17%     .Fix1:
     18%     .Patch1:
     19%     .Civ2: for civ2
     20%     .Fix2:
     21%     .Patch2:
    1622% ncfile: name of a netcdf file to be created for the result (extension .nc)
    1723%
     
    4753
    4854if ischar(Param)
    49     Param=xml2struct(Param);
     55    Param=xml2struct(Param); %if Param is the name of an xml file, read this file as a Matlab structure
    5056end
    5157
     
    6672        end
    6773    else
    68         if ischar(par_civ1.ImageA)
     74        if isfield(par_civ1,'ImageA') && ischar(par_civ1.ImageA) % case with no image: only the PIV grid is calculated
    6975            par_civ1.ImageA=sum(imread(par_civ1.ImageA),3);
    7076        end
    71         if ischar(par_civ1.ImageB)
     77        if isfield(par_civ1,'ImageB')&& ischar(par_civ1.ImageB)
    7278            par_civ1.ImageB=sum(imread(par_civ1.ImageB),3);
    7379        end
     
    245251    end
    246252    mask='';
    247     if par_civ2.CheckMask&&~isempty(par_civ2.maskname)&& ~strcmp(maskname,par_civ2.maskname)% mask exist, not already read in civ1
    248         mask=imread(par_civ2.maskname);
     253    if par_civ2.CheckMask&&~isempty(par_civ2.Mask)&& ~strcmp(maskname,par_civ2.Mask)% mask exist, not already read in civ1
     254        mask=imread(par_civ2.Mask);
    249255    end
    250256    par_civ2.Searchx=2*isx2+1;
Note: See TracChangeset for help on using the changeset viewer.