Struct contents reference from a non-struct array object.
11 views (last 30 days)
Show older comments
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 Comments
Jan
on 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.
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!