Ask Your Question

Nisal's profile - activity

2016-03-20 09:49:41 -0600 commented question Problem with configuration in VS2015 Opencv 3.1.0

No I didn't copy the dll file to application folder. Where should I copy the dll file.?

2016-03-19 22:27:12 -0600 received badge  Editor (source)
2016-03-19 22:25:40 -0600 asked a question Problem with configuration in VS2015 Opencv 3.1.0

Since I'm new to the Opencv i followed a tutorials to install.

  1. First I downloaded Opencv 3.1.0 from http://opencv.org.
  2. Then I extract in to C drive.
  3. And set environment variables. Add a new variable OPENCV_DIR and set value to C:\opencv\build\x64\vc14 and set the path to %OPENCV_DIR%\bin.
  4. Then I open new project in C++ Console Application and set properties,

Release >

C/C++ General > Additional Include Directories --> $(OPENCV_DIR)....\include.

Linker General > Additional Include Directories -->$(OPENCV_DIR)\lib

Linker Input> Additional Dependancies-->opencv_world310.lib

Debug >

C/C++ General > Additional Include Directories --> $(OPENCV_DIR)....\include.

Linker General > Additional Include Directories -->$(OPENCV_DIR)\lib

Linker Input> Additional Dependancies-->opencv_world310d.lib

Then I used a test code..

#include "opencv2/highgui/highgui.hpp"
#include <iostream>

using namespace cv;
using namespace std;

int main(int argc, const char** argv)

{
    Mat img = imread("C:\\Users\\Nisal\\Desktop\\b.JPG", CV_LOAD_IMAGE_UNCHANGED); //read the image data in the file "MyPic.JPG" and store it in 'img'
if (img.empty()) //check whether the image is loaded or not
{
    cout << "Error : Image cannot be loaded..!!" << endl;
    //system("pause"); //wait for a key press
    return -1;
}

namedWindow("MyWindow", CV_WINDOW_AUTOSIZE); //create a window with the name "MyWindow"
imshow("MyWindow", img); //display the image which is stored in the 'img' in the "MyWindow" window

waitKey(0); //wait infinite time for a keypress

destroyWindow("MyWindow"); //destroy the window with the name, "MyWindow"

return 0;
}

there are no build errors. When i run, a windows console opens and close suddenly, the picture i want to display is not displaying. Output is like this..says some missing PDB files. So what should I do to make this correct. image description

2016-03-19 08:03:58 -0600 commented question Error LNK2019 from C++ VS2015 Help To FIX

Ok thank you. But I tried Opencv 3.1.0 in Visual Studio 2015(downloaded manually through site). I added environment variables and linked the libraries as those tutorials say. It didn't work well.

What do you prefer to me to start with. (version i should download and how to proceed in brief) ? i ll will help to me a lot.

2016-03-19 07:50:13 -0600 asked a question Error LNK2019 from C++ VS2015 Help To FIX

I'm new to OpenCv and I'm trying to install to Visual Studio 2015.

I got install NuGet Package of Opencv 2.4.10. Then I copied some example code just check whether it working or not. When building, there are some LINK errors.

eg: Error LNK2019 unresolved external symbol "void __cdecl cv::fastFree(void *)" (?fastFree@cv@@YAXPAX@Z) referenced in function "public: __thiscall cv::Mat::~Mat(void)" (??1Mat@cv@@QAE@XZ) ConsoleApplication2 F:\Research\Test\ConsoleApplication2\ConsoleApplication2\Source.obj 1

The test code I used is..

#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>

#include <iostream>

using namespace cv;

using namespace std;

int main(int argc, char** argv)
{
if (argc != 2)
{
    cout << " Usage: display_image ImageToLoadAndDisplay" << endl;
    return -1;
}

Mat image;
image = imread(argv[1], CV_LOAD_IMAGE_COLOR);   // Read the file

if (!image.data)                              // Check for invalid input
{
    cout << "Could not open or find the image" << std::endl;
    return -1;
}

namedWindow("Display window", WINDOW_AUTOSIZE);// Create a window for display.
imshow("Display window", image);                   // Show our image inside it.

waitKey(0);                                          // Wait for a keystroke in the window
return 0;
}

image description