Ask Your Question

*help* Extracting a laser line

asked 2017-06-06 07:07:16 -0500

mirnyy gravatar image

updated 2017-06-09 09:01:53 -0500

Hello, i have a picture from a laser line and i would like to extract that line out of the image.

Thats the original picture

As the laser line is red, i take the red channel of the image and then searching for the highest intensity in every row:
image description

The problem now is, that there are also some points which doesnt belong to the laser line (if you zoom into the second picture, you can see these points).

Does anyone have an idea for the next steps (to remove the single points and also to extract the lines)?

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted

answered 2017-06-09 09:43:13 -0500

clynxi gravatar image

You are correct that the red channel has a high intensity for the red laser line but also everything that is white. To filter for the red you could subtract the green channel from the red channel and you will get much better results. After thresholding you can erode and dilate to get rid of the noise.

edit flag offensive delete link more

answered 2019-03-04 20:56:40 -0500

I am working on something else that also requires laser line tracking. Dynamic programming is a pretty good way to solve this problem.

You can play around with my code at:

edit flag offensive delete link more

answered 2017-06-12 01:24:15 -0500

Hi,you may try OTSU method to solove the problem. in my code

Mat src = imread("chair.bmp");
vector<Mat> planes;
Mat red = planes[2];
Mat temp = planes[2] - planes[0];

the result pic is image description

edit flag offensive delete link more
Login/Signup to Answer

Question Tools



Asked: 2017-06-06 07:07:16 -0500

Seen: 687 times

Last updated: Mar 04