Marking rectangles on images automatically
Show older comments
Hi,
I am trying to write a code that would allow me to detect rectangles with a certain area automatically in an image.
For example, the code should allow me to detect the reactangle like the one shown in the image attached rather than manually drawing it using roipoly() or a function of the same kind. The area is such that there is no break or black area in the image.
Kindly let me know if there is more details if required
Thank you

7 Comments
Image Analyst
on 25 Jun 2019
Nope - we don't require any more details on this announcement. Sounds like you have an interesting project. Good luck though. If you need any help, ask a question. By the way, someone brought it up to John D'Errico since it's kind of the inverse of his minimum bounding box File Exchange submissions and he said it sounded kind of tough or involved. Good luck though. Do you have a professor guiding you? Or is this supposed to be all your own ideas, code, and invention?
Yash Mayuresh Kavi
on 25 Jun 2019
Image Analyst
on 26 Jun 2019
That won't get you the maximum box - the box that fits inside with the max area. I don't know of any clever way to do it quickly. One way would be to use a dumb, brute force way but it would be very slow.
Yash Mayuresh Kavi
on 26 Jun 2019
Image Analyst
on 26 Jun 2019
Why do you need it? Ot think you need it?
You could use bwdist() but that will just get you the largest circle than can fit.
KALYAN ACHARJYA
on 1 Jul 2019
Edited: KALYAN ACHARJYA
on 1 Jul 2019
@Yash
The Question is:
Draw the ractangle with maximum possible area in gray shaded region only?
Am I right?
Can you share more 2-3 sample images, actually I am interested to look on minimum width of black strip?
Yash Mayuresh Kavi
on 2 Jul 2019
Edited: Yash Mayuresh Kavi
on 2 Jul 2019
Answers (0)
Categories
Find more on Image Arithmetic in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!