What is the way to find the coordinates of each pixel of the inner circle (or the outer one) in the following Image using programming(openCV or MATLAB)?
imtool gives this information but it is mouse driven.
Update
I used imtool to detect these locations, by putting my mouse cursor on each point on the circle and manual noting this value. But how do I do it using programming as manually I cant do it for so many pints on the circle.
In terms of coordinates, a pixel can be identified by a pair of integers giving the column number and the row number. For example, the pixel with coordinates (3,5) would lie in column number 3 and row number 5. Conventionally, columns are numbered from left to right, starting with zero.
The pixel coordinate is a number that identifies the location of a pixel in the image array.
In Matlab, you can just do:
im = imread('im.png'); %# load image
[y,x] = find(all(im<5, 3)); %# find black pixels
position = [x,y]; %# display them
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With