the example program on shearlet transform code not working

1 次查看(过去 30 天)
I have the code below:
% simple example for FFST
% computes the shearlet transform of some geometric image
%
%--------------------------------------------------------------------------
% Sören Häuser ~ FFST ~ 2014-07-22 ~ last edited: 2014-07-22 (Sören Häuser)
% create image
A = rgb2gray(imread('G:/matlab2013/Crack/bin/gm.jpg'));
% shearlet transform
[ST,Psi] = shearletTransformSpect(A);
% inverse shearlet transform
C = inverseShearletTransformSpect(ST,Psi);
% plot results
subplot(2,2,1)
imagesc(A)
axis image off
colormap(gray)
title('original image')
subplot(2,2,2)
imagesc(abs(ST(:,:,18)))
axis image off
colormap(gray)
title('shearlet coefficients')
subplot(2,2,3)
imagesc(Psi(:,:,18))
axis image off
colormap(gray)
title('shearlet')
subplot(2,2,4)
imagesc(C)
axis image off
colormap(gray)
title('reconstructed image')
-----------------------------------------------------------
plz how to make it work....
------------------------------------------------
its giving error like:
>> simple_example
Warning: Image is integer valued!
> In checkImage at 19
In shearletTransformSpect at 56
In simple_example at 12
Error using shearletTransformSpect (line 56)
Argument 'A' failed validation checkImage.
Error in simple_example (line 12)
[ST,Psi] = shearletTransformSpect(A);
------------------------------------------------------------------
gm.jpg is a natural image

回答(2 个)

hp
hp 2017-12-8
this is wat input image i have given to simple_example program to obtain shearlet coefficients and shearlets
  2 个评论
ponnu kunnath
ponnu kunnath 2018-3-7
>> sshshss Undefined function or variable 'shearletTransform'.
Error in sshshss (line 7) [ST,Psi] = shearletTransform(A);for above code error like this is shown,pls help

请先登录,再进行评论。


Walter Roberson
Walter Roberson 2018-3-7
You have to put
A = double(A);
after your
A = rgb2gray(imread('G:/matlab2013/Crack/bin/gm.jpg'));

类别

Help CenterFile Exchange 中查找有关 Image Analysis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by