|
|
# Laser Tracking
|
|
|
|
|
|
Laser tracking in the picture is done by processing row, finding the pixel with the highest intensity, fitting known approximate distribution shape and finding its maximum. Thus, we have sub-pixel precised position of the laser.
|
|
|
|
|
|
---
|
|
|
### Intensity picture
|
|
|
The intensity picture is calculated from colored image by giving every color a specific weight and summarize them. So we will have just a single number representing all colors. We use BGR weights as [0.05, 0.25, 0.70].
|
|
|
|
|
|
### Pixel intensity around laser
|
|
|
|
|
|

|
|
|
|
|
|
## Pixel maximum
|
|
|
|
|
|
For the pixel-precise maximum index we just call maximal index find for array witch returns only the first index. After that, we check if maximum is larger then selected noise level and if it is not we will start processing next row. Actually, there can be more pixels with the same maximal value following first one. So we use iterative mean to calculate the middle of those pixels.
|
|
|
|
|
|
<img src="http://mathurl.com/jdfae4x.png" />
|
|
|
|
|
|
## Sub-pixel maximum
|
|
|
|
|
|
When we want to find sub-pixel maximum we select the specific neighborhood around maximum and fit parabola inside. The local extreme of parabola gives us wanted sub-pixel maximum.
|
|
|
|
|
|
|