GPUImage2(六)濾鏡大全:視覺特效

本文所有示例代碼或Demo可以在此獲取:https://github.com/WillieWangWei/SampleCode_GPUImage2_FilterList.git

如果本文對(duì)你有所幫助,請(qǐng)給個(gè)Star??

相關(guān)文章
GPUImage2(一)集成與使用
GPUImage2(二)濾鏡大全:圖像生成
GPUImage2(三)濾鏡大全:色彩調(diào)校
GPUImage2(四)濾鏡大全:圖像處理
GPUImage2(五)濾鏡大全:混合模式

概述


本篇枚舉GPUImage2內(nèi)置濾鏡中的所有的視覺特效類別,并對(duì)其效果及參數(shù)進(jìn)行簡(jiǎn)要說(shuō)明,供選擇參考。

視覺特效


共22類

  • Pixellate
  • PolarPixellate
  • PolkaDot
  • Halftone
  • Crosshatch
  • SketchFilter
  • ThresholdSketchFilter
  • ToonFilter
  • SmoothToonFilter
  • EmbossFilter
  • Posterize
  • SwirlDistortion
  • BulgeDistortion
  • PinchDistortion
  • StretchDistortion
  • SphereRefraction
  • GlassSphereRefraction
  • Vignette
  • KuwaharaFilter
  • KuwaharaRadius3Filter
  • CGAColorspaceFilter
  • Solarize
Pixellate

像素化(馬賽克)。
fractionalWidthOfAPixel:Float 像素塊的大小,取值[0.0, 1.0],默認(rèn)0.01。

Pixellate

PolarPixellate

基于極坐標(biāo)的像素化。
pixelSize:Size 像素大小,默認(rèn)(0.05, 0.05)。
center:Position 像素的中心,默認(rèn)center。

PolarPixellate

PolkaDot

將圖像在網(wǎng)格內(nèi)分割為彩色點(diǎn)。
dotScaling:Float 網(wǎng)格內(nèi)點(diǎn)的大小,取值[0.0, 1.0],默認(rèn)0.9。
fractionalWidthOfAPixel:Float 網(wǎng)格的大小,取值[0.0, 1.0],默認(rèn)0.01。

PolkaDot

Halftone

半色調(diào),模擬印刷效果。


Halftone
Crosshatch

將圖像轉(zhuǎn)換為黑白交叉的排線圖案。
crossHatchSpacing:Float 交叉線間距的寬度,默認(rèn)0.03。
lineWidth:Float 交叉線的相對(duì)寬度,默認(rèn)值為0.003。

Crosshatch

SketchFilter

將圖像轉(zhuǎn)換為素描樣式,這是圖像處理中SobelEdgeDetection的顏色反轉(zhuǎn)效果。
edgeStrength:Float 調(diào)整動(dòng)態(tài)范圍,值越高邊緣越強(qiáng),默認(rèn)1.0。

SketchFilter

ThresholdSketchFilter

SketchFilter相似,但邊緣由閾值代替了灰度。
edgeStrength:Float 調(diào)整動(dòng)態(tài)范圍,值越高邊緣越強(qiáng),默認(rèn)1.0。
threshold:Float 高于此閾值的邊將為黑色,低于的為白色,取值[0.0, 1.0],默認(rèn)0.25。

ThresholdSketchFilter

ToonFilter

使用SobelEdgeDetection在對(duì)象周圍進(jìn)行黑色描邊,然后它量化圖像中存在的顏色,并給圖像一個(gè)卡通的效果。
threshold:Float 邊緣檢測(cè)的靈敏度,低值更敏感,取值[0.0, 1.0],默認(rèn)0.2。
quantizationLevels:Float 最終圖像中顏色級(jí)別的數(shù)量,默認(rèn)10.0。

ToonFilter

SmoothToonFilter

