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 continously read data
Forum Updated to NodeBB v4.3 + New Features

how to continously read data

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

    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));
    }
    }
    }

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

      Hi,

      From the looks of it, this has nothing to do with Qt. You should ask that on the OpenCV forum.

      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
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi
        Try this
        http://breckon.eu/toby/teaching/dip/practicals/ia/polygons.cpp

        The 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);
        
        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