Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how can I convert pixel units to millimeters #318

Open
wyh123456987 opened this issue Mar 19, 2024 · 14 comments
Open

how can I convert pixel units to millimeters #318

wyh123456987 opened this issue Mar 19, 2024 · 14 comments

Comments

@wyh123456987
Copy link

Hello, how can I convert pixel units to millimeters?

@wyh123456987
Copy link
Author

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
Copy link
Owner

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
Copy link
Author

Is the unit in MODEL_COORDINATEES already in mm?

@wyh123456987
Copy link
Author

image

@wyh123456987
Copy link
Author

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
Copy link
Owner

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

@wyh123456987
Copy link
Author

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
Copy link
Author

UHP{T1SX@FC{R{`N ENJUM

@wyh123456987
Copy link
Author

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

@dicengine
Copy link
Owner

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
Copy link
Author

62)VA4FHEH(FFLR`}T8)CPU

@wyh123456987
Copy link
Author

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

@wyh123456987
Copy link
Author

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
Copy link
Owner

Yes, that's the variable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants