LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

laser line detection with NI IMAQdx example VI

Hello!

 

I am looking for VI example to detect laser line (either brightest point) from picture that I obtain from USB web-cam.

 

At this moment I have VI which converted image to greyscale. And now I am searching for next step of the algorithm.

But unfortunately, most of of related examples used NI Vision Development Module.

 

Thank You in advance for any help.

0 Kudos
Message 1 of 7
(4,408 Views)

Hi,

 

You can use Find Straight Edge step in VBAI to detect a the laser line in you region of interest or on the whole picture. After you have the inspection finished, you can use it with the VBAI API in LabVIEW.

 

Alternatively, if you are working with LV only, you can use the IMAQ Find Edge VI to do the same thing.

 

All the best,

D.

0 Kudos
Message 2 of 7
(4,358 Views)

If you don't want to use Vision Development Module, you can convert your image to a 2D array and use LabVIEW Math function, but that will be a lot harder since there's not a single Math function that will do what you want (i.e. take a 2D array and return the center of mass or something similar). Most Math function functions only work on a 1D array (i.e. Peak/Valley Detector would be a good one to try, but you'd have to use it with one row at a time). You could try the Array Min/Max, but it would be succeptible to noise in the image throwing off your results.

 

Hope this helps,

Brad

0 Kudos
Message 3 of 7
(4,351 Views)

I developed a Laser Line library based on NI vision.
图片1.png

This Library  Include Initinalize Size、Start Driver、Insert Image、Get Point and Exit Driver 5 method.Automatic parallel processing and support thread control!1/16 of pixel precision!

图片2.pngThe processing effect is as follows

图片3.pngLow brightness effect

图片5.png图片4.pngIf necessary, please contact the following email address:

zhangdongbin.2008@163.com

0 Kudos
Message 4 of 7
(3,580 Views)

Hi
I am trying to develop a laser triangulation 3D scanner. I think your library will be useful for me. can you share it with me?

0 Kudos
Message 5 of 7
(2,504 Views)

@mathijsen wrote:

At this moment I have VI which converted image to greyscale. And now I am searching for next step of the algorithm.


I'd convert to HSL instead, so I'd be able to threshold on H (color) and intensity (L).

0 Kudos
Message 6 of 7
(2,484 Views)

@mathijsen wrote:

Hello!

 

I am looking for VI example to detect laser line (either brightest point) from picture that I obtain from USB web-cam.


"Laser line" is a bit confusing since you look for a point.

 

So are you looking for a line or a point? Lasers can make lines and points...

 

If it's a laser point, simply convert to a 2d array and use the Array Min Max function. It will give you the indices of the positions in the 2 dimensions.

 

You might want to use fancier method to find the center of the spot, but it will become more complex.

 

Using Array Min Max could be a starting point. It would be a fast way to give a rough location, so you can use a refined (and slow) method to find the exact spot. Sometimes you can even get sub pixel accuracy.

0 Kudos
Message 7 of 7
(2,483 Views)