Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to fix points index when make some polygon
Forum Updated to NodeBB v4.3 + New Features

How to fix points index when make some polygon

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 171 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    donkey007
    wrote on last edited by donkey007
    #1

    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 time

    i 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

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved