Ask Your Question

Ritchie's profile - activity

2017-01-21 00:40:48 -0600 received badge  Famous Question (source)
2014-04-17 23:31:08 -0600 received badge  Notable Question (source)
2013-11-19 10:34:47 -0600 received badge  Popular Question (source)
2013-02-26 11:01:36 -0600 received badge  Editor (source)
2013-02-26 10:56:24 -0600 asked a question cannot find or open PBD file visual studio 2010

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)