Bonjour,
je veux développez une application qui me permet de détecte un visage puis l'identifier donc j'utilise emgu en C#, quand je tape le code suivant puis je compile un msg d'erreur s'affiche.
code :
le message d'erreur
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46 /// /////////Variable////////////////////////////////////////// Capture CAM1 = null; bool capvid = false; Image<Bgr, Byte> ImgCam; HaarCascade haar; private void Form1_Load(object sender, EventArgs e) { try { CAM1 = new Capture(0); }catch (NullReferenceException except){ MessageBox.Show("Le périphérique d'acquisition est introuvable", "Pointeuse", MessageBoxButtons.OK); start.Text = "Resume"; return; } Application.Idle += CaptureVideo; capvid = true; start.Text = "Stop !"; } private void Form1_Formclosed(object sender, FormClosedEventArgs e) { if (CAM1 != null) { CAM1.Dispose(); } } void CaptureVideo(object sender, EventArgs arg) { haar = new HaarCascade("haarcascade_frontalface_alt_tree.xml"); ImgCam = CAM1.QueryFrame(); if (ImgCam !=null) { Image<Gray, byte> imgray = ImgCam.Convert<Gray, byte>(); var faces = imgray.DetectHaarCascade(haar, 1.4, 4, HAAR_DETECTION_TYPE.DO_CANNY_PRUNING , new Size(25, 25))[0]; foreach (var face in faces) { ImgCam.Draw(face.rect, new Bgr(Color.Green), 3); } } scr.Image = ImgCam; }
le fichier emgu.cv.dll est bien dans le répertoire debug/bin
la fenetre de sortie debogueur j'ai ceci
et enfin j'ai la description suivante
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 'WindowsFormsApplication2.vshost.exe' (CLR v4.0.30319: WindowsFormsApplication2.vshost.exe)*: Chargé 'C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée. 'WindowsFormsApplication2.vshost.exe' (CLR v4.0.30319: WindowsFormsApplication2.vshost.exe)*: Chargé 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll'. Chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée. 'WindowsFormsApplication2.vshost.exe' (CLR v4.0.30319: WindowsFormsApplication2.vshost.exe)*: Chargé 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll'. Chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée. 'WindowsFormsApplication2.vshost.exe' (CLR v4.0.30319: WindowsFormsApplication2.vshost.exe)*: Chargé 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'. Chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée. 'WindowsFormsApplication2.vshost.exe' (CLR v4.0.30319: WindowsFormsApplication2.vshost.exe)*: Chargé 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'. Chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée. 'WindowsFormsApplication2.vshost.exe' (CLR v4.0.30319: WindowsFormsApplication2.vshost.exe)*: Chargé 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll'. Chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée. 'WindowsFormsApplication2.vshost.exe' (CLR v4.0.30319: WindowsFormsApplication2.vshost.exe)*: Chargé 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll'. Chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée. 'WindowsFormsApplication2.vshost.exe' (CLR v4.0.30319: WindowsFormsApplication2.vshost.exe)*: Chargé 'D:\Projets\WindowsFormsApplication2\WindowsFormsApplication2\bin\Debug\WindowsFormsApplication2.vshost.exe'. Chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée. 'WindowsFormsApplication2.vshost.exe' (CLR v4.0.30319: WindowsFormsApplication2.vshost.exe)*: Chargé 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll'. Chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée. 'WindowsFormsApplication2.vshost.exe' (CLR v4.0.30319: WindowsFormsApplication2.vshost.exe)*: Chargé 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll'. Chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée. 'WindowsFormsApplication2.vshost.exe' (CLR v4.0.30319: WindowsFormsApplication2.vshost.exe)*: Chargé 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll'. Chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée. 'WindowsFormsApplication2.vshost.exe' (CLR v4.0.30319: WindowsFormsApplication2.vshost.exe)*: Chargé 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll'. Chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée. 'WindowsFormsApplication2.vshost.exe' (CLR v4.0.30319: WindowsFormsApplication2.vshost.exe)*: Chargé 'C:\Windows\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll'. Chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée. 'WindowsFormsApplication2.vshost.exe' (CLR v4.0.30319: WindowsFormsApplication2.vshost.exe)*: Chargé 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Deployment\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Deployment.dll'. Chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée. 'WindowsFormsApplication2.vshost.exe' (CLR v4.0.30319: WindowsFormsApplication2.vshost.exe)*: Chargé 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'. Chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée. 'WindowsFormsApplication2.vshost.exe' (CLR v4.0.30319: WindowsFormsApplication2.vshost.exe)*: Chargé 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\mscorlib.resources\v4.0_4.0.0.0_fr_b77a5c561934e089\mscorlib.resources.dll'. Le module a été généré sans symboles. Le thread 0x1a00 s'est arrêté avec le code 259 (0x103). Le thread 0x292c s'est arrêté avec le code 259 (0x103). 'WindowsFormsApplication2.vshost.exe' (CLR v4.0.30319: WindowsFormsApplication2.vshost.exe)*: Chargé 'D:\Projets\WindowsFormsApplication2\WindowsFormsApplication2\bin\Debug\WindowsFormsApplication2.exe'. Les symboles ont été chargés. 'WindowsFormsApplication2.vshost.exe' (CLR v4.0.30319: WindowsFormsApplication2.vshost.exe)*: Chargé 'D:\Projets\WindowsFormsApplication2\WindowsFormsApplication2\bin\Debug\Emgu.CV.dll'. Le module a été généré sans symboles. 'WindowsFormsApplication2.vshost.exe' (CLR v4.0.30319: WindowsFormsApplication2.vshost.exe)*: Chargé 'D:\Projets\WindowsFormsApplication2\WindowsFormsApplication2\bin\Debug\Emgu.Util.dll'. Le module a été généré sans symboles. 'WindowsFormsApplication2.vshost.exe' (CLR v4.0.30319: WindowsFormsApplication2.vshost.exe)*: Chargé 'D:\Projets\WindowsFormsApplication2\WindowsFormsApplication2\bin\Debug\Emgu.CV.UI.dll'. Le module a été généré sans symboles. 'WindowsFormsApplication2.vshost.exe' (CLR v4.0.30319: WindowsFormsApplication2.vshost.exe)*: Chargé 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'. Chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée. 'WindowsFormsApplication2.vshost.exe' (CLR v4.0.30319: WindowsFormsApplication2.vshost.exe)*: Chargé 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms.resources\v4.0_4.0.0.0_fr_b77a5c561934e089\System.Windows.Forms.resources.dll'. Le module a été généré sans symboles. Une exception de première chance de type 'System.IO.FileNotFoundException' s'est produite dans Emgu.CV.dll Une exception non gérée du type 'System.IO.FileNotFoundException' s'est produite dans Emgu.CV.dll Informations supplémentaires*: File Not Found Le programme '[8428] WindowsFormsApplication2.vshost.exe: Trace du programme' s'est arrêté avec le code 0 (0x0). Le programme '[8428] WindowsFormsApplication2.vshost.exe' s'est arrêté avec le code 0 (0x0).
voila.
Partager