Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Init calibration with blender benchmark#1

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
victor1234 wants to merge16 commits intoopencv:develop
base:develop
Choose a base branch
Loading
fromvictor1234:blender-calibration-init

Conversation

@victor1234
Copy link

No description provided.

@asmorkalov
Copy link
Contributor

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

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 leastapt-get install ...

@asmorkalov
Copy link
Contributor

I updated Blender and it almost works for me now. Couple of notes:

  • Texture is broken. I see purple plains instead of plain with template.
  • It's not obvious where the final renders should locate. Please add it to readme. Also It'll be great to use current directory instead of /tmp and unblock Windows too.



# Set pattern init position
bpy.data.objects['checkerboard'].locaition.z = 10
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

typolocaition ->location

@@ -0,0 +1,684 @@
#include "opencv2/core.hpp"
Copy link
Contributor

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'
Copy link
Contributor

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'
Copy link
Contributor

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'
Copy link
Contributor

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')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

TheCMakeLists.txt proposescalibration_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')
Copy link
Contributor

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"
Copy link
Contributor

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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

; - typo.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@asmorkalovasmorkalovasmorkalov left review comments

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@victor1234@asmorkalov

[8]ページ先頭

©2009-2025 Movatter.jp