I have a matrix containing 1s and 0s. The elements of this matrix are pixels of an image, where 1&0 represents black and white. The 1s form non-intersecting line segmennts. I want to know pixel coordinates of line edges. Following is an example matrix-
binaryImage= [0 1 0 0;... 0 0 1 0; ... 0 0 0 1; ... 0 0 0 0]
The desired output is-
[1, 2], [3, 4]
Note that there could be multiple line segments. Is Hough transform useful here?
Thanks
——————–
Update: I am also attaching another example matrix and corrosponding `imagesc` for better visualization of problem.
Best Answer