ffmpeg视频滤镜:均值模糊-boxblur

滤镜简述

boxblur

官网链接=> https://ffmpeg.org/ffmpeg-filters.html#boxblur

这个滤镜会使图片或者视频变得模糊,他可以针对色度和亮度进行模糊。

滤镜的使用

参数
复制代码
boxblur AVOptions:
   luma_radius       <string>     ..FV....... Radius of the luma blurring box (default "2")
   lr                <string>     ..FV....... Radius of the luma blurring box (default "2")
   luma_power        <int>        ..FV....... How many times should the boxblur be applied to luma (from 0 to INT_MAX) (default 2)
   lp                <int>        ..FV....... How many times should the boxblur be applied to luma (from 0 to INT_MAX) (default 2)
   chroma_radius     <string>     ..FV....... Radius of the chroma blurring box
   cr                <string>     ..FV....... Radius of the chroma blurring box
   chroma_power      <int>        ..FV....... How many times should the boxblur be applied to chroma (from -1 to INT_MAX) (default -1)
   cp                <int>        ..FV....... How many times should the boxblur be applied to chroma (from -1 to INT_MAX) (default -1)
   alpha_radius      <string>     ..FV....... Radius of the alpha blurring box
   ar                <string>     ..FV....... Radius of the alpha blurring box
   alpha_power       <int>        ..FV....... How many times should the boxblur be applied to alpha (from -1 to INT_MAX) (default -1)
   ap                <int>        ..FV....... How many times should the boxblur be applied to alpha (from -1 to INT_MAX) (default -1)

注意一下,lr和luma_radius是一个参数,lr是luma_radius的缩写,后面的类似。

  • luma是亮度,亮度的值越大,视觉上会越模糊,这个值最大是min(w,h)/2
  • chroma是色度,这个值越大,图片的颜色越淡,这个值最大是min(w,h)/2
  • luma_power和choma_power这个是迭代次数,即反复的再图片上执行均值模糊操作
使用

原图

明度和亮度都最大值的时候

复制代码
ffmpeg -y -i ffm_media/gee_short.jpg -filter_complex "boxblur=luma_radius=min(h\,w)/10:luma_power=1:chroma_radius=min(cw\,ch)/10:chroma_power=1" /data/work_space/result/boxblur/boxblur_test_02.jpg
复制代码
ffmpeg -y -i ffm_media/gee_short.jpg -filter_complex "boxblur=luma_radius=1:luma_power=1:chroma_radius=min(cw\,ch)/10:chroma_power=1" /data/work_space/result/boxblur/boxblur_test_08.jpg

色度最大值的时候

复制代码
ffmpeg -y -i ffm_media/gee_short.jpg -filter_complex "boxblur=luma_radius=min(cw\,ch)/10:luma_power=1:chroma_radius=1:chroma_power=1" /data/work_space/result/boxblur/boxblur_test_09.jpg

亮度最大值的时候

复制代码
ffmpeg -y -i ffm_media/gee_short.jpg -filter_complex "boxblur=luma_radius=10:luma_power=5:chroma_radius=1:chroma_power=1" /data/work_space/result/boxblur/boxblur_test_06.jpg

色度和亮度都比较小的时候

复制代码
## 祝你好运
 
hope("大神多多指点")
topic("有问题可以交流呀")
concat("求求QUN", "61480", "9646")
相关推荐
开开心心就好11 小时前
电子报纸离线保存:一键下载多报PDF工具
网络·笔记·macos·pdf·word·音视频·phpstorm
无敌最俊朗@11 小时前
视频容器(如 MP4)的作用:组织与同步
音视频
Black蜡笔小新14 小时前
视频融合平台EasyCVR结合视频智能分析技术构建高空抛物智能监控系统,守护“头顶上的安全”
安全·音视频
EasyCVR15 小时前
如何基于视频融合平台EasyCVR实现全域轨迹跟踪,构建主动式安防新体系?
音视频
筑凡15 小时前
PPT+配音生成带旁白的PPT演示视频
powerpoint·音视频·wps·mp4·ppt
EasyGBS15 小时前
从“被动监控”到“主动预警”:EasyGBS远程视频监控方案助力企业高效安全运营
安全·音视频
huaweichenai17 小时前
如何实现html显示WebRTC视频监控流
音视频·webrtc
Likeadust17 小时前
视频直播点播平台EasyDSS:助力现代农业驶入数字科技“快车道”
人工智能·科技·音视频
长沙红胖子Qt18 小时前
案例分享:音视频录像综合应用(支持录制麦克风音频、录制摄像头视频、同步录制音视频,支持opencv对图形进行处理,录制mp4文件)
opencv·音视频·录音·音视频同步·录像·录像图像处理
无敌最俊朗@19 小时前
音视频播放的核心处理流程
ffmpeg