alicevision / Meshroom

3D Reconstruction Software
http://alicevision.org
Other
11.21k stars 1.09k forks source link

[request] Support HEIF and AVIF input #1193

Open EwoutH opened 3 years ago

EwoutH commented 3 years ago

Currently Meshroom 2020.1.1 doesn't supports importing HEIF and AVIF images. Since more and more cameras and RAW editors use these advanced file formats, support to import them directly into Meshroom would be great. The additional image convertion step to JPG currently reduces image quality, increases storage requirements and requires additional time.

libheif could be used for importing both HEIF and AVIF images, while a separate libavif is also available.

Screenshot_308Screenshot_309

fabiencastan commented 3 years ago

Thanks for the feedback. It is already supported by oiio: https://github.com/OpenImageIO/oiio/blob/4dd4f2531141b7a365e9106350585d14405d55eb/src/heif.imageio/heifinput.cpp

So it is probably just a mater of build or just declaring the file extension as known.

fabiencastan commented 3 years ago

Are you using Linux or Windows? On Windows it is already built with HEIF support, see here: https://github.com/microsoft/vcpkg/blob/master/ports/openimageio/CONTROL#L6

So if you are on Windows, you could you try to add it on the Meshroom side here (and you can submit the change as a PR): https://github.com/alicevision/meshroom/blob/develop/meshroom/multiview.py#L41 And it should work directly.

On Linux, we need to add it to the build: https://github.com/alicevision/AliceVision/blob/develop/CMakeLists.txt#L569 PR on such topic would be more than welcome ;)

Best,

EwoutH commented 3 years ago

I submitted a PR adding the format extensions to multiview.py: #1301

I also looked into adding it in the the CMake setup for Linux, but unfortunately I didn't succeed. The above PR should at least enable HEIF and AVIF support on Windows.