Ask Your Question

ArtifaX's profile - activity

2012-12-29 06:22:39 -0600 received badge  Scholar (source)
2012-12-29 06:22:37 -0600 received badge  Supporter (source)
2012-12-29 05:43:58 -0600 commented answer Problems compiling on VS10(unable to find opencv_video231d.lib

Thing is that I have opencv_video243d.lib and i don't have opencv_video231d.lib connected to the project as i don't have it in my build.

2012-12-29 00:34:35 -0600 asked a question Problems compiling on VS10(unable to find opencv_video231d.lib

Tried to compile some source code and ran into error:

error LNK1104: unable to open file "opencv_video231d.lib"   c:\Users\ArtifaX\documents\visual studio 2010\Projects\classification\classification\LINK

I'm new to openCV, but i believe i have successfuly installed and linked it, as all include files are recognised. i didn't find opencv_video231d.lib in opencv folder(guess because i have a newer version and 231 refers to 2.31 version) but i don't know, what piece of code requires it and how to fix it.

Code is as follows:

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

#include <stdio.h>

using namespace cv;
using namespace std;

int main()
{
    Mat src = imread("123.jpg");
    if (src.empty())
        return -1;

    Mat gray;
    cvtColor(src, gray, CV_BGR2GRAY);

    Mat bw;
    threshold(gray, bw, 10, 255, THRESH_BINARY );

    vector<vector<Point> > contours;
    findContours(bw, contours, CV_RETR_LIST, CV_CHAIN_APPROX_SIMPLE);
    drawContours(src, contours, -1, CV_RGB(255,0,0), 2);

    char msg[20];
    sprintf(msg, "Found %d coins.", contours.size());
    putText(src, msg, Point(2,12), FONT_HERSHEY_SIMPLEX, .4, CV_RGB(255,0,0));

    imshow("src", src);
    waitKey(0);

    return 0;
}

Thanks