I want to identify or locate the coordinates of the multi-colored blob present on the white background i.e. (255) as shown in the figure.
For this purpose, I want to scan the attached image image both horizontally and vertically. Scanning should stop and display the coordinates where it finds the pixels value other than 0. The same procedure should be continued for whole image to identify all the coordinates having values other than 255.
I have tried to code it but unable to do so. Code is attached for your reference.
[height, width, plane] = size(I);
Coordinates = zeros(height,width);
I have attached the two images for your reference. Image1 is manually described multi-colored blob with rectangle. And Image2 is the originlal image.
Any help is much appreciated. Thank you!!!