Detects Lines in a binary image. The result is a binary image containing all line elements (pixel accurate) as well as all lines as vectors. It is also possible to filter lines according a specified angle.  
 More...
#include <LineTrace.h>
 | 
| static void  | generateLineImage (const QVector< rdf::Line > &hline, const QVector< rdf::Line > &vline, cv::Mat &img, cv::Scalar hCol=cv::Scalar(255), cv::Scalar vCol=cv::Scalar(255), cv::Point2d offset=cv::Point(0, 0)) | 
|   | 
Detects Lines in a binary image. The result is a binary image containing all line elements (pixel accurate) as well as all lines as vectors. It is also possible to filter lines according a specified angle. 
- See also
 - Module
 
 
      
        
          | rdf::LineTrace::LineTrace  | 
          ( | 
          const cv::Mat &  | 
          img,  | 
        
        
           | 
           | 
          const cv::Mat &  | 
          mask = cv::Mat()  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Initializes a new instance of the LineTrace class. 
- Parameters
 - 
  
    | img | The binary input image. | 
    | mask | The mask image. | 
  
   
 
 
  
  
      
        
          | bool rdf::LineTrace::checkInput  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
overrideprotectedvirtual   | 
  
 
checks if all input images are in the specified format. 
Implements rdf::Module.
 
 
  
  
      
        
          | bool rdf::LineTrace::compute  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
overridevirtual   | 
  
 
Computes the binary line image as will as the line vectors. 
- Returns
 - True if the lines are computed successfully.
 
Implements rdf::Module.
 
 
      
        
          | cv::Mat rdf::LineTrace::generatedLineImage  | 
          ( | 
           | ) | 
           const | 
        
      
 
Generates the line image based on the synthetic line vector. 
- Returns
 - A binary CV_8UC1 image where all line vectors are drawn.
 
 
 
  
  
      
        
          | void rdf::LineTrace::generateLineImage  | 
          ( | 
          const QVector< rdf::Line > &  | 
          hline,  | 
         
        
           | 
           | 
          const QVector< rdf::Line > &  | 
          vline,  | 
         
        
           | 
           | 
          cv::Mat &  | 
          img,  | 
         
        
           | 
           | 
          cv::Scalar  | 
          hCol = cv::Scalar(255),  | 
         
        
           | 
           | 
          cv::Scalar  | 
          vCol = cv::Scalar(255),  | 
         
        
           | 
           | 
          cv::Point2d  | 
          offset = cv::Point(0,0)  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
 
      
        
          | QVector< rdf::Line > rdf::LineTrace::getHLines  | 
          ( | 
           | ) | 
           const | 
        
      
 
Gets the horizontal lines. 
- Returns
 - A line vector containing all horizontal lines
 
 
 
      
        
          | QVector< rdf::Line > rdf::LineTrace::getLines  | 
          ( | 
           | ) | 
           const | 
        
      
 
 
      
        
          | QVector< rdf::Line > rdf::LineTrace::getVLines  | 
          ( | 
           | ) | 
           const | 
        
      
 
Gets the vertical lines. 
- Returns
 - A line vector containing all vertical lines
 
 
 
  
  
      
        
          | bool rdf::LineTrace::isEmpty  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
overridevirtual   | 
  
 
Determines whether this instance is empty. 
- Returns
 - True if src image and mask is empty.
 
Implements rdf::Module.
 
 
      
        
          | cv::Mat rdf::LineTrace::lineImage  | 
          ( | 
           | ) | 
           const | 
        
      
 
Returns the line image. 
- Returns
 - A binary CV_8UC1 image containing the lines.
 
 
 
      
        
          | void rdf::LineTrace::resetAngle  | 
          ( | 
           | ) | 
           | 
        
      
 
Resets the angle which defines horizontal. 
 
 
      
        
          | void rdf::LineTrace::setAngle  | 
          ( | 
          double  | 
          angle = std::numeric_limits<double>::infinity() | ) | 
           | 
        
      
 
Sets the angle to filter the lines horizontally and vertically. 
- Parameters
 - 
  
    | angle | The angle to define a horizontal line. | 
  
   
 
 
  
  
      
        
          | QString rdf::LineTrace::toString  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
overridevirtual   | 
  
 
Summary of the class. 
- Returns
 - A String containing all parameter values.
 
Reimplemented from rdf::Module.
 
 
  
  
      
        
          | cv::Mat rdf::LineTrace::mLineImg | 
         
       
   | 
  
protected   | 
  
 
 
  
  
      
        
          | cv::Mat rdf::LineTrace::mMask | 
         
       
   | 
  
protected   | 
  
 
 
  
  
      
        
          | cv::Mat rdf::LineTrace::mSrcImg | 
         
       
   | 
  
protected   | 
  
 
 
The documentation for this class was generated from the following files: