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.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Image blob 's max/min pixel location.

Solved!
Go to solution

I have a raw image (U8) and a thresholded image. In the thresholded image, there are blobs, how do I find for each blob the max/min pixel value and its location XY in the raw image? Is there any fast, convenient vi or method available? I did not find any....all particle reports does not contain this information..

0 Kudos
Message 1 of 23
(3,341 Views)

You can use IMAQ Particle Analysis to get most of the information about each particle using the binary image.  For the rest, you can use IMAQ Label to make the binary image into a labeled image, then use IMAQ Quantify 2 with the raw image as the input image and the labeled binary image as the image mask.  Each of the Region Reports corresponds to particle with the same label.

 

Both routines use the same particle order (Particle Analysis and Label), so the two reports should match up.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 2 of 23
(3,321 Views)

As your suggested workflow, I still cannot get xy coordinate from IMAQ quantify2. I want to get this xy coordinate for the use of magic wand vi.

0 Kudos
Message 3 of 23
(3,297 Views)

for magic wand if you use binary image any point inside particle will be work .so  you can use particle Particle Analysis vi with a method like this to use magic wand  
image.png
use this file for more help  

Message 4 of 23
(3,292 Views)

I usually use Particle Analysis on a binary image to get the centre of mass x  and centre of mass y. Is this what you are after? You can select which measurements you want to use as part of the particle analysis. Centre of mass is at the top of the list. 

0 Kudos
Message 5 of 23
(3,279 Views)
Simon method that you indicate it is not appropriate for this propose because center of mass of particles could be outside of particle so magic wand will not response correct to center of mass of particles
0 Kudos
Message 6 of 23
(3,275 Views)

What does xy coordinate refer to then? I'm not familiar with Magic Wand so I'll need to look it up. 

0 Kudos
Message 7 of 23
(3,274 Views)
Message 8 of 23
(3,273 Views)

OK I understand this,  but in the original question what is the definition of location if it's not the centre of mass?

0 Kudos
Message 9 of 23
(3,267 Views)
magic wand is algorithm that you can find borders of particle that you select or it is better to say that to find nearest close counter around pixel that you select
0 Kudos
Message 10 of 23
(3,265 Views)