Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LibRaw wavelet denoise options #4028

Merged
merged 4 commits into from
Oct 17, 2023
Merged

LibRaw wavelet denoise options #4028

merged 4 commits into from
Oct 17, 2023

Conversation

ssh4net
Copy link
Contributor

@ssh4net ssh4net commented Oct 16, 2023

raw:threshold
- float
- Libraw parameter for noise reduction through wavelet denoising..
The best threshold should be somewhere between 100 and 1000.

  • raw:fbdd_noiserd - int - Controls FBDD noise reduction before demosaic. 0 - do not use FBDD noise reduction, 1 - light FBDD reduction, 2 (and more) - full FBDD reduction

Description

Tests

Checklist:

  • I have read the contribution guidelines.
  • I have updated the documentation, if applicable.
  • I have ensured that the change is tested somewhere in the testsuite
    (adding new test cases if necessary).
  • If I added or modified a C++ API call, I have also amended the
    corresponding Python bindings (and if altering ImageBufAlgo functions, also
    exposed the new functionality as oiiotool options).
  • My code follows the prevailing code style of this project. If I haven't
    already run clang-format before submitting, I definitely will look at the CI
    test that runs clang-format and fix anything that it highlights as being
    nonconforming.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Oct 16, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

``raw:threshold``
     - float
     - Libraw parameter for noise reduction through wavelet denoising..
       The best threshold should be somewhere between 100 and 1000.
- ``raw:fbdd_noiserd``
     - int
     - Controls FBDD noise reduction before demosaic.
       0 - do not use FBDD noise reduction, 1 - light FBDD reduction,
       2 (and more) - full FBDD reduction

Signed-off-by: ssh4net <libalias@gmail.com>
@ssh4net
Copy link
Contributor Author

ssh4net commented Oct 16, 2023

@lgritz nothing special just two options:
raw:threshold and raw:fbdd_noiserd
If the first one clearly visible results. Recommended to use values from 100.00 to 1000.00

but fbdd_noiserd I did not get how it works in libraw so just added it as it is also about denoising (1 or 2 should enable different modes of this pre-demosaic denoiser).

My main concern, that compared to direct libraw demosaic that not affect processing time a lot. OpenImageIO has 2-3 times slowdown on wavelet demosaic,
But i don't see anything suspicious except the debugger 3 or 4 times passing this libraw options. First time on metadata read, and set nothing but last three (or more?) times it already has actual settings set.
But worth to mention, looks like demosaic did only once. So i can't get where this slowdown in oiio happen.

src/doc/builtinplugins.rst Outdated Show resolved Hide resolved
@lgritz
Copy link
Collaborator

lgritz commented Oct 17, 2023

Check the CI run to see that clang-format found a couple of very minor things, but other than that, it looks good to me.

Signed-off-by: ssh4net <libalias@gmail.com>
@ssh4net
Copy link
Contributor Author

ssh4net commented Oct 17, 2023

Fixed.
I also added info about default values.

Do you have any ideas why enabling this pre-demosaic denoising can have such a significant impact on plugin speed when libraw directly has only 5-10% slowdown?

Signed-off-by: ssh4net <libalias@gmail.com>
- Controls FBDD noise reduction before demosaic.
0 - do not use FBDD noise reduction, 1 - light FBDD reduction,
2 (and more) - full FBDD reduction
(Default: 0.0)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm sorry, last thing, I promise! Since this one is an integer parameter, let's document the default as 0 instead of 0.0.

src/doc/builtinplugins.rst Outdated Show resolved Hide resolved
Signed-off-by: Larry Gritz <lg@larrygritz.com>
Copy link
Collaborator

@lgritz lgritz left a comment

Choose a reason for hiding this comment

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

LGTM!

(I fixed the 0.0 -> 0 suggestion for you)

@lgritz lgritz merged commit 5315e38 into AcademySoftwareFoundation:master Oct 17, 2023
26 checks passed
lgritz pushed a commit to lgritz/OpenImageIO that referenced this pull request Oct 19, 2023
- ``raw:threshold``
     - float
     - Libraw parameter for noise reduction through wavelet denoising..
       The best threshold should be somewhere between 100 and 1000.

- ``raw:fbdd_noiserd`` 
    - int 
    - Controls FBDD noise reduction before demosaic. 0 - do not use FBDD
       noise reduction, 1 - light FBDD reduction, 2 (and more) - full FBDD reduction

---------

Signed-off-by: ssh4net <libalias@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants