Not able to identify nan values using isnan

조회 수: 5 (최근 30일)
ImageAnalyst
ImageAnalyst 2020년 5월 15일
편집: ImageAnalyst 2020년 5월 16일
I am trying to create a mask associated to my motion compensated block. This mask has the value 0 when it finds nan in mcframe and 1 when it does not. Problem is isnan identifies nan values and assigns correct value in mask matrix except from row 90 - 92. My frames are of size 360x640. I have atatched the data for both the matrix mcframe and mask. Below is the code.
x and y are the positions of the block starting from upper left hand corner and going untill the end of rows and columns in both directions
count is variable to keep track of how many 1's I get in my mask.
mcframe(y, x) = mc_previous_block;
if isnan(mcframe(y, x))
mask(y, x) = 0;
else
mask(y, x) = 1;
count = count + 1;
end

답변 (0개)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by