필터 지우기
필터 지우기

why i cant get the second figure ? how can i fix it

조회 수: 1 (최근 30일)
sevgul demir
sevgul demir 2022년 9월 2일
댓글: Rena Berman 2022년 11월 1일
clear all; close all;
I = imread('64img.png','png');
I = double(I);
figure;imshow (abs(I));
title ('test')
PH=rand([64,64]);
I = I .* exp(2i*pi*PH);
FTS = fftshift (ifft2 (fftshift (I)));
A = abs (FTS);
figure; imshow (mat2gray (A));
title ('objective spectrum')
here i can get the first figure but after that got an error why i cant get the objective spectrum? Couldnt fix it :(
  댓글 수: 2
Chunru
Chunru 2022년 9월 2일
What is error message? Where it goes wrong?
Rena Berman
Rena Berman 2022년 11월 1일
(Answers Dev) Restored edit

댓글을 달려면 로그인하십시오.

채택된 답변

Chunru
Chunru 2022년 9월 2일
I = imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1114385/image.bmp');
I = double(I);
figure;imshow (abs(I));
title ('test')
%PH=rand([64,64]);
PH = rand(size(I)); % make PH the same size as I
I = I .* exp(2i*pi*PH);
FTS = fftshift (ifft2 (fftshift (I)));
A = abs (FTS);
figure; imshow (mat2gray (A));
title ('objective spectrum')

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Graphics Object Programming에 대해 자세히 알아보기

태그

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by