Professional Documents
Culture Documents
TP Amal Ranoune1
TP Amal Ranoune1
I1=imread('00001.jpg');
figure, imshow(I1), title('negative')
ImNeg = rgb2gray(I);
cooccurence
statsNeg =
Contrast: [0.1465 0.2042 0.1372 0.1901]
Correlation: [0.8255 0.7569 0.8369 0.7736]
Energy: [0.3804 0.3483 0.3835 0.3577]
Homogeneity: [0.9291 0.9017 0.9324 0.9100]
VNeg=[statsNeg.Contrast,statsNeg.Correlation,statsNeg.Energy,statsNeg.Homogeneity]
image pos
I2=imread('00002.jpg');
figure, imshow(I2), title('Test 1')
convertir l'image au niveau de gris
ImT1 = rgb2gray(I2);
cooccurence
statsT1 =
Contrast: [0.1160 0.1506 0.1124 0.1669]
Correlation: [0.8208 0.7660 0.8257 0.7406]
Energy: [0.4184 0.3951 0.4203 0.3850]
Homogeneity: [0.9424 0.9254 0.9439 0.9174]
VT1=[statsT1.Contrast,statsT1.Correlation,statsT1.Energy,statsT1.Homogeneity]
image test1
I3=imread('00003.jpg');
figure, imshow(I3), title('Positive')
convertir l'image au niveau de gris
ImPos = rgb2gray(I3);
cooccurence
statsPos =
Contrast: [0.1317 0.1986 0.0939 0.1472]
Correlation: [0.9237 0.8848 0.9453 0.9146]
Energy: [0.7315 0.7203 0.7336 0.7230]
Homogeneity: [0.9559 0.9445 0.9608 0.9502]
VPos=[statsT1.Contrast,statsPos.Correlation,statsPos.Energy,statsPos.Homogeneity]
image test2
I4=imread('00011.jpg');
figure, imshow(I4), title('test2')
convertir l'image au niveau de gris
ImT2 = rgb2gray(I4);
COOCCURRENCE
statsT2 =
Contrast: [0.1800 0.2696 0.1226 0.1965]
Correlation: [0.9388 0.9085 0.9582 0.9333]
Energy: [0.5395 0.5180 0.5393 0.5219]
Homogeneity: [0.9391 0.9193 0.9453 0.9256]
VT2=[statsT2.Contrast,statsT2.Correlation,statsT2.Energy,statsT2.Homogeneity]
D1=pdist2(VT1,VPos,'Minkowski')
D1 = 0.6982
D2=pdist2(VT1,VNeg,'Minkowski')
D2 = 0.1137
D3=pdist2(VT2,VPos,'Minkowski')
D3 = 0.4223
D4=pdist2(VT2,VNeg,'Minkowski')
D4 = 0.4334
Etape 4:
FNeg = extractLBPFeatures(ImNeg,'Upright',false)
FPos = extractLBPFeatures(ImPos,'Upright',false)
FT1 = extractLBPFeatures(ImT1,'Upright',false)
FT2 = extractLBPFeatures(ImT2,'Upright',false)
D1=pdist2(FT1,FPos,'Minkowski')
D1 = 0.2454
D2=pdist2(FT1,FNeg,'Minkowski')
D2 = 0.1895
D3=pdist2(FT2,FPos,'Minkowski')
D3 = 0.1433
D4=pdist2(FT2,FNeg,'Minkowski')
D4 = 0.2364
I5=imread('00029.jpg');
imshow(I5), title('image5')
Im5 = rgb2gray(I5);
I6=imread('00032.jpg');
imshow(I6), title('image6')
Im6= rgb2gray(I6);
F5 = extractLBPFeatures(Im5,'Upright',false)
F5 = 1x10 single
F6 = extractLBPFeatures(Im6,'Upright',false)
F6 = 1x10 single