歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux編程 >> Linux編程 >> Unity3D圖像後處理特效——Contrast Enhance

Unity3D圖像後處理特效——Contrast Enhance

日期:2017/3/1 10:16:31   编辑:Linux編程

The Contrast Enhance image effect enhances the impression of contrast for a given camera. It uses the well-knownunsharp mask process available in image processing applications.

對於一個特定的相機,對比度增強特效可以增強其生成圖片的對比度感知。它主要使用了圖像處理領域中著名的非銳化掩膜方法來達到這種效果。

When blurring is applied to an image, the colors of adjacent pixels are averaged to some extent, resulting in a reduction of sharp edge detail. However, areas of flat color remain relatively unchanged. The idea behind unsharp masking is that an image is compared with a blurred (or "unsharp") version of itself. The difference in brightness between each pixel in the original and the corresponding pixel in the blurred image is an indication of how much constrast the pixel has against its neighbours. The brightness of that pixel is then changed in proportion to the local contrast. A pixel which is darker after blurring must be brighter than its neighbours, so its brightness is further increased while if the pixel is darker after blurring then it will be darkened even more. The effect of this is to increase contrast selectively in areas of the image where the detail is most noticeable. The parameters of unsharp masking are the pixel radius over which colors are blurred, the degree to which brightness will be altered by the effect and a "threshold" of contrast below which no change of brightness will be made.

當向一張圖片是用模糊化特效時,臨近像素間的顏色將會被平均,這也就減少了銳利邊緣的細節信息,但擁有平滑顏色過度的區域則相對地保持不變。非銳化掩膜的核心思想這是將一張圖片與其自身的模糊化效果相比較,對於同一個像素來說,原始圖像中的顏色與其在模糊化後圖像的顏色差異,則表示該像素在其臨域內具有多大的對比度。這樣,就可以根據局部對比度來成比例地改變該像素的亮度。如果一個像素在模糊化後變得比原來暗,那說明該像素要比其臨域內其他像素的顏色要亮,所以增強後其顏色會更亮,同理,如果該像素模糊後比原來亮,則增強後會變得更加暗。這種特效可以用來有選擇地增加圖像的對比度,特別是針對那些需要關注的細節。非銳化掩膜方法的參數有像素的模糊半徑,增強系數以及對比度阈值,在此阈值之下的亮度將不受影響。

As with the other image effects, this effect is only available in Unity Pro and you must have the Pro Standard Assets installed before it becomes available.

跟其他圖像特效一樣,該特效只能用於Unity Pro版本中年,而且你在使用它之前需要安裝Pro Standard Assets。

沒有對比度增強特效

使用對比度增強特效

Properties 特性

Intensity

強度

The intensity of contrast enhancement.

對比度增強的強度

Threshhold

阈值

The constrast threshold below which no enhancement is applied.

對於阈值以下的像素將不進行增強處理

Blur Spread

模糊半徑

The radius over which contrast comparisons are made.

在該半徑下將進行對比度的比較

Hardware support 硬件支持

This effect requires a graphics card with pixel shaders (2.0) or OpenGL ES 2.0. PC: NVIDIA cards since 2003 (GeForce FX), AMD cards since 2004 (Radeon 9500), Intel cards since 2005 (GMA 900); Mobile: OpenGL ES 2.0; Consoles: Xbox 360, PS3.

該特效要求在擁有像素著色器(3.0)或OpenGL ES2.0的顯卡上進行。PC:2004年以後的NVIDIA卡(GeForce6),2005年以後的AMD卡(Radeon X1300),2006年以後的Intel卡(GMA X3000);移動設備:OpenGL ES2.0;控制台:Xbox360,PS3。

All image effects automatically disable themselves when they can not run on end-users graphics card.

所有圖像特效如果不能在用戶終端的顯卡上運行時則會自動關閉。
Copyright © Linux教程網 All Rights Reserved