How to access pixels along a line or curve using opencv?
Hi all, is any method to access pixels along a line or curve in opencv???
for a straight line between 2 points, there's the LineIterator.
unfortunately it does not work with curves or arbitrary shapes, you might try findContours to get an array of waypoints
If you would like to access pixels on a curve, you could basically store the coördinates first by create a binary image of your image versus the line, using lineiterator to go over each row or column and storing the coördinates of each point that has a 1 value.
Asked: 2013-05-16 11:21:15 -0600
Seen: 11,087 times
Last updated: May 16 '13