I have a laser line image, and I would like to extract this line from the image.

When the laser line is red, I take the red channel of the image, and then look through the highest intensity in each line:

The problem is that there are also some points that do not belong to the laser line (if you enlarge the image in the second image, you can see these points).
Does anyone have an idea for the next steps (delete individual points as well as extract lines)?
This was another approach to detecting the line: First, I blurred this “black and white” line with the core, then I diluted (skeleton), which blurred the line to a thin line, then I used the OpenCV function to detect the line. The result is in the following image: 
NEW:
Now I have another difficult situation. I have to extract the green laser beam.
The problem here is that the color range of the laser line is wider and changes.
In some parts of the laser line, the pixel simply has a high green component, and in other parts, the pixel also has a high blue component. 
source share