how to convert Pixel to cm or inch (i want to know 1 pixel equal = ?? mm or = ?? cm = ?? inch)
24 ビュー (過去 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 件のコメント
Walter Roberson
2016 年 4 月 4 日
That is going to depend upon how you did the calculation of the area.
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 で Convert Image Type についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!