I was looking at Opencv Java documentation of Hough Transform.
The return value lines
is in a Mat
data type described as:
Output vector of lines. Each line is represented by a two-element vector (rho, theta). rho is the distance from the coordinate origin (0,0) (top-left corner of the image). theta is the line rotation angle in radians (0 ~ vertical line, pi/2 ~ horizontal line).
Curiously, this description matches the C++ interface's description, but the data type not: in C++ you can use a std::vector<cv::Vec2f> lines
as described in this tutorial. In C++ the returned data representation, given the description, is straightforward, but in Java not.
So, in Java, how are the two-element vector represented/stored in the returned Mat?