0001 load frames; 0002 load mask_dir; 0003 for fr =1 : length(frames) 0004 for ce = 1: frames(fr).nCells 0005 curr_row = frames(fr).Cells(ce).Row; 0006 curr_col = frames(fr).Cells(ce).Col; 0007 flow_reg = min(maskBG(curr_row,curr_col),min(maskGY(curr_row, curr_col),maskRG(curr_row, curr_col))); 0008 if flow_reg==maskBG(curr_row,curr_col) 0009 dirOfFlow = dirBG; 0010 elseif flow_reg==maskRG(curr_row,curr_col) 0011 dirOfFlow = dirRG; 0012 else 0013 dirOfFlow = dirGY; 0014 end 0015 frames(fr).Cells(ce).Type = dirOfFlow; 0016 end 0017 end