Measure total black area in a binary image

Hey there,

for question see title.
So far, I found in “Set measurements” the “Area fraction” command, which gives me the percentage of pixels of the black area. However, I would prefer getting a total number instead of a percentage (including the scale).

Is there a way to do this?
Thanks for your help!

Corinna

Dear @Aubergine,

you can use Analyze > Measure (activate Analyze > Set Measurements > Area and Limit to threshold) to measure the white area in scaled units (e.g. microns). You can use Edit > Invert to make the black region white and measure it.

Best,
Stefan

2 Likes

Dear @Aubergine,
if I’ve understood well your question you are searching for the area of the black pixels after thresholding, right?
you can achieve this using the suggestion of @stelfrich or do something like that:

run(“Blobs (25K)”);
setAutoThreshold(“Default”);
run(“Measure”);
run(“Set Measurements…”, “area area_fraction limit redirect=None decimal=4”);
run(“Measure”);

essentially unchecking the “dark background” in the threshold tool.

hoping to being helpful,
Emanuele Martini

2 Likes

Thanks for your answers!
I now checked the fields “area” and “area fraction” and “limit to threshold” in the binary image. Next, I analyzed again using Analyze > Measure.
This gives me the percentage of black pixels (%Area) and the number of black pixels (Area), right?
I tried then to preselect an are in the image (e.g. rectangle) and measured again. But I am not quite sure, if the results here are correct for the given selected area…Is this true?

Dear @Aubergine,
could you please upload an image and the results you are getting,
so we can compare results.

thank you
Emanuele

Hello @emartini
I need to measure the properties of the black area (perimeter, area, radius of the circle fitting in the area) in my image, however, analyze particle seems to have some errors. Do you have any idea how I can solve it, please?34-inv.tif (257.8 KB)

could it be because your image has an “inverted LUT”?
Try to invert again the LUT using the menu command Image->Lookup Tables->Invert LUT.

Emanuele

Thanks for your response Emanuele @emartini
But the result is not exact again … it seems that the software has problems detecting the holes. Do you know if there are any plugins or macro to do that?