[FFmpeg-user] Question about "normalize" filter
Paul B Mahol
onemda at gmail.com
Mon Jan 30 13:52:21 EET 2023
On 1/30/23, Michael Koch <astroelectronic at t-online.de> wrote:
> Am 30.01.2023 um 10:29 schrieb Paul B Mahol:
>>> You wrote:
>>>
>>> "With default parameters and just strength(2) set to your values, so
>>> the darkest pixels are left untouched."
>>>
>>> However I want that black remains untouched. That's not the same,
>>> because
>>> the darkest pixels in the image aren't black.
>>>
>>> The workaround is to insert a black pixel before normalizing:
>>> -vf drawbox=w=1:h=1:color=black,normalize
>> This command produces more convincing output:
>>
>> -vf colorlevels=rimin=0:gimin=0:bimin=0:rimax=-1:gimax=-1:bimax=-1
>>
>> this will pick max pixels values from input and stretch it do default
>> output max.
>
> This command gives almost the same result as my workaround.
> The meaning of -1 for options is missing in the documentation.
> It has the same problem as my workaround: The output is only 8-bit.
>
filter supports up to 16bit rgb(a), adding float would be trivial.
patch welcome
> It would be nice to have all these image processing filters with float
> precision:
> -- Hot pixel removal (save hot pixels in a mask, and replace those
> pixels by average of neighbor pixels)
> -- Dark image subtraction
blend filter, it supports also float rgb.
> -- Flatfield correction (division)
> -- Contrast enhancement (similar as colorlevels)
> -- Gamma correction (might already exist in eq filter with float
> precision, I'm not sure)
>
> For colorlevels it would be nice to have options "imin" and "imax" which
> set all three RGB channels simultaneously to the same value. Makes the
> command line much shorter.
>
Not everything you say makes sense.
> Michael
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>
More information about the ffmpeg-user
mailing list