Face Detection with OpenCV

-3

I want to use these codes http://docs.opencv.org/3.2.0/db/d28/tutorial_cascade_classifier.html in VisualStudio to detect faces and i copy 2 XML file in my current directory . but i have some errors. my camera want to open but very quicly close ( exited with code 0 ). how can solve this problem ?

errors:

'OpencvFaceDetection.exe' (Win32): Loaded 'C:\dev\workspace\c++\OpencvFaceDetection\x64\Debug\OpencvFaceDetection.exe'. Symbols loaded. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\dev\workspace\c++\OpencvFaceDetection\OpencvFaceDetection\opencv_world320d.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\msvcp140d.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\user32.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\gdi32.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\ole32.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\combase.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140d.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbased.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\oleaut32.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\comdlg32.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\cryptbase.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\SHCore.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\shlwapi.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\bcryptprimitives.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\shell32.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\windows.storage.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_5.82.10240.16384_none_0212ec7eba871e86\comctl32.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\kernel.appcore.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\powrprof.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\profapi.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\avifil32.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\avicap32.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\concrt140d.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\msvfw32.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\msacm32.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\winmm.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\winmmbase.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\winmmbase.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\winmmbase.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Unloaded 'C:\Windows\System32\winmmbase.dll' 'OpencvFaceDetection.exe' (Win32): Unloaded 'C:\Windows\System32\winmmbase.dll' 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\cfgmgr32.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\devobj.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\imm32.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\msctf.dll'. Cannot find or open the PDB file.

***** VIDEOINPUT LIBRARY - 0.1995 - TFW07 *****

'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\OpenCL.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\amdocl64.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\setupapi.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\opengl32.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\version.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\dbghelp.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\ddraw.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\glu32.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\dciman32.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\atiadlxx.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\psapi.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\ws2_32.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\propsys.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\userenv.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\nsi.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\wtsapi32.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\IPHLPAPI.DLL'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\winnsi.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\wintrust.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\msasn1.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\crypt32.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\amdocl12cl64.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\dwmapi.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\atig6txx.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Unloaded 'C:\Windows\System32\atig6txx.dll' 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\atig6txx.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\atiumd6a.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\IntelOpenCL64.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Program Files (x86)\Common Files\Intel\OpenCL\bin\x64\intelocl64.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Program Files (x86)\Common Files\Intel\OpenCL\bin\x64\task_executor64.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Program Files (x86)\Common Files\Intel\OpenCL\bin\x64\cpu_device64.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\igdrcl64.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\dxgi.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\rmclient.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Unloaded 'C:\Windows\System32\rmclient.dll' 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\amdhdl64.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Unloaded 'C:\Windows\System32\amdhdl64.dll' 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\igdfcl64.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\igdmcl64.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\igdbcl64.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\igdusc64.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\uxtheme.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\clbcatq.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\devenum.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\ntmarta.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\msdmo.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Unloaded 'C:\Windows\System32\devenum.dll' 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\MMDevAPI.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\wdmaud.drv'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\avrt.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\ksuser.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\AudioSes.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\WinTypes.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\msacm32.drv'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\midimap.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\vfwwdm32.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\devenum.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\ksproxy.ax'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\d3d9.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\policymanager.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\xmllite.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\msvcp110_win.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\vidcap.ax'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\Kswdmcap.ax'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\mfc42.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\odbc32.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\dpapi.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\qcap.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\quartz.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\iyuv_32.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Unloaded 'C:\Windows\System32\iyuv_32.dll' 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\iyuv_32.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Unloaded 'C:\Windows\System32\iyuv_32.dll' 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\msrle32.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Unloaded 'C:\Windows\System32\msrle32.dll' 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\msvidc32.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Unloaded 'C:\Windows\System32\msvidc32.dll' 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\msyuv.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Unloaded 'C:\Windows\System32\msyuv.dll' 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\msyuv.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Unloaded 'C:\Windows\System32\msyuv.dll' 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\tsbyuv.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Unloaded 'C:\Windows\System32\tsbyuv.dll' 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\msyuv.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Unloaded 'C:\Windows\System32\msyuv.dll' 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\SysWOW64\tsccvid64.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\tsccvid64.dll' 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\SysWOW64\tsc2_codec64.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\tsc2_codec64.dll' 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\iyuv_32.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Unloaded 'C:\Windows\System32\iyuv_32.dll' 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\iyuv_32.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Unloaded 'C:\Windows\System32\iyuv_32.dll' 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\msrle32.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Unloaded 'C:\Windows\System32\msrle32.dll' 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\msvidc32.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Unloaded 'C:\Windows\System32\msvidc32.dll' 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\msyuv.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Unloaded 'C:\Windows\System32\msyuv.dll' 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\msyuv.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Unloaded 'C:\Windows\System32\msyuv.dll' 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\tsbyuv.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Unloaded 'C:\Windows\System32\tsbyuv.dll' 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\System32\msyuv.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Unloaded 'C:\Windows\System32\msyuv.dll' 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\SysWOW64\tsccvid64.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\tsccvid64.dll' 'OpencvFaceDetection.exe' (Win32): Loaded 'C:\Windows\SysWOW64\tsc2_codec64.dll'. Cannot find or open the PDB file. 'OpencvFaceDetection.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\tsc2_codec64.dll' The thread 0x1d64 has exited with code -2147024637 (0x80070103). 'OpencvFaceDetection.exe' (Win32): Unloaded 'C:\Windows\System32\vfwwdm32.dll' The thread 0x127c has exited with code 0 (0x0). The thread 0xd6c has exited with code 0 (0x0). The thread 0x1278 has exited with code 0 (0x0). The thread 0x73c has exited with code 0 (0x0). The thread 0x408 has exited with code 0 (0x0). The thread 0x1270 has exited with code 0 (0x0). The program '[2756] OpencvFaceDetection.exe' has exited with code 0 (0x0).

c++
opencv
face-recognition
haar-classifier
cascade-classifier
asked on Stack Overflow May 4, 2017 by Android developer • edited May 4, 2017 by Android developer

1 Answer

0

i could solve it myself. answer is very easy : you should change parameter of this function with 0 :

capture.open(-1); ----> capture.open(0); enter image description here

answered on Stack Overflow May 4, 2017 by Android developer

User contributions licensed under CC BY-SA 3.0