Find Area of the object in mm^2 from binary image
조회 수: 11 (최근 30일)
이전 댓글 표시
Hi All, I have two questions related to each other. I have a binary image and I want to calculate the area of the object in mm^2. I have calculated the area in pixel by using this code
[B,L] = bwboundaries(Bw,'noholes');
stats = regionprops(L,'Area','perimeter');
area = [stats.Area];
but I don't know how I can convert this in mm^2.
here is my original image in cartesian coordinate and size is 512 x 512.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/196691/image.jpeg)
I have converted the image in polar coordinate , its size is 256x256 . here it shown
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/196692/image.jpeg)
can I calculate the length of the line in mm^2. can anybody please help me . Thanks in Advance
답변 (1개)
Guillaume
2018년 9월 27일
Unless you know the scale of your image (pixels/mm) it is impossible to convert pixel measurements such as area or perimeter to rea world physical units such as mm^2.
You would know the scale of your image either by knowning carefully measuring or calculating the magnification of your imaging system or by capturing an image of an object of known dimensions (under the same imaging conditions).
If you have done neither of these, you're out of luck.
댓글 수: 11
Walter Roberson
2018년 9월 28일
one pixel is 1/1024 * 9.5 = 0.00927734375 mm then, at least in that direction. That would make one square pixel about 8.607E-5 mm^2 .
참고 항목
카테고리
Help Center 및 File Exchange에서 Read, Write, and Modify Image에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!