24 #ifndef CONNECTEDCOMPONENTS_H
25 #define CONNECTEDCOMPONENTS_H
43 enum ALVAR_EXPORT LabelingMethod { CVSEQ };
52 int thresh_param1, thresh_param2;
92 virtual void LabelSquares(cv::Mat &image,
bool visualize =
false) = 0;
94 bool CheckBorder(
const std::vector<cv::Point> &contour,
int width,
int height);
97 SetThreshParams(
int param1,
int param2)
99 thresh_param1 = param1;
100 thresh_param2 = param2;
113 bool detect_pose_grayscale;
119 void SetOptions(
bool _detect_pose_grayscale =
false);
124 std::vector<std::vector<cv::Point>> LabelImage(cv::Mat &image,
int min_size,
bool approx =
false);
This file defines library export definitions, version numbers and build information.
This file implements a camera used for projecting points and computing homographies.
This file implements a parametrized line.
This file implements generic utility functions and a serialization interface.
Simple Camera class for calculating distortions, orientation or projections with pre-calibrated camer...
Labeling class that uses OpenCV routines to find connected components.
void LabelSquares(cv::Mat &image, bool visualize=false)
Labels image and filters blobs to obtain square-shaped objects from the scene.
Base class for labeling connected components from binary image.
cv::Mat gray
Pointer to grayscale image that is thresholded for labeling.
virtual void LabelSquares(cv::Mat &image, bool visualize=false)=0
Labels image and filters blobs to obtain square-shaped objects from the scene.
void SetCamera(Camera *camera)
Sets the camera object that is used to correct lens distortions.
cv::Mat bw
Pointer to binary image that is then labeled.
ThresholdMethod
Two alternatives for thresholding the gray image. ADAPT (adaptive threshold) is only supported curren...
std::vector< std::vector< PointDouble > > blob_corners
Vector of 4-length vectors where the corners of detected blobs are stored.