LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ROI around brightest pixel

So, I was wondering if it was possible to draw a 10-pixel radius ROI around the brightest pixel in an image, and then go on from there to do some other calculations. I'm using Vision Assistant, and it seems the centroid function would serve this purpose, but I don't think it locates the brightest pixel exactly; just the energy centre. Drawing the ROI around the pixel is the issue.
0 Kudos
Message 1 of 4
(2,586 Views)
Hi Ayi,

Thank you for posting to the NI forums!  Try doing a colour threshold on the image, and increasing the minimum to something really large, such as 250 with the max set to 255.  This will eliminate everything but the brightest pixels, the ones that are almost white.  If you want to get the absolute brightest pixel, you would have to write code in LabVIEW and then import it into Vision Assistant.  To define an ROI, you can either use a rectangular ROI, or you can use an annulus. Either way, center it around the center of the brightest pixel. 

I hope this helps!
Maclean G.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 4
(2,562 Views)
It does, but my main concern is automating the process of drawing the ROI around the pixel, not necessarily finding the pixel. If I were to draw an ROI around a certain position, LabView would just draw the same ROI at that position, although it may not have the brightest pixel. The idea is that this process can be repeated over a range of different images, without the user having to do anything.
0 Kudos
Message 3 of 4
(2,551 Views)
Hi Ayi,

Once you have the pixels you want to draw an ROI around, you can create an annulus manually by entering in the annulus values around the (x,y) coordinates of the pixel.  Then, use the convert annulus to ROI VI to create the ROI.

Take care!
Maclean G.
National Instruments
Applications Engineer
0 Kudos
Message 4 of 4
(2,533 Views)