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???
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,351 times
Last updated: May 16 '13
Extracting a vector of pixel values across multiple frames
Reading pixel values from a frame of a video
How to operate on each pixel of a cv2.cv.Mat with a 3 x 3 matrix?
Accessing pixel value always return same value
extract a vector of pixels from a frame