8#ifndef META_OCEAN_CV_DETECTOR_LINE_DETECTOR_HOUGH_H
9#define META_OCEAN_CV_DETECTOR_LINE_DETECTOR_HOUGH_H
28namespace Test {
namespace TestCV {
namespace TestDetector {
class TestLineDetectorHough; } } }
195 inline AngleLookupData(
const unsigned int angleBin,
const unsigned int weight);
247 using MapPair = std::pair<unsigned int, bool>;
252 using MapTriple = std::tuple<unsigned int, unsigned int, bool>;
337 void accumulate(
const unsigned int x,
const unsigned int y,
const int8_t* responses,
const unsigned int angleNeigbors = 3u);
346 void accumulateDiagonal(
const unsigned int x,
const unsigned int y,
const int8_t* responsesDiagonal,
const unsigned int angleNeigbors = 3u);
357 inline unsigned int width()
const;
363 inline unsigned int height()
const;
393 inline const uint32_t*
votes()
const;
410 void detectPeaks(
InfiniteLines& lines,
const unsigned int voteThreshold,
const bool determineExactPeakMaximum,
Worker* worker =
nullptr,
const bool smoothAccumulator =
false);
453 explicit inline operator bool()
const;
467 void detectPeaksSubset(
const unsigned int voteThreshold,
const bool determineExactPeakMaximum,
Lock* lock,
InfiniteLines* lines,
const unsigned int firstAngleBin,
const unsigned int numberAngleBins);
481 void detectAdaptivePeaksSubset(
const uint32_t* borderedIntegralAccumulator,
const Scalar adaptiveVoteThresholdFactor,
const unsigned int windowHalf,
const bool determineExactPeakMaximum,
Lock* lock,
InfiniteLines* lines,
const unsigned int firstAngleBin,
const unsigned int numberAngleBins);
490 static void joinTwo(
Accumulator* accumulators,
const unsigned int firstAngleBin,
const unsigned int numberAngleBins);
499 static void joinFour(
Accumulator* accumulators,
const unsigned int firstAngleBin,
const unsigned int numberAngleBins);
509 static void join(
Accumulator* accumulators,
const unsigned int number,
const unsigned int firstAngleBin,
const unsigned int numberAngleBins);
614 static inline bool detectLines(
const Frame& frame,
const FilterType filterType,
const FilterResponse filterResponse, InfiniteLines& infiniteLines,
FiniteLines2* finiteLines =
nullptr,
const bool optimizeLines =
true,
const unsigned int accumulatorThreshold = 100u,
const unsigned int voteThreshold = 16u,
const unsigned int angleNeigbors = 2u,
const bool determineExactPeakMaximum =
true,
Worker* worker =
nullptr,
const unsigned int anglePrecision = 360u,
const unsigned int distancePrecision = (
unsigned int)(-1),
const bool halfOrientationPrecision =
true,
const Scalar similarDistance =
Scalar(10),
const Scalar similarAngle =
Numeric::deg2rad(5));
639 static inline bool detectLinesWithAdaptiveThreshold(
const Frame& frame,
const FilterType filterType,
const FilterResponse filterResponse, InfiniteLines& infiniteLines,
FiniteLines2* finiteLines =
nullptr,
const bool optimizeLines =
true,
const Scalar adaptiveVoteThresholdFactor =
Scalar(8),
const unsigned int thresholdWindow = 61u,
const unsigned int voteThreshold = 16,
const unsigned int angleNeigbors = 2u,
const bool determineExactPeakMaximum =
true,
Worker* worker =
nullptr,
const unsigned int anglePrecision = 360u,
const unsigned int distancePrecision = (
unsigned int)(-1),
const bool halfOrientationPrecision =
true,
const Scalar similarDistance =
Scalar(10),
const Scalar similarAngle =
Numeric::deg2rad(5));
682 template <
typename T>
709 static bool internalDetectLines(
const Frame& frame,
const FilterType filterType,
const FilterResponse filterResponse,
InfiniteLines& infiniteLines,
FiniteLines2* finiteLines,
const bool optimizeLines,
const Scalar thresholdParameter,
const unsigned int adaptiveThresholdWindowHalf,
const unsigned int voteThreshold,
const unsigned int angleNeigbors,
const bool determineExactPeakMaximum,
Worker* worker,
const unsigned int anglePrecision,
const unsigned int distancePrecision,
const bool halfOrientationPrecision,
const Scalar similarDistance,
const Scalar similarAngle);
731 static void createVotesDiagonalSubset(
const int8_t* response,
Accumulator* accumulator,
const unsigned int angleNeigbors,
const unsigned int voteThreshold,
const unsigned int firstRow,
const unsigned int numberRows);
760 static void detectFiniteLinesSubset(
const InfiniteLines* infiniteLines,
const int8_t* response,
const unsigned int width,
const unsigned int height,
const FilterResponse filterResponse,
const unsigned int angleBins,
const Accumulator::AngleLookupData* horizontalAngleLookup,
const Accumulator::AngleLookupData* diagonalAngleLookup,
const bool halfOrientationPrecision,
Lock* lock,
FiniteLines2* finiteLines,
const unsigned int firstLine,
const unsigned int numberLines);
792 static void optimizeInfiniteLinesSubset(
const InfiniteLine* infiniteLines,
const size_t number,
const int8_t* response,
const unsigned int width,
const unsigned int height,
const FilterResponse filterResponse,
const unsigned int radius,
const Accumulator* accumulator,
const bool halfOrientationPrecision,
InfiniteLine* optimizedLines,
const unsigned int firstLine,
const unsigned int numberLines);
817 template <
typename T>
818 static inline bool compareElements(
const std::vector<T>& first,
const std::vector<T>& second);
835 ocean_assert(width >= 3u && height >= 3u);
844 ocean_assert(width >= 3u && height >= 3u);
854 result.reserve(size);
860 for (
size_t n = 0; n < size; ++n)
862 result.emplace_back(frameCenter + lines[n].
point(), lines[n].
direction());
868 for (
size_t n = 0; n < size; ++n)
870 result.emplace_back(frameCenter + lines[n].
point(), lines[n].
direction());
951inline LineDetectorHough::Accumulator::operator bool()
const
969 return first.size() > second.size();
980 return first.size() > second.size();
983inline bool LineDetectorHough::detectLines(
const Frame& frame,
const FilterType filterType,
const FilterResponse filterResponse,
InfiniteLines& infiniteLines,
FiniteLines2* finiteLines,
const bool optimizeLines,
const unsigned int accumulatorThreshold,
const unsigned int voteThreshold,
const unsigned int angleNeigbors,
const bool determineExactPeakMaximum,
Worker* worker,
const unsigned int anglePrecision,
const unsigned int distancePrecision,
const bool halfOrientationPrecision,
const Scalar similarDistance,
const Scalar similarAngle)
985 ocean_assert(accumulatorThreshold > 0);
986 ocean_assert(similarDistance >= 0);
987 ocean_assert(similarAngle >= 0);
989 return internalDetectLines(frame, filterType, filterResponse, infiniteLines, finiteLines, optimizeLines,
Scalar(accumulatorThreshold), 0u, voteThreshold, angleNeigbors, determineExactPeakMaximum, worker, anglePrecision, distancePrecision, halfOrientationPrecision, similarDistance, similarAngle);
992inline bool LineDetectorHough::detectLinesWithAdaptiveThreshold(
const Frame& frame,
const FilterType filterType,
const FilterResponse filterResponse,
InfiniteLines& infiniteLines,
FiniteLines2* finiteLines,
const bool optimizeLines,
const Scalar thresholdRatio,
const unsigned int thresholdWindow,
const unsigned int voteThreshold,
const unsigned int angleNeigbors,
const bool determineExactPeakMaximum,
Worker* worker,
const unsigned int anglePrecision,
const unsigned int distancePrecision,
const bool halfOrientationPrecision,
const Scalar similarDistance,
const Scalar similarAngle)
994 ocean_assert(thresholdRatio > 0 && thresholdWindow > 0u);
995 ocean_assert(similarDistance >= 0);
996 ocean_assert(similarAngle >= 0);
998 ocean_assert(thresholdWindow >= 5u && (thresholdWindow % 2u) == 1u);
1000 const unsigned int adaptiveThresholdWindowHalf = thresholdWindow / 2u;
1002 return internalDetectLines(frame, filterType, filterResponse, infiniteLines, finiteLines, optimizeLines, thresholdRatio, adaptiveThresholdWindowHalf, voteThreshold, angleNeigbors, determineExactPeakMaximum, worker, anglePrecision, distancePrecision, halfOrientationPrecision, similarDistance, similarAngle);
This class holds angle lookup data.
Definition LineDetectorHough.h:182
unsigned int weight_
Weight value.
Definition LineDetectorHough.h:203
unsigned int angleBin_
Bin of the associated angle.
Definition LineDetectorHough.h:200
AngleLookupData()=default
Creates an empty lookup object.
This class holds distance lookup data.
Definition LineDetectorHough.h:210
int directionY_
Direction of the normal for the y axis.
Definition LineDetectorHough.h:231
int directionX_
Direction of the normal for the x axis.
Definition LineDetectorHough.h:228
DirectionLookupData()=default
Creates an empty lookup object.
This class defines a data lookup manager defined as singleton.
Definition LineDetectorHough.h:238
const AngleLookupData * angleLookupData8BitResponse16BitRequest(const unsigned int angleBins, const bool halfOrientationPrecision)
Returns the angle lookup data for 8 bit horizontal and vertical response values.
std::pair< unsigned int, bool > MapPair
Definition of a pair combining an unsigned integer with a boolean state.
Definition LineDetectorHough.h:247
const AngleLookupData * angleLookupDataDiagonal8BitResponse16BitRequest(const unsigned int angleBins, const bool halfOrientationPrecision)
Returns the angle lookup data for 8 bit diagonal (45 and 135 degree) response values.
std::map< MapTriple, DirectionLookupData * > DirectionLookupMap
Definition of a map mapping precision values to direction lookup data.
Definition LineDetectorHough.h:262
Lock lock_
The manager's look.
Definition LineDetectorHough.h:313
const DirectionLookupData * directionLookupData(const unsigned int angleBins, const unsigned int distanceBins, const bool halfOrientationPrecision)
Returns the direction lookup data for an angle request.
friend class Accumulator
Definition LineDetectorHough.h:240
DirectionLookupMap directionLookupMap_
Lookup map for directions.
Definition LineDetectorHough.h:310
std::map< MapPair, AngleLookupData * > AngleLookupMap
Definition of a map mapping precision values to angle lookup data.
Definition LineDetectorHough.h:257
AngleLookupMap angleLookupMapDiagonal_
Lookup map for angles, diagonal.
Definition LineDetectorHough.h:307
~LookupManager()
Destructs a manager.
std::tuple< unsigned int, unsigned int, bool > MapTriple
Definition of a tuple combining angleBins, distanceBins and halfOrientationPrecision.
Definition LineDetectorHough.h:252
AngleLookupMap angleLookupMap_
Lookup map for angles, horizontal and vertical.
Definition LineDetectorHough.h:304
Vote accumulator array.
Definition LineDetectorHough.h:173
unsigned int distanceBins() const
Returns the distance precision of this accumulator.
Definition LineDetectorHough.h:926
static void joinFour(Accumulator *accumulators, const unsigned int firstAngleBin, const unsigned int numberAngleBins)
Joins a subset of four accumulator objects.
unsigned int angleBins() const
Returns the number of bins this accumulator stores for angle votes (including the additional bins for...
Definition LineDetectorHough.h:931
bool debugMirroredAngleBinsCreated_
State to check whether the mirrored angle bins has been created before line detection.
Definition LineDetectorHough.h:551
void detectAdaptivePeaks(InfiniteLines &lines, const Scalar adaptiveVoteThresholdFactor, const unsigned int windowHalf, const bool determineExactPeakMaximum, Worker *worker=nullptr, const bool smoothAccumulator=false)
Detects peaks inside a subset of the accumulator votes using a surrounding window to determine the th...
static void joinTwo(Accumulator *accumulators, const unsigned int firstAngleBin, const unsigned int numberAngleBins)
Joins a subset of two accumulator objects.
const unsigned int accumulatorImageHeight_
Height of the original image in pixel.
Definition LineDetectorHough.h:529
void detectAdaptivePeaksSubset(const uint32_t *borderedIntegralAccumulator, const Scalar adaptiveVoteThresholdFactor, const unsigned int windowHalf, const bool determineExactPeakMaximum, Lock *lock, InfiniteLines *lines, const unsigned int firstAngleBin, const unsigned int numberAngleBins)
Detects peaks inside a subset of the accumulator votes using a surrounding window to determine the th...
int accumulatorMaximalDistance_
Maximal line distance in pixel.
Definition LineDetectorHough.h:517
static void joinTwo(Accumulator *accumulators, Worker *worker=nullptr)
Joins two accumulator objects.
const AngleLookupData * angleLookupTable_
Lookup table for angle data, horizontal and vertical.
Definition LineDetectorHough.h:541
unsigned int angleBinsCore() const
Returns the angle precision of this accumulator.
Definition LineDetectorHough.h:936
void createMirroredAngleBins()
Creates the additional mirrored angle bins at the top and bottom of the accumulator frame.
void detectPeaksSubset(const unsigned int voteThreshold, const bool determineExactPeakMaximum, Lock *lock, InfiniteLines *lines, const unsigned int firstAngleBin, const unsigned int numberAngleBins)
Detects peaks inside a subset of the accumulator votes.
void detectPeaks(InfiniteLines &lines, const unsigned int voteThreshold, const bool determineExactPeakMaximum, Worker *worker=nullptr, const bool smoothAccumulator=false)
Detects peaks inside the accumulator votes.
void accumulateDiagonal(const unsigned int x, const unsigned int y, const int8_t *responsesDiagonal, const unsigned int angleNeigbors=3u)
Adds a new diagonal (45 degree and 135 degree) filter edge filter response to accumulate the correspo...
unsigned int mirroredAngleBins() const
Returns the additional angle bins of this accumulator.
Definition LineDetectorHough.h:941
void clear()
Clears the accumulation buffer.
unsigned int width() const
Returns the width of the original image in pixel.
Definition LineDetectorHough.h:916
Frame accumulatorFrame_
Array holding the individual votes.
Definition LineDetectorHough.h:514
void accumulate(const unsigned int x, const unsigned int y, const int8_t *responses, const unsigned int angleNeigbors=3u)
Adds a new horizontal and vertical edge filter response to accumulate the corresponding vote.
const DirectionLookupData * directionLookupTable_
Lookup table for direction data.
Definition LineDetectorHough.h:547
unsigned int accumulatorMirroredAngleBins_
Additional angle bins simplifying border operations.
Definition LineDetectorHough.h:523
const uint32_t * votes() const
Returns the vote buffer stored for this accumulator.
Definition LineDetectorHough.h:946
const unsigned int accumulatorImageWidth_
Width of the original image in pixel.
Definition LineDetectorHough.h:526
Accumulator(const unsigned int width, const unsigned int height, const unsigned int distanceBins, const unsigned int angleBins, const unsigned int mirroredAngleBins, const bool halfOrientationPrecision)
Creates a new vote element by the given precisions for distance and angle.
const unsigned int accumulatorImageWidthHalf_
Half width of the original image in pixel.
Definition LineDetectorHough.h:532
static void joinFour(Accumulator *accumulators, Worker *worker=nullptr)
Joins four accumulator objects.
static void join(Accumulator *accumulators, const unsigned int number, Worker *worker=nullptr)
Joins an arbitrary number of accumulator objects.
bool accumulatorHalfOrientationPrecision_
True, to handle flipped lines (e.g. with angle 45 deg and -135) as identical lines.
Definition LineDetectorHough.h:538
const unsigned int accumulatorImageHeightHalf_
Half height of the original image in pixel.
Definition LineDetectorHough.h:535
const AngleLookupData * angleLookupTableDiagonal_
Lookup table for angle data, diagonal.
Definition LineDetectorHough.h:544
unsigned int height() const
Returns the height of the original image in pixel.
Definition LineDetectorHough.h:921
static void join(Accumulator *accumulators, const unsigned int number, const unsigned int firstAngleBin, const unsigned int numberAngleBins)
Joins a subset of an arbitrary number of accumulator objects.
int accumulatorDistanceBinsHalf_
Half distance bins.
Definition LineDetectorHough.h:520
This class defines an infinite 2D line.
Definition LineDetectorHough.h:54
Scalar strength() const
Returns the strength of this line.
Definition LineDetectorHough.h:892
Scalar angle_
Line angle.
Definition LineDetectorHough.h:148
Vector2 normal_
Line normal.
Definition LineDetectorHough.h:145
bool isParallel(const InfiniteLine &line, const Scalar cosAngle) const
Returns whether two lines are parallel up to a given angle precision.
Scalar strength_
Line strength.
Definition LineDetectorHough.h:154
InfiniteLine()=default
Creates an empty line object.
Scalar angle() const
Returns the angle of this line.
Definition LineDetectorHough.h:882
Line2 cornerAlignedLine(const unsigned int width, const unsigned int height) const
Converts this line (with origin defined in the center of the frame) to a line with origin defined in ...
Definition LineDetectorHough.h:833
Scalar distance_
Line distance.
Definition LineDetectorHough.h:151
const Vector2 & normal() const
Returns the normal of this line.
Definition LineDetectorHough.h:877
bool isSimilar(const InfiniteLine &line, const Scalar distance, const Scalar cosAngle, const bool halfOrientationPrecision) const
Returns whether two lines are similar up to a given distance and angle precision.
static Lines2 cornerAlignedLines(const InfiniteLine *lines, const size_t size, const unsigned int width, const unsigned int height, Scalar *strengths=nullptr)
Converts lines (with origin defined in the center of the frame) to a lines with origin defined in the...
Definition LineDetectorHough.h:842
bool operator<(const InfiniteLine &second) const
Returns whether this line object has a lower strength value than the second one.
Definition LineDetectorHough.h:897
Scalar distance() const
Returns the distance of this line.
Definition LineDetectorHough.h:887
This class implements a line detector mainly based on the Hough transformation.
Definition LineDetectorHough.h:43
static void detectFiniteLinesSubset(const InfiniteLines *infiniteLines, const int8_t *response, const unsigned int width, const unsigned int height, const FilterResponse filterResponse, const unsigned int angleBins, const Accumulator::AngleLookupData *horizontalAngleLookup, const Accumulator::AngleLookupData *diagonalAngleLookup, const bool halfOrientationPrecision, Lock *lock, FiniteLines2 *finiteLines, const unsigned int firstLine, const unsigned int numberLines)
Detects finite lines from a subset of already detected infinite lines additionally using the frame fi...
static void optimizeInfiniteLinesSubset(const InfiniteLine *infiniteLines, const size_t number, const int8_t *response, const unsigned int width, const unsigned int height, const FilterResponse filterResponse, const unsigned int radius, const Accumulator *accumulator, const bool halfOrientationPrecision, InfiniteLine *optimizedLines, const unsigned int firstLine, const unsigned int numberLines)
Refines lines by adjusting the line with the filter responses.
std::vector< InfiniteLines > InfiniteLineGroups
Definition of a vector holding infinite lines.
Definition LineDetectorHough.h:165
FilterResponse
Definition of usage of different filter responses.
Definition LineDetectorHough.h:579
@ FR_DIAGONAL
Definition LineDetectorHough.h:585
@ FR_HORIZONTAL_VERTICAL_DIAGONAL
Horizontal, vertical (0 and 90 degrees) and diagonal (45 and 135 degrees).
Definition LineDetectorHough.h:587
@ FR_INVALID
Definition LineDetectorHough.h:581
@ FR_HORIZONTAL_VERTICAL
Definition LineDetectorHough.h:583
std::vector< IndexSet32 > IndexSetVector
Definition of a vector holding index sets.
Definition LineDetectorHough.h:558
static void detectFiniteLines(const InfiniteLine &infiniteLine, const int8_t *response, const unsigned int width, const unsigned int height, const FilterResponse filterResponse, const unsigned int angleBins, const Accumulator::AngleLookupData *horizontalAngleLookup, const Accumulator::AngleLookupData *diagonalAngleLookup, const bool halfOrientationPrecision, FiniteLines2 &finiteLines)
Detects finite lines from one infinite line additionally using the frame filter responses.
static void createVotesHorizontalVerticalDiagonalSubset(const int8_t *response, Accumulator *accumulator, const unsigned int angleNeigbors, const unsigned int voteThreshold, const unsigned int firstRow, const unsigned int numberRows)
Creates line votes for horizontal, vertical and diagonal (0, 90 and 45, 135 degree) filter responses ...
static bool detectLinesWithAdaptiveThreshold(const Frame &frame, const FilterType filterType, const FilterResponse filterResponse, InfiniteLines &infiniteLines, FiniteLines2 *finiteLines=nullptr, const bool optimizeLines=true, const Scalar adaptiveVoteThresholdFactor=Scalar(8), const unsigned int thresholdWindow=61u, const unsigned int voteThreshold=16, const unsigned int angleNeigbors=2u, const bool determineExactPeakMaximum=true, Worker *worker=nullptr, const unsigned int anglePrecision=360u, const unsigned int distancePrecision=(unsigned int)(-1), const bool halfOrientationPrecision=true, const Scalar similarDistance=Scalar(10), const Scalar similarAngle=Numeric::deg2rad(5))
Detects lines inside a given frame using an adaptive threshold in combination with a surrounding wind...
Definition LineDetectorHough.h:992
static void filterLines(const InfiniteLines &lines, const Scalar minDistance, const Scalar minAngle, InfiniteLines &filteredLines, const bool halfOrientationPrecision)
Filters a set of similar detected lines so that the strongest and unique lines are returned only.
static bool parallelLines(const InfiniteLines &lines, const Scalar minAngle, InfiniteLines ¶llels)
Filters the biggest set of parallel lines from a given set of lines.
static void sortLinesAccordingDistance(InfiniteLines &lines)
Sorts lines according to their distance values.
Definition LineDetectorHough.h:956
static bool compare(const IndexSet32 &first, const IndexSet32 &second)
Compares two index sets.
Definition LineDetectorHough.h:967
static void createVotesDiagonalSubset(const int8_t *response, Accumulator *accumulator, const unsigned int angleNeigbors, const unsigned int voteThreshold, const unsigned int firstRow, const unsigned int numberRows)
Creates line votes for diagonal (45 and 135 degree) filter responses inside a given accumulator objec...
static bool internalDetectLines(const Frame &frame, const FilterType filterType, const FilterResponse filterResponse, InfiniteLines &infiniteLines, FiniteLines2 *finiteLines, const bool optimizeLines, const Scalar thresholdParameter, const unsigned int adaptiveThresholdWindowHalf, const unsigned int voteThreshold, const unsigned int angleNeigbors, const bool determineExactPeakMaximum, Worker *worker, const unsigned int anglePrecision, const unsigned int distancePrecision, const bool halfOrientationPrecision, const Scalar similarDistance, const Scalar similarAngle)
Internal line detection function to detects lines inside an 8 bit gray scale image.
static bool detectLines(const Frame &frame, const FilterType filterType, const FilterResponse filterResponse, InfiniteLines &infiniteLines, FiniteLines2 *finiteLines=nullptr, const bool optimizeLines=true, const unsigned int accumulatorThreshold=100u, const unsigned int voteThreshold=16u, const unsigned int angleNeigbors=2u, const bool determineExactPeakMaximum=true, Worker *worker=nullptr, const unsigned int anglePrecision=360u, const unsigned int distancePrecision=(unsigned int)(-1), const bool halfOrientationPrecision=true, const Scalar similarDistance=Scalar(10), const Scalar similarAngle=Numeric::deg2rad(5))
Detects lines inside a given frame using a threshold ensuring that detected lines have a specific str...
Definition LineDetectorHough.h:983
static bool compareElements(const std::vector< T > &first, const std::vector< T > &second)
Compares to groups of elements according to their size.
Definition LineDetectorHough.h:978
static void sortGroupsDescendingAccordingElements(std::vector< std::vector< T > > &groups)
Sorts groups of elements (of e.g., infinite lines) according to their number of elements in descendin...
Definition LineDetectorHough.h:962
std::vector< InfiniteLine > InfiniteLines
Definition of a vector holding infinite lines.
Definition LineDetectorHough.h:160
FilterType
Definition of different edge detector filters.
Definition LineDetectorHough.h:566
@ FT_SOBEL
Definition LineDetectorHough.h:572
@ FT_INVALID
Definition LineDetectorHough.h:568
@ FT_SCHARR
Definition LineDetectorHough.h:570
static bool compareDistance(const InfiniteLine &first, const InfiniteLine &second)
Compares to lines according to their distance.
Definition LineDetectorHough.h:972
static void createVotesHorizontalVerticalSubset(const int8_t *response, Accumulator *accumulator, const unsigned int angleNeigbors, const unsigned int voteThreshold, const unsigned int firstRow, const unsigned int numberRows)
Creates line votes for horizontal and vertical (0 and 90 degree) filter responses inside a given accu...
static void parallelLines(const InfiniteLines &lines, const Scalar maxAngle, InfiniteLineGroups ¶llelGroups, const unsigned int minimalSetSize=0u, const bool noDuplicates=true)
Separates given lines in sets of almost parallel lines.
This class implements Ocean's image class.
Definition Frame.h:1969
const VectorT2< Scalar > & point() const
const VectorT2< Scalar > & direction() const
This class implements a recursive lock object.
Definition Lock.h:31
static constexpr Scalar deg2rad(const Scalar deg)
static constexpr bool isInsideRange(const Scalar lower, const Scalar value, const Scalar upper, const Scalar epsilon=NumericT< Scalar >::eps())
static constexpr Scalar pi()
static constexpr Scalar eps()
static bool isEqual(const Scalar first, const Scalar second)
This class implements houg-transformation-based line detector tests.
Definition TestLineDetectorHough.h:34
This class implements a worker able to distribute function calls over different threads.
Definition Worker.h:33
std::set< Index32 > IndexSet32
Definition of a set holding 32 bit indices.
Definition Base.h:114
LineT2< Scalar > Line2
Definition of the Line2 object, depending on the OCEAN_MATH_USE_SINGLE_PRECISION either with single o...
Definition Line2.h:28
VectorT2< Scalar > Vector2
Definition of a 2D vector.
Definition Vector2.h:28
std::vector< FiniteLine2 > FiniteLines2
Definition of a vector holding FiniteLine2 objects.
Definition FiniteLine2.h:57
std::vector< Line2 > Lines2
Definition of a vector holding Line2 objects.
Definition Line2.h:57
float Scalar
Definition of a scalar type.
Definition Math.h:129
Namespace of the CV library.
Definition Advanced.h:17
Namespace of the CV Test library.
Definition LineDetectorHough.h:28
Namespace of the Test library.
Definition LineDetectorHough.h:28
The namespace covering the entire Ocean framework.
Definition Accessor.h:15