I have this image and need to find the coordinates of a pixel nonzero of the points marked in red in image.
I thied this but but the result wasn't the expected.
[rows1 columns1]=size(lefthalf)
topleft=lefthalf(1:rows1/2,:);
[Ptrx Ptry]=find(topleft==1,1,'first')
To point 1 - By scanning each vertical line from the left image border to the half of image width in horizontal direction, find the coordinates of the farthest-left non-zero pixel.
To point 2 - From the image top to bottom, by searching each horizontal line from 1(x) toward right, find the coordinate of the first met non-zero pixel.
Thank's