-
Notifications
You must be signed in to change notification settings - Fork 8
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
Init calibration with blender benchmark #1
base: develop
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo locaition
-> location
@@ -0,0 +1,684 @@ | |||
#include "opencv2/core.hpp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same here
import seaborn as sns | ||
|
||
if __name__ == '__main__': | ||
data_dir = '/home/xperience/development/opencv_benchmarks/calibration_with_blender/work/checkerboard' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script option?
|
||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
;
- typo.
No description provided.