[FFmpeg-user] How can chromakey ignore shadows ?

Paul B Mahol onemda at gmail.com
Sat Oct 23 15:20:42 EEST 2021


On Sat, Oct 23, 2021 at 12:53 PM smoothgroove <smoothgroove at gmx.net> wrote:

> Thanks for your clear response, I see the problem.
>
> I'm wondering if there is any way to somehow lower the threshold for dark
> green areas in order to reduce/suppress shadows in the foreground stream?
> For example to somehow preprocess the foreground to reduce the contrast of
> the green content?
>
> In general, since there are different applications of chromakey, it would
> be
> very useful to be able to control the threshold of darker green content
> with
> a "shadow" parameter to the chromakey filter.
>
> 1) using for example a brick wall as a background image -> shadow from
> foreground image is desired
> 2) using a landscape as a background image -> shadow from foreground image
> is not desired
>

I think despill can do that, but need to revisit that.


>
> thanks, roman
>
> -----Original Message-----
> From: ffmpeg-user <ffmpeg-user-bounces at ffmpeg.org> On Behalf Of Paul B
> Mahol
> Sent: Sunday, 12 September 2021 20:56
> To: FFmpeg user questions <ffmpeg-user at ffmpeg.org>
> Subject: Re: [FFmpeg-user] How can chromakey ignore shadows ?
>
> On Sun, Sep 12, 2021 at 8:34 PM smoothgroove <smoothgroove at gmx.net> wrote:
>
> > Using chromakey=0x00ff00:0.24:0.14
> >
> > Is there any way to completely knock out the chromakey background, i.e.
> > ignorning the lighting level, shadows and structure of the chroma
> > background?
> >
> > In the examples:
> >
> > - The arm is casting a shadow on the greenscreen which is reflected in
> > the result.
> > - the face being near to the light automatically causes the chroma
> > background to darken, which causes the replaced image to unnaturally
> > darken.
> > - a fold in the greenscreen fabric shows up in the replaced background
> >
> > What is required is chromakey being insenstitive to the chroma
> > brightness, that is to totally punch out the background. How could
> > this be accomplished?
> >
>
> chromakey operates in YUV colorspace and use only U and V component to set
> transparency.
> And as such it will only set to transparent color some radius around UV
> point as can be seen with this command:
>
> ffplay -f lavfi -i
>
> color=s=512x512,geq=lum=N:cb="X":cr="Y":a=255,format=yuva420p,chromakey=0x00
> ff00:0.24:0.14
>
> Notice how very dark green and very bright green are not set to transparent
> color.
> _______________________________________________
> 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".
>
> _______________________________________________
> 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