ReadFramework
lsd::KeyLine Struct Reference

A class to represent a line. More...

#include <LSDDetector.h>

Public Member Functions

cv::Point2f getStartPoint () const
 
cv::Point2f getEndPoint () const
 
cv::Point2f getStartPointInOctave () const
 
cv::Point2f getEndPointInOctave () const
 
 KeyLine ()
 

Public Attributes

float angle
 
int class_id
 
int octave
 
cv::Point2f pt
 
float response
 
float size
 
float startPointX
 
float startPointY
 
float endPointX
 
float endPointY
 
float sPointInOctaveX
 
float sPointInOctaveY
 
float ePointInOctaveX
 
float ePointInOctaveY
 
float lineLength
 
int numOfPixels
 

Detailed Description

A class to represent a line.

As aformentioned, it is been necessary to design a class that fully stores the information needed to characterize completely a line and plot it on image it was extracted from, when required.

KeyLine* class has been created for such goal; it is mainly inspired to Feature2d's KeyPoint class, since KeyLine shares some of KeyPoint's fields, even if a part of them assumes a different meaning, when speaking about lines. In particular:

  • the class_id field is used to gather lines extracted from different octaves which refer to same line inside original image (such lines and the one they represent in original image share the same class_id value)
  • the angle field represents line's slope with respect to (positive) X axis
  • the pt field represents line's midpoint
  • the response field is computed as the ratio between the line's length and maximum between image's width and height
  • the size field is the area of the smallest rectangle containing line

Apart from fields inspired to KeyPoint class, KeyLines stores information about extremes of line in original image and in octave it was extracted from, about line's length and number of pixels it covers.


The documentation for this struct was generated from the following file: