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 150 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 25 Jul 2022, 05:20 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
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 26 Jul 2022, 20:12 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

      1/2

      25 Jul 2022, 05:20

      • Login

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