フィルターのクリア

how to save the image using imwrite ?

1 回表示 (過去 30 日間)
ajeet verma
ajeet verma 2017 年 3 月 22 日
コメント済み: ajeet verma 2017 年 3 月 22 日
i have a code and i am unable to save the final image using imwrite, so how to save the image? code is given below
m=256;
n=256;
f1=10; % No. of vertical fringes
f2=0; % No. of horizontal fringes
for i=1:m
for j=1:n
a1(i,j)=exp(1i*(2*pi*(f1*j/n+f2*i/m)-2*pi/3));
a2(i,j)=exp(1i*(2*pi*(f1*j/n+f2*i/m)));
a3(i,j)=exp(1i*(2*pi*(f1*j/n+f2*i/m)+2*pi/3));
end
end
Color=zeros(256,256,3);
Color(:,:,1)=a1;
Color(:,:,2)=a2;
Color(:,:,3)=a3;
imshow(Color,[]);

採用された回答

KSSV
KSSV 2017 年 3 月 22 日
編集済み: KSSV 2017 年 3 月 22 日
m=256;
n=256;
f1=10; % No. of vertical fringes
f2=0; % No. of horizontal fringes
a1 = zeros(m,n) ;
a2 = zeros(m,n) ;
a3 = zeros(m,n) ;
for i=1:m
for j=1:n
a1(i,j)=exp(1i*(2*pi*(f1*j/n+f2*i/m)-2*pi/3));
a2(i,j)=exp(1i*(2*pi*(f1*j/n+f2*i/m)));
a3(i,j)=exp(1i*(2*pi*(f1*j/n+f2*i/m)+2*pi/3));
end
end
Color=zeros(m,n,3);
Color(:,:,1)=a1;
Color(:,:,2)=a2;
Color(:,:,3)=a3;
imshow(Color,[]);
imwrite(Color,'myimage.jpg')
  1 件のコメント
ajeet verma
ajeet verma 2017 年 3 月 22 日
thankyou

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by