Borrar filtros
Borrar filtros

how to get region of interest and calculate the hit rate and precision rate?

1 visualización (últimos 30 días)
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 ?

Respuesta aceptada

Image Analyst
Image Analyst el 9 de Dic. de 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 comentarios
Tan Wen Kun
Tan Wen Kun el 9 de Dic. de 2015
Editada: Tan Wen Kun el 9 de Dic. de 2015
what is different between drawing and masking? I got the original image and result image. How I going to do?
Draw on original then mask on result?
Can you show me by the image I given?
Image Analyst
Image Analyst el 9 de Dic. de 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.

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by