是否有可能在Matlab中切割一部分图像,使切割线处于分数像素位置?
希望在imwarp函数契约中包含imref2d类来指定图像的世界维数。

我想要切割的图像有像素,对齐它自己的边距,因此,相对于原来的像素。但是像素的比例应该是相同的。
发布于 2014-12-23 22:18:50
我不知道任何匹配的图像处理功能,所以我会手动执行:
%defines the image section you want
I={[2.5:1:5],[3.5:1:5.5]}
%spans a grid
[P{1},P{2}]=ndgrid(I{:})
%interpolates using the grid
IMG2=interpn(IMG,P{:})此代码用于2D图像(灰度),用于彩色图像:
%defines the image section you want
I={[2.5:1:5],[3.5:1:5.5]}
%We dont want to interpolate on colour axis, fix it to 1:3 for rgb
I{3}=1:size(IMG,3)
%spans a grid
[P{1},P{2},P{3}]=ndgrid(I{:})
%interpolates using the grid
IMG2=interpn(IMG,P{:})https://stackoverflow.com/questions/27628578
复制相似问题