필터 지우기
필터 지우기

How can I calculate the area of white pixels of binary image in mm2

조회 수: 8 (최근 30일)
I need to find the size of tumor,that is white pixels of a binary image.I used the following equation to calculate the number of white pixel in my image.
Number of white pixels= int2str(nnz(binarized_img));
Now i have the count of white pixels,how can i find out the size of white pixels using this count? I have already referred this link, but i didn't understand it properly.In my case,i have to find the size of tumor,how can I do it with the number of white pixels that I have now.

채택된 답변

Walter Roberson
Walter Roberson 2016년 9월 13일
You need to find out how big one pixel is, in appropriate units, and then multiply by the number of pixels you have identified.
If you are working with a JPEG image, chances are that you will not have accurate information stored in the original file necessary to calculate the real-world size of the pixels. If you are using something designed specifically as a scientific instrument, then the information might be there in a JPEG image. Also, some models of high-end cameras store auto-focus distance and aperture information that can be used to estimate real-world sizes -- for example not even all Canon DSLRs will have that information.
Note: the "Resolution" EXIF information that is stored with JPEG images is more likely to be garbage than not.
If you are working with an image that was originally recorded directly as a TIFF or PNG file, the probability goes up that meaningful information is stored with the file.
If you are working with an image that was originally recorded as a DICOM image, then chances are quite good that the DICOM headers have the detailed information you need to calculate the pixel area.
  댓글 수: 12
Walter Roberson
Walter Roberson 2018년 1월 1일
Revati shiudkar:
DICOM PixelSpacing related values are in mm (millimetres) so area would be in mm^2

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

nehad mohamed
nehad mohamed 2021년 1월 7일
I want a tool like a ruler to measure distances in dicom images. In cm. using matlab

카테고리

Help CenterFile Exchange에서 DICOM Format에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by