C++ can';在opencv visual studio 2012中找不到dll文件

C++ can';在opencv visual studio 2012中找不到dll文件,c++,opencv,C++,Opencv,我正在使用visual studio 2012并运行opencv2.4.9 #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/objdetect/objdetect.hpp> cv::CascadeClassifier face_cascade; cv::CascadeClassifier eye_cascade;

我正在使用visual studio 2012并运行opencv2.4.9

#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/objdetect/objdetect.hpp>

cv::CascadeClassifier face_cascade;
cv::CascadeClassifier eye_cascade;

/**
* Function to detect human face and the eyes from an image.
*
* @param  im    The source image
* @param  tpl   Will be filled with the eye template, if detection success.
* @param  rect  Will be filled with the bounding box of the eye
* @return zero=failed, nonzero=success
*/
int detectEye(cv::Mat& im, cv::Mat& tpl, cv::Rect& rect)  
{
std::vector<cv::Rect> faces, eyes;
face_cascade.detectMultiScale(im, faces, 1.1, 2, 0|CV_HAAR_SCALE_IMAGE,       
cv::Size(30,30));
for (int i = 0; i < faces.size(); i++)
{
cv::Mat face = im(faces[i]);
eye_cascade.detectMultiScale(face, eyes, 1.1, 2, 0|CV_HAAR_SCALE_IMAGE,   
cv::Size(20,20));
if (eyes.size())
{
rect = eyes[0] + cv::Point(faces[i].x, faces[i].y);
tpl  = im(rect);
}
}

return eyes.size();
}

/**
* Perform template matching to search the user's eye in the given image.
*
* @param   im    The source image
* @param   tpl   The eye template
* @param   rect  The eye bounding box, will be updated with the new location                                                      
of the eye
*/
void trackEye(cv::Mat& im, cv::Mat& tpl, cv::Rect& rect)
{
cv::Size size(rect.width * 2, rect.height * 2);
cv::Rect window(rect + size - cv::Point(size.width/2, size.height/2));

window &= cv::Rect(0, 0, im.cols, im.rows);

cv::Mat dst(window.width - tpl.rows + 1, window.height - tpl.cols + 1, 
CV_32FC1);
cv::matchTemplate(im(window), tpl, dst, CV_TM_SQDIFF_NORMED);

double minval, maxval;
cv::Point minloc, maxloc;
cv::minMaxLoc(dst, &minval, &maxval, &minloc, &maxloc);

if (minval <= 0.2)
{
    rect.x = window.x + minloc.x;
    rect.y = window.y + minloc.y;
}
else
    rect.x = rect.y = rect.width = rect.height = 0;
}

