I am trying to draw a bounding box around the white blob in the image below:
Pseduo -
assuming top left of image as (0,0)
(smallestX,smallestY)-----------------(largestX,smallestY)
| |
| |
| |
| |
(smallestX,largestY)------------------(largestX,largestY)
And for finding minimum/maximum values and indices.
[r,c]=find(img==min(min(img)))
[r,c]=find(img==max(max(img)))
r,c represent row and column in the img matrix.