Blender-Addon-Photogrammetry-Importer icon indicating copy to clipboard operation
Blender-Addon-Photogrammetry-Importer copied to clipboard

Meshroom reconstructed cameras FOV and Shift X / Y issues

Open catalinad opened this issue 1 year ago • 4 comments

Hi!

Thank you for this awesome addon! I used Meshroom to create a 3D Model from a set of photos. I need to render the 3D Model from specific views into files (my plan is to compute the PSNR between the source images and the rendered images). I used the Blender Photogrammetry Importer addon (version 3.2.1) and I was able to import cameras poses and textured mesh into Blender (version 3.5.1). I then rendered and saved the images using a Python script in Blender (I iterated through the reconstruction cameras and rendered the images). I run into the following problem: when importing the reconstructed cameras in Blender, some of the camera parameters are off, e.g the FOV and Shift X and Y and because of that the rendered images are not the expected ones. With some trial and error I was able to approximate the values for these parameters, but I am concerned that by doing this will impact the accuracy of the PSNR value. Could you help me please resolve this problem?

Thank you!

catalinad avatar Jan 30 '24 20:01 catalinad

Have you seen this: https://blender-photogrammetry-importer.readthedocs.io/en/latest/alignment.html ?

SBCV avatar Jan 31 '24 10:01 SBCV

Hi, thank you for your reply. Unfortunately that didn't fix the issue. I ended up manually setting the value for the FOV and setting Shift X and Y to 0.

catalinad avatar Feb 08 '24 17:02 catalinad

The addon should correctly set the values for the fov and the shift. So there is a bug in the addon? Can you share the example? Or a small example to highlight the problem?

SBCV avatar Feb 08 '24 18:02 SBCV

Hey @SBCV

I found the same issue when importing the json data from OpenSFM, when the reconstrucion.json is generated by PyODM.

What I've done was to convert c_x, c_y from mm to pixels, in my case the results where nearly zero, but the camera was properly aligned.

Is that the right approach?

Thanks!

ElHouas avatar May 13 '24 16:05 ElHouas