LOST
0.0.1
LOST: Open-source Star Tracker
|
A simple, fast, and pretty decent centroid algorithm. More...
#include <centroiders.hpp>
Public Member Functions | |
CenterOfGravityAlgorithm () | |
Stars | Go (unsigned char *image, int imageWidth, int imageHeight) const override |
Actually perform the centroid detection. More... | |
Public Member Functions inherited from lost::CentroidAlgorithm | |
virtual | ~CentroidAlgorithm () |
A simple, fast, and pretty decent centroid algorithm.
Simply finds the weighted average of the coordinates of all bright pixels, the weight being proportional to the brightness of the pixel.
Definition at line 37 of file centroiders.hpp.
|
inline |
Definition at line 39 of file centroiders.hpp.
|
overridevirtual |
Actually perform the centroid detection.
This is the "main" function of CentroidAlgorithm.
image | An row-major indexed array of grayscale pixels. 0 is black, 255 is white. The total length is imageWidth * imageHeight |
imageWidth,imageHeight | Image dimensions in pixels. |
Implements lost::CentroidAlgorithm.
Definition at line 158 of file centroiders.cpp.