Skip to content

Commit

Permalink
Bug Correction: There was a variable misassigned for camera PF1024 an…
Browse files Browse the repository at this point in the history
…d PF1312
  • Loading branch information
SamFB committed Mar 30, 2022
1 parent 2e74feb commit aea8552
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions ImagesClassification.m
Original file line number Diff line number Diff line change
Expand Up @@ -280,21 +280,20 @@ function ChannelsSort(fList, colors)
clear data;

if( contains(AcqInfoStream.Camera_Model,{'D1024', 'D1312'}) )
if( indF == 1 )
hData = hData(:,(subNbColors + 1):end);
iData = iData(:,:,(subNbColors + 1):end);
end
% if( indF == 1 )
% hData = hData(:,(subNbColors + 1):end) - subNbColors;
% iData = iData(:,:,(subNbColors + 1):end);
% end
SkipNFirst = sum(hData(1,:) == 0);
MissingOffset = cumsum(hData(2,:));
hData(1,:) = hData(1,:) + MissingOffset;
goodFrames = find(accumarray(hData(1, (SkipNFirst+1):end)',1)==1)';
ConseqFromLeft = [1 diff(goodFrames,1,2)==1];
ConseqFromRight = fliplr([true diff(fliplr(goodFrames),1,2)==-1]);
goodFrames = goodFrames(ConseqFromLeft|ConseqFromRight);
badFrames = 1:max(goodFrames(:));
badFrames = badFrames(~ismember(badFrames, goodFrames));
Images = zeros(ImRes_XY(1), ImRes_XY(2), (hData(1,end) - hData(1,1) + 1),'uint16');
Images(:,:,goodFrames) = iData;
iData = Images;
elseif( contains(AcqInfoStream.Camera_Model, 'BFLY') )
iNbF = hData(2,1) - Cnt;
if( (hData(2,end) - hData(2,1)) > 0 )
Expand Down

0 comments on commit aea8552

Please sign in to comment.