User Tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
isp:sharpness [2019/05/08 17:32] – created Igor Yefmovisp:sharpness [2022/04/04 23:32] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== Sharpness ====== ====== Sharpness ======
  
-We define sharpness as the difference of brightness (the pixel'''L'' component in HSL color space) from a pixel to its neighboring pixels.+We define sharpness as the difference of brightness (the pixel'\(L\) component in HSL color space) from a pixel to its neighboring pixels.
  
-Sharpness for each pixel is calculated based on the values of immediately surrounding it pixels, only the luma component ''L'' is used for this calculation.+Sharpness for each pixel is calculated based on the values of immediately surrounding it pixels, only the luma component \(L\) is used for this calculation.
  
-A pixel's new value is calculated based on the simple matrix (see below) with a little twist: the central coefficient of 5 is adjusted based on the new value of sharpness as follows: ''coef_5 = 5 + sharpness'', where ''sharpness'' is in range ''[-1..+1]''.+A pixel's new value is calculated based on the simple matrix (see below) with a little twist: the central coefficient of 5 is adjusted based on the new value of sharpness as follows: \(coef_5 = 5 + sharpness\), where \(sharpness\) is in range \([-1..+1]\). 
 + 
 +\[  
 +\left[ {\begin{array}{ccc} 
 + 0 & -1 & 0 \\ 
 + -1 & coef_5 & -1 \\ 
 + 0 & -1 & 0 \\ 
 +\end{array} } \right] 
 + \]
  
-|  ''0''  |  ''-1''  |  ''0''  | 
-|  ''-1''  |  **''coef_5''**  |  ''-1''  | 
-|  ''0''  |  ''-1''  |  ''0''  | 

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also, you acknowledge that you have read and understand our Privacy Policy. If you do not agree, please leave the website.

More information