Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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

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

Constructor & Destructor Documentation

ShapeRec_FeatureDetector::ShapeRec_FeatureDetector ( )

Constructor

Parameters
theFilename- image to process

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

Member Function Documentation

bool ShapeRec_FeatureDetector::ComputeContours ( bool  useROI = false,
ShapeRec_Parameters parameters = 0 
)
bool ShapeRec_FeatureDetector::ComputeLines ( )

Computes the lines in the image located at imagePath

References imagePath, and lines.

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, NULL, and rect.

CvContoursArray ShapeRec_FeatureDetector::GetContours ( )
inline
std::vector<cv::Vec4i> ShapeRec_FeatureDetector::GetContoursHierarchy ( )
inline
int ShapeRec_FeatureDetector::GetCornerCount ( )
inline
CvPoint2D32f* ShapeRec_FeatureDetector::GetCorners ( )
inline
int ShapeRec_FeatureDetector::GetImgHeight ( )
inline
int ShapeRec_FeatureDetector::GetImgWidth ( )
inline
std::vector<cv::Vec4i> ShapeRec_FeatureDetector::GetLines ( )
inline
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.

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

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

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