Pseduo -
- Choose the largest y, the largest x, the smallest x, the smallest y in the blob. That is, the points on the blob. These are your coordinates that you can use to create a bounding box.
Assuming the top left corner of the image is (0,0)
(smallestX,smallestY)-----------------(largestX,smallestY)
| |
| |
| |
| |
(smallestX,largestY)------------------(largestX,largestY)
And to find the minimum / maximum values and indices.
[r,c]=find(img==min(min(img)))
[r,c]=find(img==max(max(img)))
r, c img.
- , .
- , .


user349026