【发布时间】:2015-03-26 04:40:56
【问题描述】:
我在使用 matlab 时遇到了一个问题。我正在尝试保存一个二进制图像的缩小版本以及该二进制图像的两个缩小版本。在matlab中很简单,如下代码所示:
scale1_2= impyramid(compressed_image, 'reduce');
scale1_4= impyramid(scale1_2, 'reduce');
因此,尺寸为 810x1080 的图像以 405x540 和 203x270 像素保存。我面临的问题是当我尝试将这两个图像扩展回与以前相同的尺寸时。
scaled_result1_2=impyramid(scale1_2,'expand');
scaled_result1_4=impyramid(impyramid(scale1_4,'expand'), 'expand');
因此,预计 scaled_result1_2 和 scaled_result1_4 又是 810x1080 图像,但不是:
>>size(scaled_result1_2)
809 1079
>>size(scaled_result1_4)
809 1077
我需要这两个图像再次具有相同的 810x1080 像素,但 impyramid 无法做到这一点。如果我用 imresize 调整这些图像的大小,它会通过放大和模糊图像来执行图像金字塔分解吗?我应该使用哪种方法(插值)来获得类似的结果?
【问题讨论】:
标签: image matlab image-processing computer-vision