【发布时间】:2017-03-08 21:33:42
【问题描述】:
我想创建一个分辨率为 56 像素/直径的图像(例如:50、100 和 150 像素的不同直径),首先指定其高度和宽度,然后使用 meshgrid 函数将图像数字化(请参阅下面的示例代码)。其次,如何将分辨率提高 2 倍(例如:112 和 224 像素/直径)?
例子:
RowSize = 400;
ColSize = 400;
[gridRow, gridCol] = meshgrid(1:RowSize, 1:ColSize);
%specify the diameter
d = 100;
% create the image
I = (gridRow - 200).^2 + (gridCol - 200).^2 <= (d/2).^2;
figure, imshow(I, []);
我会想到的主要问题是如何确定 Row 和 Col 大小,以便获得所需的分辨率。
非常感谢任何帮助/建议。谢谢!
【问题讨论】:
标签: matlab image-processing resolution