Init calibration with blender benchmark#1
Init calibration with blender benchmark#1victor1234 wants to merge 16 commits intoopencv:developfrom
Conversation
|
I got "Engine 'BLENDER_EEVEE' not available for scene 'Scene' (an add-on may need to be installed or enabled)" for Blender . Most probably I need to update it. I used ubuntu 18.04 and default Blender version. |
| * Distort images by image_distort.cpp | ||
|
|
||
| ### Pattern generation command | ||
| gen_pattern.py -c 14 -r 19 -T checkerboard -u px -s 220 -w 3508 -h 4961 && convert out.svg checkerboard.png |
There was a problem hiding this comment.
Please add reference to OpenCV repo where to get gen_pattern.py and refererence to ImageMagick is required. At least apt-get install ...
|
I updated Blender and it almost works for me now. Couple of notes:
|
calibration_with_blender/render.py
Outdated
|
|
||
|
|
||
| # Set pattern init position | ||
| bpy.data.objects['checkerboard'].locaition.z = 10 |
There was a problem hiding this comment.
typo locaition -> location
| @@ -0,0 +1,684 @@ | |||
| #include "opencv2/core.hpp" | |||
There was a problem hiding this comment.
I do not think that calibration.cpp copy-paste from main repo is required. Could we just reuse it?
|
|
||
|
|
||
| if __name__ == '__main__': | ||
| binary_path = '/home/xperience/development/opencv-fork/cmake-build-release/bin' |
There was a problem hiding this comment.
It should be an option, I believe.
| image_distort_path = os.path.join(binary_path, 'example_cpp_image_distort') | ||
| calibration_benchmark_path = os.path.join(binary_path, 'example_cpp_calibration_benchmark') | ||
|
|
||
| datasets_path = '/home/xperience/development/datasets' |
| import seaborn as sns | ||
|
|
||
| if __name__ == '__main__': | ||
| data_dir = '/home/xperience/development/opencv_benchmarks/calibration_with_blender/work/checkerboard' |
|
|
||
| if __name__ == '__main__': | ||
| binary_path = '/home/xperience/development/opencv-fork/cmake-build-release/bin' | ||
| image_distort_path = os.path.join(binary_path, 'example_cpp_image_distort') |
There was a problem hiding this comment.
The CMakeLists.txt proposes calibration_benchmark name for executable
| if __name__ == '__main__': | ||
| binary_path = '/home/xperience/development/opencv-fork/cmake-build-release/bin' | ||
| image_distort_path = os.path.join(binary_path, 'example_cpp_image_distort') | ||
| calibration_benchmark_path = os.path.join(binary_path, 'example_cpp_calibration_benchmark') |
There was a problem hiding this comment.
What is difference between the code in PR and example in OpenCV. I propose to not add copy, but add reference to OpenCV itself. Also interactive calibration tool is always build with OpenCV and provided in distribution. It could be a replacement.
| #include "opencv2/core.hpp" | ||
| #include <opencv2/core/utility.hpp> | ||
| #include "opencv2/imgproc.hpp" | ||
| #include "opencv2/3d.hpp" |
There was a problem hiding this comment.
I propose to have #ifdef with OpenCV version here to have proper includes according to OpenCV version. I do not see 5.x specific code here.
| { | ||
| if (argc < 8) | ||
| { | ||
| std::cout << "usage; " << argv[0] << "image camera_model fx fy cx cy [d0 .. dn] output" |
No description provided.