Filter löschen
Filter löschen

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

38 Ansichten (letzte 30 Tage)
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 Kommentare
Nishan Dangi
Nishan Dangi am 3 Okt. 2021
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 am 4 Okt. 2021
@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.

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Image Analyst
Image Analyst am 28 Jun. 2014
Bearbeitet: Image Analyst am 28 Jun. 2014
  5 Kommentare
Walter Roberson
Walter Roberson am 4 Apr. 2016
That is going to depend upon how you did the calculation of the area.
Image Analyst
Image Analyst am 4 Apr. 2016
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.

Melden Sie sich an, um zu kommentieren.


Waqar Buriro
Waqar Buriro am 23 Mär. 2018
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 Kommentare
Image Analyst
Image Analyst am 28 Mär. 2020
Amit, you need to use the 'XData', and 'YData' inputs to imshow() and then call impixelinfo().

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by