根据https://docs.opencv.org/3.4.0/d1/dd7/structcv_1_1line__descriptor_1_1KeyLine.html,它应该在line_descriptor.cpp
和line_descriptor.hpp
中定义,但我似乎无法在那里找到它。谁知道声明和定义在哪里?
答案 0 :(得分:0)
KeyLine
的定义和声明都在descriptor.hpp
第102行,see by yourself
struct CV_EXPORTS KeyLine
{
public:
/** orientation of the line */
float angle;
/** object ID, that can be used to cluster keylines by the line they represent */
int class_id;
/** octave (pyramid layer), from which the keyline has been extracted */
int octave;
/** coordinates of the middlepoint */
Point2f pt;
/** the response, by which the strongest keylines have been selected.
It's represented by the ratio between line's length and maximum between
image's width and height */
float response;
/** minimum area containing line */
float size;
/** lines's extremes in original image */
float startPointX;
float startPointY;
float endPointX;
float endPointY;
/** line's extremes in image it was extracted from */
float sPointInOctaveX;
float sPointInOctaveY;
float ePointInOctaveX;
float ePointInOctaveY;
/** the length of line */
float lineLength;
/** number of pixels covered by the line */
int numOfPixels;
/** Returns the start point of the line in the original image */
Point2f getStartPoint() const
{
return Point2f(startPointX, startPointY);
}
/** Returns the end point of the line in the original image */
Point2f getEndPoint() const
{
return Point2f(endPointX, endPointY);
}
/** Returns the start point of the line in the octave it was extracted from */
Point2f getStartPointInOctave() const
{
return Point2f(sPointInOctaveX, sPointInOctaveY);
}
/** Returns the end point of the line in the octave it was extracted from */
Point2f getEndPointInOctave() const
{
return Point2f(ePointInOctaveX, ePointInOctaveY);
}
/** constructor */
KeyLine()
{
}
};
另外我不清楚为什么你认为它应该在line_descriptor.cpp
或line_descriptor.hpp