滤镜简述
despill
官网链接 => FFmpeg Filters Documentation
despill 滤镜主要是处理前景由于蓝色或者绿色背景映射的光,比如我们在摄影棚拍摄绿色背景的图片的时候,有的时候会发现人物身上会反射有绿光,此时可以这个滤镜进行处理。
切记这个滤镜只能针对蓝色和绿色背景。
滤镜使用
参数
type <int> ..FV.....T. set the screen type (from 0 to 1) (default green)
green 0 ..FV.....T. greenscreen
blue 1 ..FV.....T. bluescreen
mix <float> ..FV.....T. set the spillmap mix (from 0 to 1) (default 0.5)
expand <float> ..FV.....T. set the spillmap expand (from 0 to 1) (default 0)
red <float> ..FV.....T. set red scale (from -100 to 100) (default 0)
green <float> ..FV.....T. set green scale (from -100 to 100) (default -1)
blue <float> ..FV.....T. set blue scale (from -100 to 100) (default 0)
brightness <float> ..FV.....T. set brightness (from -10 to 10) (default 0)
alpha <boolean> ..FV.....T. change alpha component (default false)
- mix和expand 这两个参数没有搞太明白(有清楚的大神帮忙留个言),不过这两个值越大,出来的图像越暗
- brightness 值越大越亮
- alpha 设置为true,可以用来生成png图片
案例
ffmpeg -y -i ffm_media/snail.jpg -filter_complex "despill=alpha=true:expand=0.2:brightness=1" result/despill/despill_test_7.png
如果扣绿幕的话,brightness要大于0,否则背景扣不干净。
sql
## 祝你好运
hope("大神多多指点")
topic("有问题可以交流呀")
concat("球球QUN", "61480", "9646")