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

5 次查看(过去 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