Quantcast
Channel: FFmpeg | ニコラボ
Viewing all articles
Browse latest Browse all 310

RGB を伸張させる normalize

$
0
0

指定色でのモノトーンを作ったり、レンジを広げて見栄えをよくするnormalize フィルタの使い方。

基本コマンド

フルダイナミックレンジに伸張し、平準化はしない、フリッカー(ちらつき)は映像によっては発生する
ffmpeg -i input -vf normalize=blackpt=black:whitept=white:smoothing=0:independence=1:strength=1
ffplay -i input -vf normalize=blackpt=black:whitept=white:smoothing=0:independence=1:strength=1

上と同じだが、50フレーム平準化する
ffmpeg -i input -vf normalize=blackpt=black:whitept=white:smoothing=50:independence=1:strength=1
上と同じだが、色相を保持する
ffmpeg -i input -vf normalize=blackpt=black:whitept=white:smoothing=50:independence=0:strength=1
上と同じだが、強度を半分にする
ffmpeg -i input -vf normalize=blackpt=black:whitept=white:smoothing=50:independence=0:strength=0.5
オリジナルと上の4つのコマンドを左上から160×720crop して左から順番に並べる
ffplay -i input -vf crop=160:720:0:0,split=5[1][2][3][4],normalize=blackpt=black:whitept=white:smoothing=0:independence=1:strength=1[1a];[2]normalize=blackpt=black:whitept=white:smoothing=50:independence=1:strength=1[2b];[3]normalize=blackpt=black:whitept=white:smoothing=50:independence=0:strength=1[3c];[4]normalize=blackpt=black:whitept=white:smoothing=50:independence=0:strength=0.5,[1][1a][2b][3c]hstack=5
明暗を反転させる
ffplay -i input -vf normalize=blackpt=white:whitept=black
暗いところは赤に、明るいところはシアンにマップする
ffplay -i input -vf normalize=blackpt=red:whitept=cyan

元映像

暗いところは赤に、明るいところはシアン

公式ドキュメント:FFmpeg Filters Documentation : normalize

オプション

  • blackpt[color]
    暗い色を指定した色にマップして出力する
    既定値:black(000000)
  • whitept[color]
    明るい色を指定した色にマップして出力する
    既定値:white(ffffff)
  • smoothing[int]
    前フレームを参照して平準化する
    既定値:0
    範囲:0 から 2.68435e+008 まで
  • independence[float]
    各チャンネルのカラーシフトをどれだけ独立させるか。色相を保持すると元の色から変化が少なくなる
    既定値:1
    範囲:0(色相保持) から 1(完全独立) まで
  • strength[float]
    強度の指定
    既定値:1
    範囲:0 から 1 まで

Viewing all articles
Browse latest Browse all 310

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>