I have two corner points (I marked them in red so you can see it) in black and white image. I want to find coordinates of the points automatically without using 'ginput'.
I used the 'bwlabel' and 'regionprops' functions to crop an original image to find my region of interest (ROI).
im = imread('LA_shape1.jpg'); LA = im2bw(im, graythresh(im)); [Clab num] = bwlabel(LA); props = regionprops(Clab); LABox = imcrop(LA,[props.BoundingBox]); figure; imshow(LABox);
Here is the result after cropping:
Is there any one who can kindly help me to find the coordinates of two corner points without using ginput? Thanks so much!
Best Answer