how to convert Pixel to cm or inch (i want to know 1 pixel equal = ?? mm or = ?? cm = ?? inch)
조회 수: 38 (최근 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
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
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
2014년 6월 28일
편집: Image Analyst
2014년 6월 28일
See the FAQ: http://matlab.wikia.com/wiki/FAQ#How_do_I_measure_a_distance_or_area_in_real_world_units_instead_of_in_pixels.3F
I've also attached a demo for you.
댓글 수: 5
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
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
2020년 3월 28일
Amit, you need to use the 'XData', and 'YData' inputs to imshow() and then call impixelinfo().
Devyani Sankhe
2021년 1월 29일
@Image Analyst can you please write a code to evaluate this distance? I am new user at Matlab
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!