Not able to identify nan values using isnan

3 vues (au cours des 30 derniers jours)
ImageAnalyst
ImageAnalyst le 15 Mai 2020
Modifié(e) : ImageAnalyst le 16 Mai 2020
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

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by