From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Vision Assistant Quantify ROI Mean value is wrong

While working with "Quantify" vision operation I discovered unpredictable "Mean Value" result.

Mean value is not corresponding with real number of white\black pixels on an image.

See picture attached - I beleive "mean value" should be more than 0.5, but it is 0.252...

 

Does anyone have an explanation of that?

0 Kudos
Message 1 of 6
(2,316 Views)

Why do you think the value should be 0.5? In the ROI, there appears to be a lot more red pixels than there are black ones...

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 6
(2,285 Views)

There's must be at least 0.5 or more (much more, you're right!), but not 0.25.

This weird thing happens in some ROIs - mean value may be right, may be not. This depends on what? I may attach some more strange pics of Quantify results, if needed.

0 Kudos
Message 3 of 6
(2,276 Views)

Any ideas? NI developers read this forum?

0 Kudos
Message 4 of 6
(2,254 Views)

Hi Agris,

 

I agree that this region seems like it should have an average higher than 0.25. Could you try a Histogram function on the same ROI to count the pixel values and see if it gives you a different result?

0 Kudos
Message 5 of 6
(2,241 Views)

Hi Ray,

 

Histogram reports same bad things - on attached image we see red pixels, but Vision Assistand doesn't - it reports MeanValue=0. Exactly the same results shows Quantify in this area.

 

I spent some time drawing ROIs, and, you know,  result depends not on the image or something else... It  depends on ROI tool! If you draw uneven shape with "pologonal" roi tool (see blue arrow on my screenshot), the result is shitty. If you draw rectangle on the same area - the result seems OK.

The only way to avoid strange behaviour is to use "rectangle", "circle" and "freehand" ROI tools here.

Any other ROI tools are useless, or to be honest, even pest.

 

Any ROI tool that can have gape or unclosed shape, shows bad results.

 

P.S. Thanks, Ray, for forcing me to draw some more ROIs, that's why I found the workaround 🙂

 

 

0 Kudos
Message 6 of 6
(2,236 Views)