문제 설명
이미지를 사용하지 않고 Nx2 행렬에서 원의 반지름을 어떻게 찾을 수 있습니까? (How could I find the radius of a circle in a Nx2 matrix, not using images)
I am currently using bwboundaries to find shapes inside a binary image (nodules in a lung CT scan), however, I need to be able to identify circular objects which are probably the diaphragm. As a result, I have my circle perimeters stored in Nx2 matrices. I would like to know if there's any way I could find the radius and eccentricity of these shapes without having to create a new image first.
참조 솔루션
방법 1:
You may use regionprops
on the binary image to find out some object's properties such as EquivDiameter
, which is a scalar that specifies the diameter of a circle with the same area as the region, or centroid
along with extrema
to compute the mean radius.
From the Nx2 matrix, you can also take the (min, max) of the x‑values and divide it by 2 to have the x‑radius.