相机校准 OpenCV 相机作为输入

Posted

技术标签:

【中文标题】相机校准 OpenCV 相机作为输入【英文标题】:Camera Calibration OpenCV Camera as the input 【发布时间】:2014-03-08 03:28:20 【问题描述】:

我使用本教程代码中的代码在我的笔记本电脑上进行相机校准。

这是链接 http://docs.opencv.org/doc/tutorials/calib3d/camera_calibration/camera_calibration.html#source-code

它运行但发出警告:

'ConsoleApplication1.exe': Loaded 'C:\Users\jay\Documents\Visual Studio 2010\Projects\ConsoleApplication1\Debug\ConsoleApplication1.exe', Symbols loaded.
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\ntdll.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\kernel32.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\KernelBase.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\opencv\build\x86\vc11\bin\opencv_core248.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\msvcp110.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\msvcr110.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\opencv\build\x86\vc11\bin\opencv_highgui248.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\user32.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\gdi32.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\lpk.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\usp10.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\msvcrt.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\ole32.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\rpcrt4.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\oleaut32.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\advapi32.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\sechost.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.18201_none_ec80f00e8593ece5\comctl32.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\msvfw32.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\winmm.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\shell32.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\shlwapi.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\avifil32.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\msacm32.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\avicap32.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\version.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\msvcp100d.dll', Symbols loaded.
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\msvcr100d.dll', Symbols loaded.
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\imm32.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\msctf.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\cryptbase.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\uxtheme.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\clbcatq.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\devenum.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\setupapi.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\cfgmgr32.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\devobj.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\ntmarta.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\Wldap32.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\wintrust.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\crypt32.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\msasn1.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\msdmo.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\qcap.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\quartz.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\dwmapi.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\ksproxy.ax', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\ksuser.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\d3d9.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\d3d8thk.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\vidcap.ax', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\Kswdmcap.ax', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\mfc42.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\odbc32.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\odbcint.dll', Binary was not built with debug information.
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\qedit.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\comdlg32.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7601.18120_none_72d2e82386681b36\GdiPlus.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\ddraw.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\dciman32.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\igdumd32.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\igddxva32.dll', Cannot find or open the PDB file
Dll Loaded :-) 
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\igdvidproc32.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\igdaux32.dll', Binary was not built with debug information.
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\d3dim700.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Unloaded 'C:\Windows\System32\igddxva32.dll'
'ConsoleApplication1.exe': Unloaded 'C:\Windows\System32\igdvidproc32.dll'
'ConsoleApplication1.exe': Unloaded 'C:\Windows\System32\igdaux32.dll'
'ConsoleApplication1.exe': Unloaded 'C:\Windows\System32\igdumd32.dll'
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\igdumd32.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\igddxva32.dll', Cannot find or open the PDB file
Dll Loaded :-) 
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\igdvidproc32.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\igdaux32.dll', Binary was not built with debug information.
'ConsoleApplication1.exe': Unloaded 'C:\Windows\System32\igddxva32.dll'
'ConsoleApplication1.exe': Unloaded 'C:\Windows\System32\igdvidproc32.dll'
'ConsoleApplication1.exe': Unloaded 'C:\Windows\System32\igdaux32.dll'
'ConsoleApplication1.exe': Unloaded 'C:\Windows\System32\igdumd32.dll'
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\msyuv.dll', Cannot find or open the PDB file
The thread 'Win32 Thread' (0x17bc) has exited with code 0 (0x0).
'ConsoleApplication1.exe': Unloaded 'C:\Windows\System32\msyuv.dll'
The thread 'Win32 Thread' (0xd4) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1594) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1390) has exited with code 0 (0x0).
The program '[5996] ConsoleApplication1.exe: Native' has exited with code 0 (0x0).

我的问题是如何使用笔记本电脑的摄像头实时输入我的图像,还是我必须录制视频或拍摄棋盘格的快照并将其放入 xml 文件中?

【问题讨论】:

【参考方案1】:

据我所知,您使用imread() 从硬盘加载已保存的图像。换句话说,拍摄快照并使用它们。

【讨论】:

如果我想用相机作为输入怎么办?我该怎么做? @user3388464 看看这个链接。它展示了如何从设备捕获视频。 docs.opencv.org/modules/highgui/doc/…

以上是关于相机校准 OpenCV 相机作为输入的主要内容,如果未能解决你的问题,请参考以下文章

OpenCV 2.3 相机校准

在线校准相机中校准相机时出现 OpenCV 运行时错误

用于 OpenCV 的 Iphone 6 相机校准

OpenCV校准相机裁剪错误

如何根据相机校准(C++)生成的真实数据使用opencv模拟失真?

OpenCV中的相机失真内外参不失真图像相机校准