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

how to continously read data

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 620 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 27 Jan 2017, 11:05 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
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 27 Jan 2017, 11:13 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
      • M Offline
        M Offline
        mrjj
        Lifetime Qt Champion
        wrote on 27 Jan 2017, 11:20 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

        3/3

        27 Jan 2017, 11:20

        • Login

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