資源簡(jiǎn)介
在MATLAB文件夾中加入圖片即可進(jìn)行柱面投影,對(duì)X和Y軸進(jìn)行變換。
代碼片段和文件信息
I?=?imread(‘timg.jpg‘);
[height?width?depth]?=?size(I);
A?=?I;
centerX?=?width?/?2;
centerY?=?height?/?2;
%?alpha?=?pi?/?4;
f?=?width?/?(2?*?tan(pi/4/2));
for?i?=?1?:?width
for?j?=?1?:?height
theta?=?asin((i?-?centerX)?/?f);
pointX?=?int32(f?*?tan((i?-?centerX)?/?f)?+?centerX);
point
評(píng)論
共有 條評(píng)論