2013年10月17日 星期四

image effects

此篇未完

剛好找到一個直接對image作處理的project讀的一些心得

RGB處理

作色偏處理 

將RGB[0 , 255] 作 mapping 對應到 [ n, m ]  , n m      [0 , 255] . 即可達到色偏的效果 .

Gaussian Blur

將一個像素取周遭的像素來作平均 該矩陣由normal distribution 2 dimensional取得,邊緣失去的像素我assume是由中間去遞補, 事實上不會是一個很難的filter if you have the conception of all these stuffs .

Sepia Filter
Sepia toning is a specialized treatment to give a black-and-white photographic print a warmer tone and to enhance its archival qualities. Chemicals are used to convert the metallic silver in the print to a sulfidecompound, which is much more resistant to the effects of environmental pollutants such as atmospheric sulfur compounds. Silver sulfide is at least 50% more stable than silver.

基本上就是套用以下formula
outputRed = (inputRed * .393) + (inputGreen *.769) + (inputBlue * .189)
outputGreen = (inputRed * .349) + (inputGreen *.686) + (inputBlue * .168)
outputBlue = (inputRed * .272) + (inputGreen *.534) + (inputBlue * .131)





沒有留言:

張貼留言