RenderKit / oidn

Intel® Open Image Denoise library
https://www.openimagedenoise.org/
Apache License 2.0
1.77k stars 164 forks source link

Support for grayscale pfm images. #45

Closed gonsolo closed 4 years ago

gonsolo commented 4 years ago

Imagemagicks's convert automatically converts my EXR albedo images to grayscale PFM files (with an Pf header for grayscale instead of PF for color image) and denoise is refusing this type of image. Please add support for that.

atafra commented 4 years ago

This might be a bug in ImageMagick. Albedo images have 3 channels, so the converted PFM files also need to have 3 channels. Grayscale albedo images are invalid thus cannot be supported.

gonsolo commented 4 years ago

I filed a bug for imagemagick too. But I think the denoiser would be a bit more friendlier to users to accept that file since without hexdumping the pfm file it looks like the denoiser is randomly failing.

atafra commented 4 years ago

Albedo must be 3 channels, so it cannot accept a grayscale image. Also, Open Image Denoise is a library, not a standalone application. The included command line application is just an example for developers and is not intended to be a feature-complete denoising application.

gonsolo commented 4 years ago

I received a bug fix from an Imagemagick developer within the hour (which doesn't fix my issue but we're getting there :) ); https://github.com/ImageMagick/ImageMagick/issues/1783, so my problem is or will be eventually be solved.

I still think, from a usability point of view it still would be nice to just swallow the file and convert internally to 3 channels (not even mentioning spectral renderers ;) ).

Thanks anyway for your explanation.