Dimensional measurement
New in version 1.1
In this application, we use 2 steps:
- Make calibration
- Measuring the dimensons of object
During the second step, an image will be passed through this pipeline
[Segmentation] --> [Measurement] --> [Overlay] --> [Saving results]
1. Prepare your dataset
# your dataset structure should be like this
data/
calib.jpeg
-test/
-*.jpg
Notes
The calib.jpeg is the image of object using for calibration (pixel/mm). It's recommended that the calibration object should have the same depth as objects will be used for test.
2. Usages
Calibration
Go to /projects/calculate_solution_opencv
Execute this command:
python calib.py --calib_file_path "<PATH_TO_CALIB_FILE>" --output "<PATH_TO_OUTPUT_DIR>"
Measurement
Go to /projects/calculate_solution_opencv
Execute this command:
python predict.py --img_path "<PATH_TO_IMAGE_FILE>" --options "<PATH_TO_OPT_FILE>" --output "<PATH_TO_OUTPUT_DIR>"
3. Tips for improving performance
- Use the calibration object with same depth as measuring object (Could be a 3D printed cube with specified width and height)
- Align the measuring object to be straight with camera/view
- Align camera position for avoiding distortion