dice icon indicating copy to clipboard operation
dice copied to clipboard

how can I convert pixel units to millimeters

Open wyh123456987 opened this issue 1 year ago • 14 comments

Hello, how can I convert pixel units to millimeters?

wyh123456987 avatar Mar 19 '24 08:03 wyh123456987

There is also a question about camera calibration. After my camera is calibrated, does it have to photograph the object to be measured in the calibrated posture?

wyh123456987 avatar Mar 19 '24 09:03 wyh123456987

To convert from pixels to mm you need to either be doing a stereo analysis or use calibration for a single camera. For either one, it's best not to move the camera once it has been calibrated. If you specify a calibration file, for mono or stereo, you will see a MODEL_COORDINATAES field in the exodus output file that will have the physical coordinates of the subset locations. You can use this to convert from px to mm (the SUBSET_COORDINATES field is in px for these same points)

dicengine avatar Mar 19 '24 12:03 dicengine

Is the unit in MODEL_COORDINATEES already in mm?

wyh123456987 avatar Mar 20 '24 14:03 wyh123456987

image

wyh123456987 avatar Mar 20 '24 14:03 wyh123456987

For example, in this picture, I see the MODEL_COORDINATEES field in the exodus output file. How else can I convert it from px to mm?

wyh123456987 avatar Mar 20 '24 14:03 wyh123456987

The unit is in mm for MODEL_CORRDINATES if that's what you used in the calibration.

dicengine avatar Mar 20 '24 14:03 dicengine

Sorry, I don't quite understand what you mean。Do you mean that as long as it is calibrated, the unit in MODEL_CORRDINATES will be mm?

wyh123456987 avatar Mar 21 '24 04:03 wyh123456987

UHP{T1SX@FC{R{`N ENJUM

wyh123456987 avatar Mar 21 '24 04:03 wyh123456987

Then the MODEL_COORDINATEES shown in the picture above is already in the calibrated exodus output file, so its unit is mm?

wyh123456987 avatar Mar 21 '24 04:03 wyh123456987

The units are set in the calibration. If millimeters were used in the calibration (which is most common), then the units in the MODEL_COORDINATES field will be in mm. For some applications, for example large-scale DIC, the units are set in meters.

dicengine avatar Mar 21 '24 15:03 dicengine

62)VA4FHEH(FFLR`}T8)CPU

wyh123456987 avatar Mar 22 '24 04:03 wyh123456987

Is it set where I drew it in the picture above?

wyh123456987 avatar Mar 22 '24 04:03 wyh123456987

How to obtain the result in physical units (mm) after calibration?I hope you can reply to me as soon as possible. Thank you.

wyh123456987 avatar Mar 23 '24 04:03 wyh123456987

Yes, that's the variable

dicengine avatar Mar 25 '24 14:03 dicengine