8 #ifndef META_OCEAN_CV_DETECTOR_UTILITIES_H
9 #define META_OCEAN_CV_DETECTOR_UTILITIES_H
45 static void paintLines(
Frame& frame,
const FiniteLines2& finiteLines,
const unsigned char* foregroundColor,
const unsigned char* backgroundColor =
nullptr);
137 static Frame visualizeShapeAlignment(
const Frame& frame,
unsigned int rectifiedWidth,
unsigned int rectifiedHeight,
const SquareMatrix3& frame_H_rectified,
const std::vector<const ShapeDetector::TwoLineShape*>& shapeReferences,
const std::vector<const ShapeDetector::TwoLineShape*>& shapeCandidates,
const Vector2& referenceShapesOffset =
Vector2(0, 0),
const Vector2& candidateShapesOffset =
Vector2(0, 0));
This class implements the base class for all shapes based on two lines.
Definition: ShapeDetector.h:44
std::vector< LShape > LShapes
Definition of a vector holding L-shape objects.
Definition: ShapeDetector.h:369
std::vector< TShape > TShapes
Definition of a vector holding T-shape objects.
Definition: ShapeDetector.h:374
std::vector< XShape > XShapes
Definition of a vector holding X-shape objects.
Definition: ShapeDetector.h:379
std::vector< IndexedRectangle > IndexedRectangles
Definition of a vector holding rectangles.
Definition: ShapeDetector.h:389
This class is a collection of detector-related utitility functions.
Definition: cv/detector/Utilities.h:35
static void paintShapes(Frame &frame, const ShapeDetector::LShapes &lShapes, const ShapeDetector::TShapes &tShapes, const ShapeDetector::XShapes &xShapes, const Scalar length, const bool drawBackground=false, const Vector2 &offset=Vector2(0, 0), const uint8_t *foregroundColor=nullptr)
Draws shapes into an image.
static void paintTShapes(Frame &frame, const ShapeDetector::TShapes &tShapes, const Scalar length, const unsigned char *foregroundColor, const unsigned char *backgroundColor=nullptr, const Vector2 &offset=Vector2(0, 0))
Draws T-shapes into an image.
static void paintLines(Frame &frame, const FiniteLines2 &finiteLines, const unsigned char *foregroundColor, const unsigned char *backgroundColor=nullptr)
Draws finite lines into an image.
static void paintXShapes(Frame &frame, const ShapeDetector::XShapes &xShapes, const Scalar length, const unsigned char *foregroundColor, const unsigned char *backgroundColor=nullptr, const Vector2 &offset=Vector2(0, 0))
Draws X-shapes into an image.
static void paintLShapes(Frame &frame, const FiniteLines2 &finiteLines, const ShapeDetector::LShapes &lShapes, const unsigned char *foregroundColor, const unsigned char *backgroundColor=nullptr)
Draws L-shapes into an image.
static void paintShapes(Frame &frame, const ShapeDetector::TwoLineShape *const *shapes, size_t size, const Scalar length, const bool drawBackground=false, const Vector2 &offset=Vector2(0, 0), const uint8_t *foregroundColor=nullptr)
Draws shapes into an image.
static Frame visualizeShapeAlignment(const Frame &frame, unsigned int rectifiedWidth, unsigned int rectifiedHeight, const SquareMatrix3 &frame_H_rectified, const std::vector< const ShapeDetector::TwoLineShape * > &shapeReferences, const std::vector< const ShapeDetector::TwoLineShape * > &shapeCandidates, const Vector2 &referenceShapesOffset=Vector2(0, 0), const Vector2 &candidateShapesOffset=Vector2(0, 0))
Visualizes the alignment between two sets of shapes (reference shapes and candidate shapes).
static void paintLShapes(Frame &frame, const ShapeDetector::LShapes &lShapes, const Scalar length, const unsigned char *foregroundColor, const unsigned char *backgroundColor=nullptr, const Vector2 &offset=Vector2(0, 0))
Draws L-shapes into an image.
static void paintRectangles(Frame &frame, const ShapeDetector::LShapes &lShapes, const ShapeDetector::IndexedRectangles &rectangles, const unsigned char *foregroundColor, const unsigned char *backgroundColor=nullptr)
Draws rectangles into an image.
This class implements Ocean's image class.
Definition: Frame.h:1792
float Scalar
Definition of a scalar type.
Definition: Math.h:128
std::vector< FiniteLine2 > FiniteLines2
Definition of a vector holding FiniteLine2 objects.
Definition: FiniteLine2.h:57
VectorT2< Scalar > Vector2
Definition of a 2D vector.
Definition: Vector2.h:21
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15