verify which one is the correct one to calculate
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
bay rem
am 3 Feb. 2016
Kommentiert: Walter Roberson
am 3 Feb. 2016
i tried both of those instruction to calculate variance of each blob in one image, both leads to different results, i dont know wich one is the correct one can you please help me
for i=1: numofblobs
croppedImage = frameRGB(bbox(i, 2):bbox(i, 2)+bbox(i, 4)-1, bbox(i, 1):bbox(i, 1)+bbox(i, 3)-1, :);
blobVariance(i) = var(double(croppedImage(:)));
end
OR
for i=1: numofblobs
blobVariance(i) = var(double(bbox(i,:)))
end
where
bbox = step(blobAnalysis, binaryimage);
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 3 Feb. 2016
We would need to see the configuration of your blobanalysis to be sure, but the second code appears to be finding the variance in the coordinates of bounding boxes but the first one appears to be looking at the variance in the content of the images inside the bounding boxes
2 Kommentare
Walter Roberson
am 3 Feb. 2016
Your second code would only find the variance in the coordinates, not in the content. You want the first code.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Computer Vision Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!