There are two main methods that I used with good results:
Easy: on one frame, the threshold and find the area containing the image of the laser strip, then set the parabola to the intensity of saturated pixels in a small interval (5-7 pixels, depending on how well your focus is) around the maximum intensity in each row of images. Your substitution procedure should have a robustifier, since the outliers are likely to be, for example, near an area of the scene with significant specular reflection.
Stiffer but more accurate if your camera’s frame rate is high enough (or the beam moves slowly enough): Curless spatio-temporal analysis .
A search for a “subpixel laser fitting” returns a few more recent results.
On the practical side, pay close attention to saturation: the exposure time (or lens aperture) should ensure that your sensor does not become saturated even when the beam hits the lightest parts of the surface of the object. Finding a peak in the area where the signal has been cut off by saturation is clearly pointless.
Focusing (and depth of field) are other areas that you need to pay attention to - a blurry image of the beam on the surface of the object will give an offset peak.
source share