Struct contents reference from a non-struct array object.
11 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I am writting a code and in the last line of the code it shows the error "Struct contents reference from a non-struct array object.". Here is my code:
fic='cam2_person015.png';
img=imread(fic);
ti=size(img);
figure(1)
imshow(img);
normImage = mat2gray(img);
figure; imshow(normImage);
[x,y] = find(img);
lambda = 10.^(-9);
% lambda = eig(shadow);
meu = 10.^6;
H = heaviside(-y);
e = 1;
ee = e.^-((sqrt(x)/2.*sqrt(lambda))+(sqrt(y)/2.*sqrt(meu)));
anisotrophic_filter = img.*normImage.H.x.ee;
Kinldy check this. I shall be very thankful for the kind act of consideration.
6 commentaires
Jan
le 22 Mar 2019
@Shah Bano: Then use the debugger to check the sizes of the array. We cannot guess this detail.
By the way, 10.^(-9) is an expensive power operation, while 1e-9 is a cheap constant. The runtime will not matter here, but it is a good programming practice.
Réponses (0)
Voir également
Catégories
En savoir plus sur Image Preview and Device Configuration dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!