Using C++ / OpenCV I\'ve drawn a line on an image using cv::line and now I\'m trying to extract an array of its coordinates. I\'ve tried assigning the line to <
You can see this answer. I presume this is what your question needs, Finding points in a line.
Opencv has Line Iterator function. Go through the documentation!
Here is a sample usage!
LineIterator it(img, pt1, pt2, 8);
for(int i = 0; i < it.count; i++, ++it)
{
Point pt= it.pos();
//Draw Some stuff using that Point pt
}