当前位置: 首页 > article >正文

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")


http://www.kler.cn/a/369221.html

相关文章:

  • Java题集练习4
  • Java 8:不可不知的新特性与实用技巧
  • 微信小程序——消息订阅
  • 创建ODBC数据源SQLConfigDataSource函数的用法
  • 深度学习(一)基础:神经网络、训练过程与激活函数(1/10)
  • 曹景行先生
  • MAN Truck Bus EDI 需求分析
  • Flutter Column组件实战案例
  • 2024 最新 frida技术栈 第一部分
  • Linux云服务器安装Docker、MySQL、Redis
  • 国产系统安装Oracle报错处理
  • 利用 Google AI 工具提升应用智能化:ML Kit、TensorFlowLite、Cloud Vision、AutoML、Gemini
  • 手机折叠屏贴膜应用
  • 【AI日记】24.10.27 了解AI的未来
  • 0基础学java之Day16
  • 缓存预取文章比较分析
  • 来源爬虫程序调研报告
  • 【山西】《信息化项目软件运维费用测算指南》(DB 14/T 2163-2020)-省市费用标准解读系列01
  • 【Vue】word / excel / ppt / pdf / 视频(mp4,mov) 预览
  • 「ZJUBCA秋季迎新见面会预告」
  • Netty的简介与实战
  • Java运行时数据区
  • 助力AI智能化时代:全国产化飞腾FT2000+/64+昇腾310B服务器主板
  • 关于k8s的cilium网络插件踩坑记
  • Android Audio基础——音频混音结束处理(十一)
  • 基于Matlab 火焰识别技术