how to get region of interest and calculate the hit rate and precision rate?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Tan Wen Kun
am 9 Dez. 2015
Kommentiert: Image Analyst
am 9 Dez. 2015
How to draw out the total object pixel of interest region in an image?
I want calculate the hit rate= correct pixel deteced/total object pixel
precision= correct pixel detect/total detected pixel
elephant is my original image and result is my segmentation which is very bad. I now want to calculate the hit rate and precision rate. How to do it?
How to superimpose(transparent) the result to elephant ?
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 9 Dez. 2015
Calculate the area of the elephant from the outline you traced around it using poly2mask, then sum.
elephantMask = poly2mask(x, y, rows, columns);
elephantArea = sum(elephantMask(:));
Then calculate the area of overlap between your segmentation and the true area
numSegmentationPixels = sum(segmentationMask(:))
overlapPixels = elephantMask & segmentationMask;
numOverlapPixels = sum(overlapPixels(:))
Then use your formula for precison:
precision = numOverlapPixels / numSegmentationPixels;
4 Kommentare
Image Analyst
am 9 Dez. 2015
Drawing is just tracing the curve by hand over the image. It will give you the coordinates that you drew. Masking takes that one step further. It uses those coordinates and then creates a binary image that's true inside the curve and false outside. You can then use that binary image to set the inside or outside of the mask in the original image to any intensity or color you want, such as black or white or unchanged. The demos already demonstrate what you are asking for I believe.
Weitere Antworten (0)
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!