類似ToonFilter,但有高斯模糊效果,以平滑噪點(diǎn)。
blurRadiusInPixels:Float 高斯模糊半徑,默認(rèn)2.0。
threshold:Float 邊緣檢測(cè)的靈敏度,低值更敏感,取值[0.0, 1.0],默認(rèn)0.2。
quantizationLevels:Float 最終圖像中顏色級(jí)別的數(shù)量,默認(rèn)10.0。

SmoothToonFilter

EmbossFilter

浮雕效果。
intensity:Float 浮雕的強(qiáng)度,取值[0.0, 4.0],默認(rèn)1.0。

EmbossFilter

Posterize

將色彩動(dòng)態(tài)范圍減少到指定的等級(jí),渲染出卡通式的簡(jiǎn)單陰影。
colorLevels:Float 圖像空間縮小到的顏色級(jí)別數(shù)。取值[1.0, 256.0],默認(rèn)1.0。

Posterize

SwirlDistortion

旋渦扭曲。
radius:Float 扭曲的半徑,默認(rèn)0.5。
angle:Float 扭曲量,默認(rèn)1.0。
center:Position 扭曲的中心,默認(rèn)center。

SwirlDistortion

BulgeDistortion

凸起扭曲。
radius:Float 扭曲的半徑,默認(rèn)0.25。
scale:Float 扭曲量,取值[-1.0, 1.0],默認(rèn)0.5。
center:Position 扭曲的中心,默認(rèn)center。

BulgeDistortion

PinchDistortion

捏合扭曲。
radius:Float 扭曲的半徑,默認(rèn)1.0。
scale:Float 扭曲量,取值[-1.0, 1.0],默認(rèn)0.5。
center:Position 扭曲的中心,默認(rèn)center。

PinchDistortion

SphereRefraction

模擬通過球體的折射。
radius:Float 扭曲的半徑,默認(rèn)0.25。
refractiveIndex:Float 球體的折射率,默認(rèn)0.71。
center:Position 扭曲的中心,默認(rèn)center。

SphereRefraction

GlassSphereRefraction

SphereRefraction相似,但圖像不倒置,并且在球體邊緣有泛白效果。
radius:Float 扭曲的半徑,默認(rèn)0.25。
refractiveIndex:Float 球體的折射率,默認(rèn)0.71。
center:Position 扭曲的中心,默認(rèn)center。

GlassSphereRefraction

Vignette

漸暈效果,圖像在邊緣淡出。
center:Position 漸暈的中心,默認(rèn)center。
color:Color 漸暈的顏色,默認(rèn)black。
start:Float 中心到開始的距離,默認(rèn)0.3。
end:Float 中心到結(jié)束的距離,默認(rèn)0.75。

Vignette

KuwaharaFilter

產(chǎn)生油畫式的圖像,但計(jì)算量非常大,適合用于靜止圖像。
radius:Int 從中心像素向外測(cè)試的像素?cái)?shù)。較高的值會(huì)創(chuàng)建更抽象的圖像,但處理時(shí)間更長(zhǎng),默認(rèn)3。

KuwaharaFilter

KuwaharaRadius3Filter

KuwaharaFilter的修改版,優(yōu)化超過三個(gè)像素半徑計(jì)算。

KuwaharaRadius3Filter

CGAColorspaceFilter

模擬CGA顯示器的顏色空間。


CGAColorspaceFilter
Solarize

過度曝光。
threshold:Float 亮度高于閾值的像素將反轉(zhuǎn)顏色,取值[0.0, 1.0],默認(rèn)0.5。

Solarize

本文所有示例代碼或Demo可以在此獲?。?a target="_blank" rel="nofollow">https://github.com/WillieWangWei/SampleCode_GPUImage2_FilterList.git

如果本文對(duì)你有所幫助,請(qǐng)給個(gè)Star??

相關(guān)文章
GPUImage2(一)集成與使用
GPUImage2(二)濾鏡大全:圖像生成
GPUImage2(三)濾鏡大全:色彩調(diào)校
GPUImage2(四)濾鏡大全:圖像處理
GPUImage2(五)濾鏡大全:混合模式

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容