... | ... | @@ -4,7 +4,7 @@ Laser tracking in the picture is done by processing row, finding the pixel with |
|
|
|
|
|
---
|
|
|
### 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].
|
|
|
The image with the laser path is converted to the grayscale image with the highest proportion to a Red channel. This image is called an intensity picture.
|
|
|
|
|
|
### Pixel intensity around laser
|
|
|
|
... | ... | @@ -12,14 +12,14 @@ The intensity picture is calculated from colored image by giving every color a s |
|
|
|
|
|
## 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.
|
|
|
The laser path has slightly higher intensity than anything around. The laser position is given as a pixel with maximal intensity in some direction (i.e., row/column).
|
|
|
|
|
|
<img src="http://mathurl.com/jdfae4x.png" />
|
|
|
A laser light has a normal distribution around its maximum. This assumption is used to refine laser position to sub-pixel precision. The neighborhood around maximum is chosen, and intensities are logarithmized. These logarithms now describe a parabola. Finally, the parabola local maximum is a place with maximal intensity in our specified direction.
|
|
|
|
|
|
## 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.
|
|
|
[//]# (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" />
|
|
|
<img src="http://mathurl.com/hpbxpbz.png" />
|
|
|
|
|
|
|