8#ifndef OCEAN_CV_DETECTOR_BULLSEYES_BULLSEYEDETECTORMONO_H 
    9#define OCEAN_CV_DETECTOR_BULLSEYES_BULLSEYEDETECTORMONO_H 
  180        template <
bool tFindBlackPixel>
 
  181        static 
bool findNextUpperPixel(const 
Frame& yFrame, const 
unsigned int x, const 
unsigned int y, const 
unsigned int maximalRows, const 
unsigned int threshold, 
unsigned int& rows);
 
  194        template <
bool tFindBlackPixel>
 
  195        static 
bool findNextLowerPixel(const 
Frame& yFrame, const 
unsigned int x, const 
unsigned int y, const 
unsigned int maximalRows, const 
unsigned int threshold, 
unsigned int& rows);
 
  210        static 
unsigned int determineThreshold(const uint8_t* yPosition, const 
unsigned int segmentSize1, const 
unsigned int segmentSize2, const 
unsigned int segmentSize3, const 
unsigned int segmentSize4, const 
unsigned int segmentSize5);
 
  227        static 
bool checkBullseyeInColumn(const 
Frame& yFrame, const 
unsigned int xCenter, const 
unsigned int yCenter, const 
unsigned int threshold, const 
unsigned int blackRingSegmentMin, const 
unsigned int blackRingSegmentMax, const 
unsigned int whiteRingSegmentMin, const 
unsigned int whiteRingSegmentMax, const 
unsigned int dotSegmentMin, const 
unsigned int dotSegmentMax);
 
  241        static 
bool checkBullseyeInNeighborhood(const 
Frame& yFrame, const 
unsigned int xCenter, const 
unsigned int yCenter, const 
unsigned int threshold, const 
float whiteRingRadius, const 
float blackRingRadius, const 
float whiteBorderRadius);
 
 
This class holds the most important parameters for the detector.
Definition BullseyeDetectorMono.h:66
 
void setFramePyramidLayers(unsigned int framePyramidLayers) noexcept
Sets the number of layers for the frame pyramid.
 
static Parameters defaultParameters() noexcept
Returns the default parameters for the detector.
 
bool useAdaptiveRowSpacing_
Determines whether adaptive row spacing is used (true) or every row is scanned (false) during bullsey...
Definition BullseyeDetectorMono.h:133
 
bool isValid() const noexcept
Returns whether the parameters are valid.
 
unsigned int framePyramidLayers_
The number of layers for the frame pyramid, with range [1, infinity)
Definition BullseyeDetectorMono.h:130
 
void setFramePyramidPixelThreshold(unsigned int framePyramidPixelThreshold) noexcept
Sets the pixel threshold for frame pyramid creation.
 
Parameters()=default
Creates a new valid parameter object.
 
unsigned int framePyramidLayers() const noexcept
Returns the number of layers for the frame pyramid.
 
unsigned int framePyramidPixelThreshold_
The pixel threshold for frame pyramid creation, with range [0, infinity)
Definition BullseyeDetectorMono.h:127
 
bool useAdaptiveRowSpacing() const noexcept
Returns whether adaptive row spacing is enabled during bullseye detection.
 
void setUseAdaptiveRowSpacing(bool useAdaptiveRowSpacing) noexcept
Sets whether adaptive row spacing should be used during bullseye detection.
 
unsigned int framePyramidPixelThreshold() const noexcept
Returns the pixel threshold for frame pyramid creation.
 
Implementation of a monocular detector for the bullseye pattern.
Definition BullseyeDetectorMono.h:37
 
static bool findNextUpperPixel(const Frame &yFrame, const unsigned int x, const unsigned int y, const unsigned int maximalRows, const unsigned int threshold, unsigned int &rows)
Finds either the next black or the next white pixel towards negative y direction (upwards in an image...
 
static bool checkBullseyeInColumn(const Frame &yFrame, const unsigned int xCenter, const unsigned int yCenter, const unsigned int threshold, const unsigned int blackRingSegmentMin, const unsigned int blackRingSegmentMax, const unsigned int whiteRingSegmentMin, const unsigned int whiteRingSegmentMax, const unsigned int dotSegmentMin, const unsigned int dotSegmentMax)
Checks whether a column contains a bullseye at a specified location.
 
static void detectBullseyesSubset(const Frame *yFrame, Bullseyes *bullseyes, Lock *multiThreadLock, const bool useAdaptiveRowSpacing, const unsigned int firstRow, const unsigned int numberRows)
Detects bullseyes in a subset of a given 8-bit grayscale image.
 
static bool findNextLowerPixel(const Frame &yFrame, const unsigned int x, const unsigned int y, const unsigned int maximalRows, const unsigned int threshold, unsigned int &rows)
Finds either the next black or the next white pixel towards positive y direction (downwards in an ima...
 
static bool detectBullseyes(const Frame &yFrame, Bullseyes &bullseyes, const Parameters ¶meters=Parameters::defaultParameters(), Worker *worker=nullptr)
Detects bullseyes in a given 8-bit grayscale image.
 
static bool determineAccurateBullseyeLocation(const Frame &yFrame, const unsigned int xBullseye, const unsigned int yBullseye, const unsigned int threshold, Vector2 &location)
Determines the sub-pixel location of the center dot of a known bullseye.
 
static unsigned int determineThreshold(const uint8_t *yPosition, const unsigned int segmentSize1, const unsigned int segmentSize2, const unsigned int segmentSize3, const unsigned int segmentSize4, const unsigned int segmentSize5)
Determines the gray threshold separating bright pixels from dark pixels.
 
static bool checkBullseyeInNeighborhood(const Frame &yFrame, const unsigned int xCenter, const unsigned int yCenter, const unsigned int threshold, const float whiteRingRadius, const float blackRingRadius, const float whiteBorderRadius)
Checks whether the direct neighborhood contains a bullseye at a specified location.
 
static void detectBullseyesInRow(const Frame &yFrame, const unsigned int y, Bullseyes &bullseyes)
Detects bullseyes in a row of a grayscale image.
 
This class implements Ocean's image class.
Definition Frame.h:1808
 
This class implements a recursive lock object.
Definition Lock.h:31
 
This class implements a worker able to distribute function calls over different threads.
Definition Worker.h:33
 
std::vector< Bullseye > Bullseyes
Definition of a vector holding bullseyes.
Definition Bullseye.h:103
 
The namespace covering the entire Ocean framework.
Definition Accessor.h:15