图像旋转,最邻近插值我要分享

Image rotation, nearest neighbor interpolation

matlab

关注次数: 253

下载次数: 0

文件大小: 5.14 kB

代码分类: 其他

开发平台: matlab

下载需要积分: 2积分

版权声明:如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

代码描述

中文说明:最邻近插值(近邻取样法): 最临近插值的的思想很简单。对于通过反向变换得到的的一个浮点坐标,对其进行简单的取整,得到一个整数型坐标,这个整数型坐标对应的像素值就是目的像素的像素值,也就是说,取浮点坐标最邻近的左上角点(对于DIB是右上角,因为它的扫描行是逆序存储的)对应的像素值。可见,最邻近插值简单且直观,但得到的图像质量不高 


English Description:

Nearest neighbor interpolation (nearest neighbor sampling method):Nearest neighbor interpolation of ideas is very simple. Through the inverse transform to get a floating point coordinates, to simple rounding, get an integer coordinates, the integer type corresponding to the pixel values are pixel-by-pixel value, in other words, take the nearest floating-point coordinates of upper-left corner point (for DIB is on the upper right, because the scan is stored in reverse order) corresponds to the pixel value. Thus, nearest neighbor interpolation is simple and intuitive, but image quality is not high


代码预览