how to convert Pixel to cm or inch (i want to know 1 pixel equal = ?? mm or = ?? cm = ?? inch)

27 次查看(过去 30 天)
Sir, i want to know 1 pixel equal = ?? mm or = ?? cm = ?? inch
my Pixel Weld Area shown after area calculation is 23842 i getted from weld image region.
How i convert Pixel to cm or inch
There is any equation or formula to convert Pixel to cm or inch
Plz Help me.
  2 个评论
Nishan Dangi
Nishan Dangi 2021-10-3
Calculation of units (Px/Inch/cm/mm)
Pixels (px)
A small square variable units , it depends upon resolution. Resolution: Resolution is a quantity of pixels per inch , we called it DPI (dots per inches) some preset of resolution ; For screen quality; resolution (R)= 72 dpi For printing quality , resolution® = 300 dpi That means : 1 inch = 72 px or 300 px
Inch<> px 1 inch = resolution (R) px 1 px = 1/R inch
cm<> px 1 px = 1/R inch = 1/ R * 2.54 cm ( 1 inch = 2.54 cm) = 2.54/R cm Therefore , 1 cm = R/ 2.54 px
mm<>px
1 px = 2.54 /R cm
= 2.54/r * 10 mm ( 1 cm = 10 mm)
= 25.4 /R mm
Therefore ,
1 mm = R / 25.4 px
summary 1 inch = R px 1 cm = R/2.54 px 1 mm = R/ 25.4 px
For resolution 72 dpi, 1 inch = 72 px 1 cm = 72/2.54 px =28.3464567 px 1 mm = 72/ 25.4 px = 2.8346457 px
Image Analyst
Image Analyst 2021-10-4
@Nishan Dangi, that has nothing to do with the resolution in his image. He wants to know how big the weld is in his image, not how big it is on his screen -- that's meaningless. If you just viewed the image on a larger screen, that does not mean the weld in the image is bigger. The weld is the same size regardless of screen size or how many DPI your screen or video adapter has.

请先登录,再进行评论。

回答(2 个)

Image Analyst
Image Analyst 2014-6-28
编辑:Image Analyst 2014-6-28
  5 个评论
Image Analyst
Image Analyst 2016-4-4
The area from bwarea() or regionprops() is initially in pixels. We really don't distinguish between linear pixels and square pixels - it's understood from the context. So length and area are both in pixels - you just have to know that to get real world distance you must multiply by the calibration factor, and to get real world areas you must multiply the pixels by the square of the calibration factor. Just think about it and it will eventually make sense to you.

请先登录,再进行评论。


Waqar Buriro
Waqar Buriro 2018-3-23
Hello , But how can i find the real length of dicom image if that is taken from a online data source. i can not use ruler to measure its mm size? Is there any way.
  6 个评论
Image Analyst
Image Analyst 2020-3-28
Amit, you need to use the 'XData', and 'YData' inputs to imshow() and then call impixelinfo().

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Convert Image Type 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by