简体   繁体   中英

How to align images of a known object with a 3D model of that object using opencv?

I have a CAD model of an object in Blender software. And I had printed it out and took some photos of it.

I need to use the Blender software to render some synthetic images of the object. My task is to create rendered images as similar as possible to the photos which I took for the printed model. In the Blender software, there is a camera view to capture images to render. What I have are:

  1. CAD model of the object 在此处输入图像描述

  2. photos of the object 在此处输入图像描述

  3. background photo在此处输入图像描述

What I get now is: 在此处输入图像描述

But obviously, the perspective and orientation of the 3D model in the synthetic image are not as same as the real photo's. How can I do to match them?

Normally, this is a problem of different interpretation of the camera coordinate systems. For example, opencv interprets the z-axis or the camera to be aligned with the optical axis of the camera and going from outside to inside. You can check how the blender interprets the camera coordinate system and transform it to match opencv.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM