Version: 9.12.0
ShapeRec_FeatureDetector Class Reference

#include <ShapeRec_FeatureDetector.hxx>

Public Types

typedef std::vector< cv::Point > CvContour
 
typedef std::vector< std::vector< cv::Point > > CvContoursArray
 

Public Member Functions

 ShapeRec_FeatureDetector ()
 
void SetPath (const std::string &)
 
void SetROI (const QRect &)
 
CvPoint2D32f * GetCorners ()
 
CvContoursArray GetContours ()
 
std::vector< cv::Vec4i > GetLines ()
 
std::vector< cv::Vec4i > GetContoursHierarchy ()
 
int GetCornerCount ()
 
int GetImgHeight ()
 
int GetImgWidth ()
 
std::string CroppImage ()
 
void ComputeCorners (bool useROI=false, ShapeRec_Parameters *parameters=0)
 
bool ComputeLines ()
 
bool ComputeContours (bool useROI=false, ShapeRec_Parameters *parameters=0)
 

Private Attributes

std::string imagePath
 
CvPoint2D32f * corners
 
int cornerCount
 
CvContoursArray contours
 
std::vector< cv::Vec4i > hierarchy
 
std::vector< cv::Vec4i > lines
 
int imgHeight
 
int imgWidth
 
CvRect rect
 

Member Typedef Documentation

◆ CvContour

typedef std::vector<cv::Point> ShapeRec_FeatureDetector::CvContour

◆ CvContoursArray

typedef std::vector<std::vector<cv::Point> > ShapeRec_FeatureDetector::CvContoursArray

Constructor & Destructor Documentation

◆ ShapeRec_FeatureDetector()

ShapeRec_FeatureDetector::ShapeRec_FeatureDetector ( )

Constructor

Parameters
theFilename- image to process

References cornerCount, imagePath, imgHeight, imgWidth, and rect.

Member Function Documentation

◆ ComputeContours()

◆ ComputeCorners()

◆ ComputeLines()

bool ShapeRec_FeatureDetector::ComputeLines ( )

Computes the lines in the image located at imagePath

References imagePath, and lines.

◆ CroppImage()

std::string ShapeRec_FeatureDetector::CroppImage ( )

Crops the image located at imagePath to the region of interest given by the user via SetROI and stores the result in /tmp

Parameters
theRect- Region Of Interest of the image located at imagePath

References imagePath, and rect.

◆ GetContours()

CvContoursArray ShapeRec_FeatureDetector::GetContours ( )
inline

◆ GetContoursHierarchy()

std::vector<cv::Vec4i> ShapeRec_FeatureDetector::GetContoursHierarchy ( )
inline

◆ GetCornerCount()

int ShapeRec_FeatureDetector::GetCornerCount ( )
inline

◆ GetCorners()

CvPoint2D32f* ShapeRec_FeatureDetector::GetCorners ( )
inline

◆ GetImgHeight()

int ShapeRec_FeatureDetector::GetImgHeight ( )
inline

◆ GetImgWidth()

int ShapeRec_FeatureDetector::GetImgWidth ( )
inline

◆ GetLines()

std::vector<cv::Vec4i> ShapeRec_FeatureDetector::GetLines ( )
inline

◆ SetPath()

void ShapeRec_FeatureDetector::SetPath ( const std::string &  thePath)

Sets the path of the image file to be processed

Parameters
thePath- Location of the image file

References imagePath, imgHeight, and imgWidth.

◆ SetROI()

void ShapeRec_FeatureDetector::SetROI ( const QRect &  theRect)

Stores a region of interest given by user in rect

Parameters
theRect- Region Of Interest of the image located at imagePath

References rect.

Member Data Documentation

◆ contours

CvContoursArray ShapeRec_FeatureDetector::contours
private

◆ cornerCount

int ShapeRec_FeatureDetector::cornerCount
private

◆ corners

CvPoint2D32f* ShapeRec_FeatureDetector::corners
private

◆ hierarchy

std::vector<cv::Vec4i> ShapeRec_FeatureDetector::hierarchy
private

◆ imagePath

std::string ShapeRec_FeatureDetector::imagePath
private

◆ imgHeight

int ShapeRec_FeatureDetector::imgHeight
private

◆ imgWidth

int ShapeRec_FeatureDetector::imgWidth
private

◆ lines

std::vector<cv::Vec4i> ShapeRec_FeatureDetector::lines
private

◆ rect

CvRect ShapeRec_FeatureDetector::rect
private

The documentation for this class was generated from the following files: