Maximum Inscribed Circle Problem

Hi, I have set of points and set of lines, as can be seen in the figure below.
I need to obtain the LARGEST inscribed circle in any of the regions which can be seen in the figure. I tried to discretize the lines (each in 100 or 1000 points) and use the code given on this page: https://stackoverflow.com/questions/42806059/fitting-largest-circle-in-free-area-in-image-with-distributed-particle/42822810. With this, I get the solution, but the circle is not the largest possible.
I would appreciate if anyone can help me with this matter.
Regards, Nenad

 Respuesta aceptada

Image Analyst
Image Analyst el 22 de Sept. de 2017
Use poly2mask() and bwdist(). The location and peak of the distance transform will give you the circle parameters.
mask = poly2mask(x, y, rows, columns);
edtImage = bwdist(mask);
maxRadius = max(edtImage(:));
[row, column] = find(edtImage == maxRadius);

Más respuestas (0)

Preguntada:

el 22 de Sept. de 2017

Respondida:

el 22 de Sept. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by