Obtain a 1D line of pixels from one point to another point in a 2D Image?
I have a normal 2D image and I wish to obtain a 1D line of pixels from point x1,y1 to point x2,y2, I want the line sequence of pixels between these two points in a Mat, how can I do this? The start and end points could be any point in the image, so if this line is not exactly horizontal or vertical then some sampling must be done? Can someone suggest how to do this, is there an OpenCV way?
I am using OpenCV Java 3.0
do you want to find lines ? do you want to draw something ?
To have pixel value it's here
Hi, I updated the question to clarify " have a normal 2D image and I wish to obtain a 1D line of pixels from point x1,y1 to point x2,y2, I want the line sequence of pixels between these two points in a Mat, how can I do this?"