How to fix points index when make some polygon
-
wrote on 25 Jul 2022, 05:20 last edited by donkey007
hi, i have some question if you can answer plz help me!
when i draw polygon using qt creator and opencv
the points index cahnged every timei want to get fixed points index like fixed bottom side of a polygon index
for example)
(1) at first draw
bottom side of a polygon == cv::line(frame, cv::Point(box.at(1).x(),box.at(1).y()), cv::Point(box.at(2).x(), box.at(2).y()),......);
(2) at second draw
bottom side of a polygon == cv::line(frame, cv::Point(box.at(2).x(),box.at(2).y()), cv::Point(box.at(3).x(), box.at(3).y()),......);first draw index and second draw index are not the same
how can i get fixed points index?
if you know, let me know
thanks -
Hi,
That's an OpenCV question and you should bring that to their forum.
What your code does not show is how you manage that box variable and whether its content changes between your cv::line calls.
1/2