⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fenjieyigeyaun.m

📁 在matlab环境下生成一个正方形中心嵌套一个圆
💻 M
字号:
disp(' ');
disp('fdct_usfft_demo_disp.m -- Displays the curvelet coefficients of an image');
disp(' ');
disp('1. The low frequency (coarse scale) coefficients are stored at');
disp('   the center of the display.') 
disp(['2. The Cartesian concentric coronae show the coefficients at different']); 
disp('   scales; the outer coronae correspond to higher frequencies.');
disp(['3. There are four strips associated to each corona, corresponding to']);
disp('   the four cardinal points; these are further subdivided in angular panels.');     
disp(['4. Each panel represent coefficients at a specified scale and along']);
disp('   the orientation suggested by the position of the panel.');
disp(' ');

% fdct_usfft_demo_disp.m -- Displays the curvelet coefficients of an image




n=512;
a=input('声明:生成的图像放在work文件夹,以123456命名,请输入你想要生成的图形中方形的边长:');
b=input('请输入你想要生成的图形中圆形的半径(注意:半径不要太大):');
c=input('请输入你想要生成的图形中方形的灰度值:');
d=input('请输入你想要生成的图形中圆形的灰度值:');
y=zeros(a,a);
w=fix((a+1)/2);
for i=1:a
    for j=1:a
        if (sqrt((i-w)^2+(j-w)^2)<=b)
            y(i,j)=d;
        else
            y(i,j)=c;
        end
    end
end
imwrite(y,'123456.jpg');

X=imread('123456.jpg');





%forward curvelet transform
disp('Take curvelet transform: fdct_usfft');
tic; C = fdct_usfft(X,0); toc;

%generate curvelet image (a complex array)
img = fdct_usfft_dispcoef(C);

%display original image and the curvelet coefficient image
subplot(1,2,1); colormap gray; imagesc(X); axis('image'); title('original image');
subplot(1,2,2); colormap gray; imagesc(abs(img)); axis('image'); title('log of curvelet coefficients');

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -