I'm getting this error: Undefined function 'B1GLAM2x2' for input arguments of type 'uint8'. Error in BGLAM_train_ann (line 159) [GLAM1] = B1GLAM2x2(I); %%% Basic Gray Level Aura Matrix (BGLAM)

1 view (last 30 days)
FinalIm = uint8(FinalIm);
figure(9), imshow(FinalIm);title('Segmented image ROI1 (300x300)');
[m2 n2 d2] = size(FinalIm);
C1 = imcrop(FinalIm,[125 125 50 50]);
figure(10), imshow(C1);title('Segmented image ROI2 (50x50)');
C2 = imcrop(FinalIm,[100 100 100 100]);
figure(11), imshow(C2);title('Segmented image ROI3 (100x100)');
% [m3 n3 d3] = size(C);
I=FinalIm; %%%%(ROI1)
I1=C1;%%%%(ROI2)
I2=C2;%%%%(ROI3)
%%%%%%%image noise removes %%%%%%%%
[r c loon]=size(I);
[r1 c1 loon1]=size(I1);
[r2 c2 loon2]=size(I2);
width=r; height=c; d=loon;
width1=r1; height1=c1; d1=loon1;
width2=r2; height2=c2; d2=loon2;
for i=1:width
for j=1:height
if I(i,j,1)>= 150 && I(i,j,2)>= 150 && I(i,j,3)>= 0
I(i,j,1)= 0;
I(i,j,2)= 0;
I(i,j,3)= 0;
end;
end;
end ;
for i1=1:width1
for j1=1:height1
if I1(i1,j1,1)>= 150 && I1(i1,j1,2)>= 150 && I1(i1,j1,3)>= 0
I1(i1,j1,1)= 0;
I1(i1,j1,2)= 0;
I1(i1,j1,3)= 0;
end;
end;
end ;
for i2=1:width2
for j2=1:height2
if I2(i2,j2,1)>= 150 && I2(i2,j2,2)>= 150 && I2(i2,j2,3)>= 0
I2(i2,j2,1)= 0;
I2(i2,j2,2)= 0;
I2(i2,j2,3)= 0;
end;
end;
end ;
%
% figure(12), imshow(I);title('Segmented image ROI3 (100x100)');
% figure(13), imshow(I1);title('Segmented image ROI3 (100x100)');
% figure(14), imshow(I2);title('Segmented image ROI3 (100x100)');
% end
% return
%%%%%%Step5: image featur extraction %%%%%%%%%%%%%%%%
[GLAM1] = B1GLAM2x2(I); %%%Basic Gray Level Aura Matrix (BGLAM)
[GLAM2] = B2GLAM2x2(I1);
[GLAM3] = B3GLAM2x2(I2);
s1 = size(GLAM1);
s2 = size(GLAM2);
s3 = size(GLAM3);
nbre
%%%%%%Step6: Normalization %%%%%%%%
nor=max(GLAM1);
sample=(GLAM1/nor)';
nor1=max(GLAM2);
sample1=(GLAM2/nor1)';
nor2=max(GLAM3);
sample2=(GLAM3/nor2)';
  1 Comment
Geoff Hayes
Geoff Hayes on 27 Jan 2015
Muhammad - do you have the function B1GLAM2x2? In the Command Window, type
which B1GLAM2x2 -all
and see if the path to the function is returned. If not, check to see where this file (presumably it is either a file/function that you created or downloaded from somewhere) is located and add the folder (of this file) to your MATLAB search path.

Sign in to comment.

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!