[FFmpeg-user] Automatically Stretch Contrast

Paul B Mahol onemda at gmail.com
Sun Jan 4 13:04:17 CET 2015


On 1/2/15, Eric Duran <ericdura at gmail.com> wrote:
> I'm trying to write a filter that will automatically stretch the contrast
> of an input video.
>
> The method I thought of is:
>
> 1) Separate the L, U and V channels.
>
> 2) Apply histeq to the L channel.
>
> 3) Recombine the channels.
>
> I'm new to ffmpeg, so I've been able to do 1 and 2, but not sure how to
> implement #3. What I have so far is:
>
> ffmpeg -i in.mkv -vf extractplanes=y,histeq=strength=0.3:intensity=1
> out.mkv
>
> Which extracts the L channel and autocontrasts it, but I'm not sure how to
> recombine it with the U and V channels. Maybe use mergeplanes? Help!

You can use mergeplanes to recombine L with U and V.
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>


More information about the ffmpeg-user mailing list