ResampleHQ kernel visualizations
Original version: https://svn.code.sf.net/p/int64/svn/resamplehq/doc/kernels.html
The translation is from 教程13 - Resizer by VCB-Studio
This page attempts to visualize various resampling kernels in a way that will help to you
choose which one is right for you. There is no "best" kernel -- they all have their uses and
the right one for will depend greatly on both the source and personal preference.
為了讓你能更好的了解並選擇 resize 算法,這個頁面把許多常用算法圖表化。沒有所謂的「最好算法」,
既然這些算法被人研究,那麼它們都是有用的,只是適用的場合和使用者的偏好各不一樣罷了。
Start off with a common choice, like Mitchell-Netravali or Lanczos3. If it doesn't look
acceptible, compare them with other kernels on the graphs to find one that has better
properties in the area you wish to improve.
先從一個通用的算法開始,比如 Bicubic 或者 Lanczos ,如果你覺得它看上去不夠好,和其他的算法比較一下,
然後找出更符合你需要和口味的算法。
The X axis represents the distance between the optimal sample location and the actual sample
location. A dead-on hit would be at 0.0, while a hit one pixel away would be 1.0, and so on.
Note that kernels can take multiple samples.
X軸代表了理想取樣點(比如說,按照公式計算,resizer 後的圖像應該對應原圖 (1.75,1) 的位置,
那麼 (1.75,1) 就是理想採樣點)和實際取樣點(但是實際原圖中只有 (1,1) 和 (2,1) 兩個像素,
沒有小數坐標,那麼這兩個點就是實際取樣點)間的距離 (分別為 0.75 和 0.25 )。0.0 這個位置
表示 resize 的時候最理想樣點正好落在原圖某個像素上,1.0 表示理想取樣點和原圖中有的像素,
在縮放後的圖像裏面偏差了 1 個像素。以此類推。
The Y axis represents the weight applied to the sample at that distance. Note that most
kernels have negative weights at some distances.
Y軸代表了在不同距離段採取怎樣的加權。注意了有些算法有負數權值。
Note: The graphs below require a web browser with HTML5 Canvas and Javascript support
to display. Any modern browser like Firefox 3.5, Chrome, and IE9 should work. If you don't
see graphs, upgrade your browser!
注意:看圖需要 HTML5,IE6 這種滾粗。
Here are some of my own observations:
以下是我個人一些觀察:
Mouseover the kernel names to highlight the corresponding line on the graph.
將鼠標懸停在算法名稱上,以突出顯示圖表上相應的曲線。