Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. polyline in opencv

polyline in opencv

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
2 Posts 2 Posters 828 Views
  • 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.
  • R Offline
    R Offline
    Rameshguru
    wrote on last edited by
    #1

    how to draw polyline?
    actually poly function contain (&Mat,Pts,npts etc...)

    how to set pts and npts values?
    i tried but error:cv mat to cv arr
    and then i don't know about the these arguments
    finally i got pixel position in image but how to connect and draw polyline?
    here i have attached example code but i can't understand
    and idon,t know about how to set arguments in list

    example code::
    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));
    }
    }
    }

    fi

    jsulmJ 1 Reply Last reply
    0
    • R Rameshguru

      how to draw polyline?
      actually poly function contain (&Mat,Pts,npts etc...)

      how to set pts and npts values?
      i tried but error:cv mat to cv arr
      and then i don't know about the these arguments
      finally i got pixel position in image but how to connect and draw polyline?
      here i have attached example code but i can't understand
      and idon,t know about how to set arguments in list

      example code::
      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));
      }
      }
      }

      fi

      jsulmJ Online
      jsulmJ Online
      jsulm
      Lifetime Qt Champion
      wrote on last edited by jsulm
      #2

      @Rameshguru Why do you ask OpenCV questions in a Qt forum?
      It would make more sense to ask in an OpenCV forum/mailing list.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1

      • Login

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