PLEASE HELP TO SOLVE THE ERROR IN BELOW HOMOMORPHIC CODE ................

ERROR: (??? Error using ==> imageDisplayParsePVPairs at 72 Invalid input arguments.
Error in ==> imageDisplayParseInputs at 70
[common_args,specific_args] = imageDisplayParsePVPairs(varargin{:});
Error in ==> imshow at 199
[common_args,specific_args] = ...
Error in ==> homo at 25
figure(4),imshow(Ihmf, 'montage'); )
CODE:
clc
clear all
close all
I = imread('C:\Users\shankar\Documents\MATLAB\filtering\gaussian1.jpg');
figure(1),imshow(I)
I = im2double(I);
I = log(1 + I);
M = 2*size(I,1) + 1;
N = 2*size(I,2) + 1;
sigma = 10;
[X, Y] = meshgrid(1:N,1:M);
centerX = ceil(N/2);
centerY = ceil(M/2);
gaussianNumerator = (X - centerX).^2 + (Y - centerY).^2;
H = exp(-gaussianNumerator./(2*sigma.^2));
H = 1 - H;
figure(2),imshow(H,'InitialMagnification',25)
H = fftshift(H);
If1 = fft2(I, M, N);
If=rgb2gray(If1);
figure(3),imshow(If)
Iout = real(ifft2(H.*If));
Iout = Iout(1:size(I,1),1:size(I,2));
Ihmf = exp(Iout)- 1;
figure(4),imshow(Ihmf, 'montage');

댓글 수: 1

I've edited the message to apply a code formatting. Please use the "{} Code" button to post readable code.
I still cannot imagine why posters do not care about unreadable code. They want others to read and fix the problems and several times each day reminders are required. It would be very useful if MathWorks add a HUGE red reminder and explanantion of the "{} Code" button in the field for creating a question, at least for the first 5 posts of a user.

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

답변 (2개)

Jan
Jan 2016년 4월 5일

0 개 추천

I do not find the argument "montage" in the help text om imshow .
Jay
Jay 2016년 4월 14일
The problem is in last line.
use :
figure,imshowpair(Ihmf,I,'montage');
imshow() doesn't have any property named 'montage'.

카테고리

도움말 센터File Exchange에서 Just for fun에 대해 자세히 알아보기

태그

질문:

2016년 4월 5일

답변:

Jay
2016년 4월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by