[Bug 304811] New: Offer a "stretch histogram" functionality to automatically adjust brightness & gamma

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 304811] New: Offer a "stretch histogram" functionality to automatically adjust brightness & gamma

Bugzilla from kde@kde.lka.org.lu
https://bugs.kde.org/show_bug.cgi?id=304811

            Bug ID: 304811
          Severity: wishlist
           Version: 1.4.0
          Priority: NOR
          Assignee: [hidden email]
           Summary: Offer a "stretch histogram" functionality to
                    automatically adjust brightness & gamma
    Classification: Unclassified
                OS: Linux
          Reporter: [hidden email]
          Hardware: Ubuntu Packages
            Status: UNCONFIRMED
         Component: BCG correction
           Product: digikamimageplugins

I've found that for lightening up a dark image, increasing the gamma value
works best.

However, that introduces a haze over the image (it looks as if it was slightly
foggy), and I've noticed that I can make the haze go away by decreasing
brightness and increasing contrast in such a way that the histogram curve
occupies the entire range.

This also works to get the haze out of images that have it from the beginning.

However, this method takes some fiddling with the BC numbers/sliders to get
right.

Would it be possible to have a button or checkbox to make this happen
automatically?

Bonus points if the tool is batchable (with gamma adjustment as a parameter)

Or is there already a tool that does this naturally? (None of the
color->AutoCorrection seem to do much (except Equalize), and Equalize usually
spoils the colors completely).

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 304811] Offer a "stretch histogram" functionality to automatically adjust brightness & gamma

Gilles Caulier-4
https://bugs.kde.org/show_bug.cgi?id=304811

Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #1 from Gilles Caulier <[hidden email]> ---
We need an algorithm to adjust BCG settings automatically... Any proposal,
link, url ?

Gilles Caulier

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 304811] Offer a "stretch histogram" functionality to automatically adjust brightness & gamma

Bugzilla from kde@kde.lka.org.lu
In reply to this post by Bugzilla from kde@kde.lka.org.lu
https://bugs.kde.org/show_bug.cgi?id=304811

--- Comment #2 from Alain Knaff <[hidden email]> ---
I dunno... the histogram is displayed, so at some point it's probably stored
somewhere.
Assuming the histogram x axis goes from 0 to 99, maybe we could do something as
follows:

int min=-1;
int max=-1;
int i;
for(i=0; i<=99; i++) {
  if(histogram[i] != 0) {
    min=i;
    break;
 }
}

for(i=99; i>=0; i++) {
  if(histogram[i] != 0) {
    max=i;
    break;
 }
}

brightnessCorrection = 100-(min+max);
contrastCorrection = 100-(max-min);

I don't really know the digikam code that much, so maybe the numbers (bounds)
probably need adjustment and/or scaling to make everything fit. The goal here
is to tweak contrast/brightness such that the black part of the histogram
stretches enough to fill the available space, without any black part being
"cut" off, and without any part where y is 0 (or very small) left over near the
bounds.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 304811] Offer a "stretch histogram" functionality to automatically adjust brightness & gamma

Marcel Wiesweg
In reply to this post by Bugzilla from kde@kde.lka.org.lu
https://bugs.kde.org/show_bug.cgi?id=304811

--- Comment #3 from Marcel Wiesweg <[hidden email]> ---
Reminds me of levels adjust, with some automatic determination of input range?

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 304811] Offer a "stretch histogram" functionality to automatically adjust brightness & gamma

Bugzilla from kde@kde.lka.org.lu
In reply to this post by Bugzilla from kde@kde.lka.org.lu
https://bugs.kde.org/show_bug.cgi?id=304811

--- Comment #4 from Alain Knaff <[hidden email]> ---
Possibly... but it'd need a simpler UI

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 304811] Offer a "stretch histogram" functionality to automatically adjust brightness & gamma

S. Burmeister
In reply to this post by Bugzilla from kde@kde.lka.org.lu
https://bugs.kde.org/show_bug.cgi?id=304811

S. Burmeister <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #5 from S. Burmeister <[hidden email]> ---
Doesn't the auto-correction in the colours menu do that already?

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 304811] Offer a "stretch histogram" functionality to automatically adjust brightness & gamma

Bugzilla from kde@kde.lka.org.lu
In reply to this post by Bugzilla from kde@kde.lka.org.lu
https://bugs.kde.org/show_bug.cgi?id=304811

--- Comment #6 from Alain Knaff <[hidden email]> ---
Unfortunately not (see my first comment)

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 304811] Offer a "stretch histogram" functionality to automatically adjust brightness & gamma

S. Burmeister
In reply to this post by Bugzilla from kde@kde.lka.org.lu
https://bugs.kde.org/show_bug.cgi?id=304811

--- Comment #7 from S. Burmeister <[hidden email]> ---
auto correction (I think the last option in it) does what levels adjust can be
used for and hence imho what is needed to lighten up images that do not use the
full spectrum/range.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 304811] Offer a "stretch histogram" functionality to automatically adjust brightness & gamma

Gilles Caulier-4
In reply to this post by Bugzilla from kde@kde.lka.org.lu
https://bugs.kde.org/show_bug.cgi?id=304811

--- Comment #8 from Gilles Caulier <[hidden email]> ---
Just for info, AutoLevels code is in this dir, if you want to take a look to
improve it :

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/show/libs/dimg/filters/levels

Gilles Caulier

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 304811] Offer a "stretch histogram" functionality to automatically adjust brightness & gamma

bugzilla_noreply
In reply to this post by Bugzilla from kde@kde.lka.org.lu
https://bugs.kde.org/show_bug.cgi?id=304811

[hidden email] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|BCG correction              |Tool-BCG
            Product|digikamimageplugins         |digikam

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel