Ask Your Question
0

cannot find or open PBD file visual studio 2010

asked 2013-02-26 10:56:24 -0600

Ritchie gravatar image

updated 2013-02-26 14:24:17 -0600

berak gravatar image

I have been trying to load and display an image following the opencv tutorial but i keep getting "C:\OpenCV\build\x64\vc10\bin\opencv_core243d.dll', Cannot find or open the PDB file". I am using Microsoft visual Studio 2010 Professional. I have followed the setup tutorial on this link: http://docs.opencv.org/opencv_tutorials.pdf to the letter. I first started by using the prebuilt library and by building my own library as described with the same end results. The setup is able to display video from my webcam. i have restored my pc to factory settings twice just to get this to work

this is the code:

// Video Image PSNR and SSIM
#include <iostream> // for standard I/O
#include <string>   // for strings
#include <iomanip>  // for controlling float print precision
#include <sstream>  // string to number conversion

#include <opencv2/imgproc/imgproc.hpp>  // Gaussian Blur
#include <opencv2/core/core.hpp>        // Basic OpenCV structures (cv::Mat, Scalar)
#include <opencv2/highgui/highgui.hpp>  // OpenCV window I/O

using namespace std;
using namespace cv;

double getPSNR ( const Mat& I1, const Mat& I2);
Scalar getMSSIM( const Mat& I1, const Mat& I2);

static void help()
{
    cout
        << "\n--------------------------------------------------------------------------" << endl
        << "This program shows how to read a video file with OpenCV. In addition, it tests the"
        << " similarity of two input videos first with PSNR, and for the frames below a PSNR "  << endl
        << "trigger value, also with MSSIM."<< endl
        << "Usage:"                                                                       << endl
        << "./video-source referenceVideo useCaseTestVideo PSNR_Trigger_Value Wait_Between_Frames " << endl
        << "--------------------------------------------------------------------------"   << endl
        << endl;
}
int main(int argc, char *argv[])
{
    help();
    if (argc != 5)
    {
        cout << "Not enough parameters" << endl;
        return -1;
    }
    stringstream conv;

    const string sourceReference = argv[1],sourceCompareWith = argv[2];
    int psnrTriggerValue, delay;
    conv << argv[3] << argv[4];       // put in the strings
    conv >> psnrTriggerValue >> delay;// take out the numbers

    char c;
    int frameNum = -1;          // Frame counter

    VideoCapture captRefrnc(sourceReference),
                 captUndTst(sourceCompareWith);

    if ( !captRefrnc.isOpened())
    {
        cout  << "Could not open reference " << sourceReference << endl;
        return -1;
    }

    if( !captUndTst.isOpened())
    {
        cout  << "Could not open case test " << sourceCompareWith << endl;
        return -1;
    }

    Size refS = Size((int) captRefrnc.get(CV_CAP_PROP_FRAME_WIDTH),
                     (int) captRefrnc.get(CV_CAP_PROP_FRAME_HEIGHT)),
         uTSi = Size((int) captUndTst.get(CV_CAP_PROP_FRAME_WIDTH),
                     (int) captUndTst.get(CV_CAP_PROP_FRAME_HEIGHT));

    if (refS != uTSi)
    {
        cout << "Inputs have different size!!! Closing." << endl;
        return -1;
    }

    const char* WIN_UT = "Under Test";
    const char* WIN_RF = "Reference";

    // Windows
            namedWindow(WIN_RF, CV_WINDOW_AUTOSIZE );
            namedWindow(WIN_UT, CV_WINDOW_AUTOSIZE );
            cvMoveWindow(WIN_RF, 400       ,            0);      //750,  2 (bernat =0)
            cvMoveWindow(WIN_UT, refS.width,            0);      //1500, 2

    cout << "Frame resolution: Width=" << refS.width << "  Height=" << refS.height
         << " of nr#: " << captRefrnc.get(CV_CAP_PROP_FRAME_COUNT) << endl;

    cout << "PSNR trigger value " <<
          setiosflags(ios::fixed) << setprecision(3) << psnrTriggerValue << endl;

    Mat frameReference, frameUnderTest;
    double psnrV;
    Scalar mssimV;

    for(;;) //Show the image captured in the window and repeat
    {
        captRefrnc >> frameReference;
        captUndTst >> frameUnderTest;

        if( frameReference.empty()  || frameUnderTest.empty())
        {
            cout << " < < <  Game over!  > > > ";
            break;
        }

        ++frameNum;
        cout <<"Frame:" << frameNum;

        ///////////////////////////////// PSNR ////////////////////////////////////////////////////
        psnrV = getPSNR(frameReference,frameUnderTest);                 //get PSNR
        cout << setiosflags(ios::fixed) << setprecision(3) << psnrV << "dB";

        //////////////////////////////////// MSSIM /////////////////////////////////////////////////
        if (psnrV < psnrTriggerValue)
        {
            mssimV = getMSSIM(frameReference,frameUnderTest);

            cout << " MSSIM: "
                 << "R" << setiosflags(ios::fixed) << setprecision(3) << mssimV.val[2] * 100
                 << "G" << setiosflags(ios::fixed) << setprecision(3) << mssimV.val[1] * 100
                 << "B" << setiosflags(ios::fixed) << setprecision(3) << mssimV.val ...
(more)
edit retag flag offensive close merge delete

Comments

1

on vs2008 this shows up(more correctly) as a warning.

those pdb files contain the debugging information for the libraries, so since they're NOT shipped with the prebuild libs ( too big, i guess) , your debugger warns you , that you can't step into the code of that library.

you can still run & debug YOUR code, no problem. right ?

so, IF you ever need to debug the opencv-libraries ( not your code ), you'd, rebuild the libs locally,( run cmake to create a sln for your machine/compiler.) which produces those pdbs as well the debugger tries

berak gravatar imageberak ( 2013-02-26 14:38:39 -0600 )edit

hello there , i am having the same problem as yours, please could you tell me how did you fix it ? thank you in advance.

harounbest gravatar imageharounbest ( 2013-04-24 21:08:04 -0600 )edit

me too plz help me its urgent

gowsia1994 gravatar imagegowsia1994 ( 2017-01-24 00:54:58 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-02-27 13:56:29 -0600

xaffeine gravatar image

If you have built OpenCV from source yourself, you should find the .pdb file in the bin/debug and bin/release directories where you built the libraries. I'm not sure if the install script copies them to the install directory. But you can copy them manually, if necessary.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-02-26 10:56:24 -0600

Seen: 5,610 times

Last updated: Apr 24 '13