how to continously read data
Moved
Unsolved
General and Desktop
-
actually i want to draw polyline example code is ther but how to data ia apply in list and how to call this polyline fucnction.
void polylines(cv::Mat& img, const std::list<std::listcv::Point2i>& polylines)
{
for (auto& polyline : polylines)
{
auto current = polyline.begin();
auto next = std::next(current, 1);
for (; next != polyline.end(); current++, next++)
{
cv::line(img, *current, *next, cv::Scalar(255));
}
}
} -
Hi,
From the looks of it, this has nothing to do with Qt. You should ask that on the OpenCV forum.
-
Hi
Try this
http://breckon.eu/toby/teaching/dip/practicals/ia/polygons.cppThe trick being
const cv::Point *pts = (const cv::Point*) Mat(contour).data; // convert from vector to plain c array int npts = Mat(contour).rows; polylines(img, &pts,&npts, 1, true, // draw closed contour (i.e. joint end to start) Scalar(0,255,0),// colour RGB ordering (here = green) 3, // line thickness CV_AA, 0);