How to fit rectangles on blobs on binary image

I have this binary image:
I need to find 2 rectangles that fit around the two blobs as best as possible. What's the best method to apply?
Thanks for any help!

 Respuesta aceptada

Image Analyst
Image Analyst el 7 de En. de 2021

0 votos

John D'Errico's function will give you the minimal bounding rectangle, even if it would be tilted:
regionprops() will only give you bounding boxes that are aligned with the edges of the image.

Más respuestas (1)

Categorías

Más información sobre Images en Centro de ayuda y File Exchange.

Preguntada:

el 7 de En. de 2021

Respondida:

el 7 de En. de 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by