modification des images de rejet et modifications finales du PMC
|
@ -18,7 +18,8 @@ classes = []; %colonne [avance; arret; gauche; droite; rejet]
|
|||
% c'est lent
|
||||
% s'assurer que l'on choisit toutes les images
|
||||
%
|
||||
for n=1:dataset_size
|
||||
n=1;
|
||||
while n<dataset_size+1
|
||||
% choix d'une image aleatoire
|
||||
choix = 1 + floor(dataset_size*rand(dataset_size, 1));
|
||||
% extraction de l'image du dataset
|
||||
|
@ -29,29 +30,39 @@ for n=1:dataset_size
|
|||
binary = rgb_filter(img, threshold);
|
||||
% determination du contour
|
||||
c = contourc(binary);
|
||||
% Determination du contour de taille max
|
||||
cont = max_contour(c);
|
||||
% transformation en signal complexe
|
||||
z = cont(:,1) + 1i*cont(:,2);
|
||||
% calcul des descripteurs de Fourier
|
||||
[coeff,ncoeff]=descripteurfouriernorm(z,cmax);
|
||||
% Extraction des composantes
|
||||
vecteurs(:,n)=[real(coeff);imag(coeff)];
|
||||
% Ajout de la classe correspondante
|
||||
deb = dataset(choix(1)).name(1:2);
|
||||
if deb == 'av'
|
||||
classes = [classes , [1;0;0;0;0]];
|
||||
elseif deb == 'ar'
|
||||
classes = [classes , [0;1;0;0;0]];
|
||||
elseif deb == 'ga'
|
||||
classes = [classes , [0;0;1;0;0]];
|
||||
elseif deb == 'dr'
|
||||
classes = [classes , [0;0;0;1;0]];
|
||||
elseif deb == 're'
|
||||
classes = [classes , [0;0;0;0;1]];
|
||||
end
|
||||
% affichage de l'avancement
|
||||
disp(n/dataset_size);
|
||||
if size(c,2)~=0
|
||||
|
||||
% Determination du contour de taille max
|
||||
cont = max_contour(c);
|
||||
% transformation en signal complexe
|
||||
z = cont(:,1) + 1i*cont(:,2);
|
||||
if length(z)>11
|
||||
|
||||
% calcul des descripteurs de Fourier
|
||||
[coeff,ncoeff]=descripteurfouriernorm(z,cmax);
|
||||
% Extraction des composantes
|
||||
vecteurs(:,n)=[real(coeff);imag(coeff)];
|
||||
% Ajout de la classe correspondante
|
||||
deb = dataset(choix(1)).name(1:2);
|
||||
if deb == 'av'
|
||||
classes = [classes , [1;0;0;0;0]];
|
||||
elseif deb == 'ar'
|
||||
classes = [classes , [0;1;0;0;0]];
|
||||
elseif deb == 'ga'
|
||||
classes = [classes , [0;0;1;0;0]];
|
||||
elseif deb == 'dr'
|
||||
classes = [classes , [0;0;0;1;0]];
|
||||
else
|
||||
classes = [classes , [0;0;0;0;1]];
|
||||
end
|
||||
|
||||
|
||||
% affichage de l'avancement
|
||||
disp(n/dataset_size);
|
||||
n = n+1;
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
% utilisation de l'algorithme des kmeans
|
||||
|
@ -74,7 +85,7 @@ end
|
|||
|
||||
% utilisation de l'algorithme du perceptron multicouches
|
||||
|
||||
[net, resultats_test] = PMC_training(vecteurs, classes, 10, 800);
|
||||
[net, resultats_test] = PMC_training(vecteurs, classes, 10, 1100);
|
||||
|
||||
%faire une prediction : y = net(x)
|
||||
|
||||
|
|
BIN
learning/images/rejet/faux_0.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_1.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_10.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_100.jpg
Normal file
After Width: | Height: | Size: 44 KiB |
BIN
learning/images/rejet/faux_101.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_102.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_103.jpg
Normal file
After Width: | Height: | Size: 41 KiB |
BIN
learning/images/rejet/faux_104.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_105.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_106.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_107.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_108.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_109.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_11.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_110.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_111.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_112.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_113.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_114.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_115.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_116.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_117.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_118.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_119.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_12.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_120.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_121.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_122.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_123.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_124.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_125.jpg
Normal file
After Width: | Height: | Size: 41 KiB |
BIN
learning/images/rejet/faux_126.jpg
Normal file
After Width: | Height: | Size: 41 KiB |
BIN
learning/images/rejet/faux_127.jpg
Normal file
After Width: | Height: | Size: 41 KiB |
BIN
learning/images/rejet/faux_128.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_129.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_13.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_130.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_131.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_132.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_133.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_134.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_135.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_136.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_137.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_138.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_139.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_14.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_140.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_141.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_142.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_143.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_144.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_145.jpg
Normal file
After Width: | Height: | Size: 44 KiB |
BIN
learning/images/rejet/faux_146.jpg
Normal file
After Width: | Height: | Size: 44 KiB |
BIN
learning/images/rejet/faux_147.jpg
Normal file
After Width: | Height: | Size: 44 KiB |
BIN
learning/images/rejet/faux_148.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_149.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_15.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_150.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_151.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_152.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_153.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_154.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_155.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_156.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_157.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_158.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_159.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_16.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_160.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_161.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_162.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_163.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_164.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_165.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_166.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_167.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_168.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_169.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_17.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_170.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_171.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_172.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_173.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_174.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_175.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_176.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_177.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_178.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_179.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_18.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_180.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_181.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_182.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_183.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
learning/images/rejet/faux_184.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_185.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_186.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
learning/images/rejet/faux_187.jpg
Normal file
After Width: | Height: | Size: 43 KiB |