10#include <unordered_map>
11#include <unordered_set>
23 for (
int i = 0; i < numStars; i++) {
55 for (
long i = 0; i <
total; i++) {
58 for (
int i = 0; i < 256; i ++) {
61 for (
int i = 0; i < 256; i ++) {
65 if (
wB > 0 &&
wF > 0) {
133 p->checkedIndices.insert(i);
144 p->magSum += image[i];
165 if (image[i] >=
p.cutoff &&
p.checkedIndices.count(i) == 0) {
220 p->checkedIndices.insert(i);
222 if (image[i] >
p->maxIntensity) {
223 p->maxIntensity = image[i];
253 if (image[i] >=
p.cutoff &&
p.checkedIndices.count(i) == 0) {
Stars Go(unsigned char *image, int imageWidth, int imageHeight) const override
Actually perform the centroid detection.
Stars Go(unsigned char *image, int imageWidth, int imageHeight) const override
Actually perform the centroid detection.
Stars Go(unsigned char *image, int imageWidth, int imageHeight) const override
Actually perform the centroid detection.
A "centroid" detected in an image.
#define DECIMAL_POW(base, power)
int OtsusThreshold(unsigned char *image, int imageWidth, int imageHeight)
int BadThreshold(unsigned char *image, int imageWidth, int imageHeight)
std::vector< Star > Stars
void IWCoGHelper(IWCoGParams *p, long i, unsigned char *image, int imageWidth, int imageHeight, std::vector< int > *starIndices)
void SerializePrimitive(SerializeContext *ser, const T &val)
void CogHelper(CentroidParams *p, long i, unsigned char *image, int imageWidth, int imageHeight)
int BasicThresholdOnePass(unsigned char *image, int imageWidth, int imageHeight)
int BasicThreshold(unsigned char *image, int imageWidth, int imageHeight)
std::unordered_set< int > checkedIndices
std::unordered_set< int > checkedIndices