dicengine / dice

Digital Image Correlation Engine (DICe): a stereo DIC application that runs on Mac, Windows, and Linux
Other
327 stars 124 forks source link

how can I convert pixel units to millimeters #318

Open wyh123456987 opened 3 months ago

wyh123456987 commented 3 months ago

Hello, how can I convert pixel units to millimeters?

wyh123456987 commented 3 months ago

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?

dicengine commented 3 months ago

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)

wyh123456987 commented 3 months ago

Is the unit in MODEL_COORDINATEES already in mm?

wyh123456987 commented 3 months ago

image

wyh123456987 commented 3 months ago

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?

dicengine commented 3 months ago

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

wyh123456987 commented 3 months ago

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 commented 3 months ago

UHP{T1SX@FC{R{`N ENJUM

wyh123456987 commented 3 months ago

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

dicengine commented 3 months ago

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.

wyh123456987 commented 3 months ago

62)VA4FHEH(FFLR`}T8)CPU

wyh123456987 commented 3 months ago

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

wyh123456987 commented 3 months ago

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

dicengine commented 3 months ago

Yes, that's the variable