int main(int argc, char** argv)
{
// Load the cascade classifiers

face_cascade.load("C:/ashish2/data/haarcascades/haarcascade_frontalface_alt2    .xml");
eye_cascade.load("C:/ashish2/data/haarcascades/haarcascade_eye.xml");

// Open webcam
cv::VideoCapture cap(0);

// Check if everything is ok
if (face_cascade.empty() || eye_cascade.empty() || !cap.isOpened())
    return 1;

// Set video to 320x240
cap.set(CV_CAP_PROP_FRAME_WIDTH, 320);
cap.set(CV_CAP_PROP_FRAME_HEIGHT, 240);

cv::Mat frame, eye_tpl;
cv::Rect eye_bb;

while (cv::waitKey(15) != 'q')
{
cap >> frame;
if (frame.empty())
break;

// Flip the frame horizontally, Windows users might need this
cv::flip(frame, frame, 1);

// Convert to grayscale and 
// adjust the image contrast using histogram equalization
cv::Mat gray;
cv::cvtColor(frame, gray, CV_BGR2GRAY);

if (eye_bb.width == 0 && eye_bb.height == 0)
{
// Detection stage
// Try to detect the face and the eye of the user
detectEye(gray, eye_tpl, eye_bb);
}
else
{
// Tracking stage with template matching
trackEye(gray, eye_tpl, eye_bb);

// Draw bounding rectangle for the eye
cv::rectangle(frame, eye_bb, CV_RGB(0,255,0));
}

// Display video
cv::imshow("video", frame);
}

return 0;
}
#包括
#包括
#包括
cv::级联分类器面_级联;
cv::级联,级联;
/**
*从图像中检测人脸和眼睛的功能。
*
*@param im源图像
*如果检测成功,@param tpl将填充眼睛模板。
*@param rect将被眼睛的边框填充
*@return zero=失败,nonzero=成功
*/
内部检测(cv::Mat&im,cv::Mat&tpl,cv::Rect&Rect)
{
向量脸、眼睛;
面部级联。检测多尺度(im,面部,1.1,2,0 | CV | HAAR |图像,
cv::大小(30,30));
对于(int i=0;iframe;
if(frame.empty())
打破
//水平翻转框架,Windows用户可能需要此选项
cv::翻转(帧,帧,1);
//转换为灰度和
//使用直方图均衡化调整图像对比度
cv::席灰色;
cv::CVT颜色(边框、灰色、cv_bgr2灰色);
如果(眼宽=0和眼高=0)
{
//检测阶段
//尝试检测用户的面部和眼睛
探测眼(灰色、眼tpl、眼bb);
}
其他的
{
//模板匹配跟踪阶段
轨眼(灰色、眼tpl、眼bb);
//为眼睛绘制边框
cv::矩形(框架,眼睛bb,cv_RGB(0255,0));
}
//显示视频
cv::imshow(“视频”,帧);
}
返回0;
}
当我运行下面的代码时,它会给我“test2.exe”(Win32):加载的“C:\Users\Orayan\Documents\visualstudio 2012\Projects\test2\Debug\test2.exe”。加载的符号。 'test2.exe'(Win32):加载了'C:\Windows\SysWOW64\ntdll.dll'。找不到或无法打开PDB文件。 'test2.exe'(Win32):加载了'C:\Windows\SysWOW64\kernel32.dll'。找不到或无法打开PDB文件。 'test2.exe'(Win32):加载了'C:\Windows\SysWOW64\KernelBase.dll'。找不到或无法打开PDB文件。 'test2.exe'(Win32):加载了'C:\Users\Orayan\Documents\Visual Studio 2012\Projects\test2\Debug\opencv\u core249.dll'。无法找到或打开PDB文件。 'test2.exe'(Win32):加载了'C:\Windows\SysWOW64\msvcp110.dll'。找不到或无法打开PDB文件。 'test2.exe'(Win32):加载了'C:\Windows\SysWOW64\msvcr110.dll'。找不到或无法打开PDB文件。 'test2.exe'(Win32):加载了'C:\Users\Orayan\Documents\Visual Studio 2012\Projects\test2\Debug\opencv\u highgui249.dll'。无法找到或打开PDB文件。 'test2.exe'(Win32):加载了'C:\Windows\SysWOW64\user32.dll'。找不到或无法打开PDB文件。 'test2.exe'(Win32):加载了'C:\Windows\SysWOW64\gdi32.dll'。找不到或无法打开PDB文件。 'test2.exe'(Win32):加载了'C:\Windows\SysWOW64\lpk.dll'。找不到或无法打开PDB文件。 'test2.exe'(Win32):加载了'C:\Windows\SysWOW64\usp10.dll'。找不到或无法打开PDB文件。 'test2.exe'(Win32):加载了'C:\Windows\SysWOW64\msvcrt.dll'。找不到或无法打开PDB文件。 'test2.exe'(Win32):加载了'C:\Windows\SysWOW64\advapi32.dll'。找不到或无法打开PDB文件。 'test2.exe'(Win32):加载了'C:\Windows\SysWOW64\sechost.dll'。找不到或无法打开PDB文件。 'test2.exe'(Win32):加载了'C:\Windows\SysWOW64\rpcrt4.dll'。找不到或无法打开PDB文件。 'test2.exe'(Win32):加载了'C:\Windows\SysWOW64\sspicli.dll'。找不到或无法打开PDB文件。 'test2.exe'(Win32):加载了'C:\Windows\SysWOW64\cryptbase.dll'。找不到或无法打开PDB文件。 'test2.exe'(Win32):加载了'C:\Windows\SysWOW64\ole32.dll'。找不到或无法打开PDB文件。 'test2.exe'(Win32):加载了'C:\Windows\SysWOW64\oleaut32.dll'。找不到或无法打开PDB文件。 'test2.exe'(Win32):加载了'C:\Windows\SysWOW64\comctl32.dll'。找不到或无法打开PDB文件。 'test2.exe'(Win32):加载了'C:\Windows\SysWOW64\msvfw32.dll'。找不到或无法打开PDB文件。 'test2.exe'(Win32):加载了'C:\Windows\SysWOW64\winmm.dll'。找不到或无法打开PDB文件。 'test2.exe'(Win32):加载了'C:\Windows\SysWOW64\shell32.dll'。找不到或无法打开PDB文件。 'test2.exe'(Win32):加载了'C:\Windows\SysWOW64\shlwapi.dll'。找不到或无法打开PDB文件。 'test2.exe'(Win32):加载了'C:\Windows\SysWOW64\avifil32.dll'。找不到或无法打开PDB文件。 'test2.exe'(Win32):加载了'C:\Windows\SysWOW64\msacm32.dll'。找不到或无法打开PDB文件。 'test2.exe'(Win32):加载了'C:\Windows\SysWOW64\avicap32.dll'。找不到或无法打开PDB文件。 'test2.exe'(Win32):加载了'C:\Windows\SysWOW64\version.dll'。找不到或无法打开PDB文件。 'test2.exe'(Win32):加载了'C:\Users\Orayan\Documents\Visual Studio 2012\Projects\test2\Debug\opencv\u imgproc249.dll'。无法找到或打开PDB文件。 'test2.exe'(Win32):加载了'C:\Users\Orayan\Documents\Visual Studio 2012\Projects\test2\Debug\opencv\u objdetect249.dll'。无法找到或打开PDB文件。 'test2.exe'(Win32):加载了'C:\Windows\SysWOW64\msvcp110d.dll'。已加载符号。 'test2.exe'(Win32):加载了'C:\Windows\SysWOW64\msvcr110d.dll'。加载了符号。 'test2.exe'(Win32):加载了'C:\Windows\SysWOW64\imm32.dll'。找不到或无法打开PDB文件。 'test2.exe'(Win32):加载了'C:\Windows\SysWOW64\msctf.dll'