03-07-2014 06:39 AM
Hello
I do have following problem to solve: I do have a laser spot which draws a line (non linear) to a wall. For this line I need to know the (exact) mathematical
function. Therefore I can get an image of the line but I do not know how I can extract the mathematical function with a line fit for example. If I could "convert"
the line into points I would use the line fit function of LabView which should work without problem.
Is there a way to solve the problem with the vision assistant or..?
Thanks in advance
Solved! Go to Solution.
03-07-2014 08:01 AM
Hello,
is your image grayscale or color?
If color (and assuming the laser is red), then extract the green color plane to get a good contrast between the laser pattern and the background. You can then threshold the image (perhaps inside the user specified ROI for greater robustness) and search for non-zero points, reading the coordinates. Then it should be simple to fit a nonlinear curve to the data, like you said.
If grayscale, you could perhaps put a bandpass filter (the basic ones are really, really cheap) in front of the camera (centered at the wavelength of the laser) to improve the contrast (this would pass mostly the laser light to your detector). Then use the same procedure as above (threshold and extract the coordinates).
Do you need this real-time or post-processing?
Best regards,
K
03-07-2014 08:32 AM
Hello Klemen
yes I do have a red laser and the contrast is pretty good. Therefore I do have no problems on the image itself. There is no need to do it in realtime so I simply store the image and process it afterwards.
Could you explain me how do you search the non-zero points and the coresponding coordinates? I did not find a function in the Vision Assistant therefore.
thanks for the help..!
Norick
03-07-2014 10:08 AM - edited 03-07-2014 10:09 AM
Hello,
after thresholding, this should work:
False case just goes through...
Best regards,
K
03-10-2014 01:24 AM
Hello Klemen
thank you very much for the example - thats the solution for my problem 🙂
Norick
03-10-2014 03:31 AM
Hi guys
I can't test it right now, but I think this information also works for me. I'm working on my own 3D-laser scanner and I'm in the beginning phase where I'm looking which software I can use to realise this. I worked a little bit with Vision so this is my first pick for the detection of the laser line.
So it's possible to detect the line and break it down into several points which I can import into calculation software to calculate the coördinates of the line?
PS: I'm not that good with Vision/LabVIEW. Still learning
Grtz
Ruts
03-10-2014 04:04 AM - edited 03-10-2014 04:05 AM
Hello,
by now I have learned that (almost) anything is possible. 🙂 You can achieve this using Labview, Matlab, C++, etc... In any case, getting the coordinates of a single laser line (single laser line - you don't need to find correspondences, as opposed to multi-line projection) should be really simple. If you place an apropriate filter in front of the camera, it is even simpler!
If you want proof it can be done (and the description/procedute I used), check out the link in my signature and search for laser scanner posts (I think there is three of them, if I remember correctly). I have made a really cheap scanner (total cost was around 45 eur). The only problem is that it is not fully calibrated. If you want to make precise distance measurements, you need to calibrate it, for example using a body of known shape. There are quite a few calibration methods - search in papers online.
Best regards,
K