Ask Your Question

Szczepan's profile - activity

2018-06-14 18:33:00 -0600 received badge  Famous Question (source)
2018-05-25 02:04:13 -0600 received badge  Notable Question (source)
2017-04-20 12:51:27 -0600 received badge  Notable Question (source)
2015-12-15 13:34:54 -0600 received badge  Popular Question (source)
2015-11-02 09:48:35 -0600 received badge  Popular Question (source)
2015-06-22 12:53:44 -0600 received badge  Notable Question (source)
2014-11-03 13:06:47 -0600 received badge  Popular Question (source)
2013-01-08 15:32:25 -0600 commented answer Undefined reference to algorithm

I got next error. I checked but there is no syntax error. initModule_nonfree was not declared in the scope. Edit: Now I added nonfree.hpp and i got error "undefined reference to 'cv::initModule_nonfree()"

2013-01-07 20:08:51 -0600 asked a question Undefined reference to algorithm

I want to write a program for a raspberry pi witch can recognize road signs. I found that tutorial http://docs.opencv.org/doc/tutorials/features2d/feature_flann_matcher/feature_flann_matcher.html but when I try to run that I got following error "undefined reference to cv::Algorithm::~Algorithm". I'm including same library including features2d.hpp witch is now moved to the nonfree:

#include<opencv2/nonfree/features2d.hpp>
2012-12-01 19:15:22 -0600 answered a question Digit and road sign recognition

I'm getting image from camera, use GaussianBlur(srcg,srcg,Size(5,5),0,0) and then Canny(srcg,srcg,low_tresh_slider,high_tresh_slider,3). I'm trying to use findContours(srcg,conturs,hierarchy,CV_RETR_TREE,CV_CHAIN_APPROX_SIMPLE,Point(0,0)) but I error like these

Assertion failed (k == STD_VECTOR_MAT) in release, file /build/buildd/opencv-2.3.1/modules/core/src/matrix.cpp, line 1364 terminate called after throwing an instance of 'cv::Exception' what(): /build/buildd/opencv-2.3.1/modules/core/src/matrix.cpp:1364: error: (-215) k == STD_VECTOR_MAT in function release

definicion of Mat srcg(src.size(),CV_8UC1); ( I read about findConturs function and it takes a single channel as a parameter). I am going in good direction with digit and sign recognition or should I use something different? I can make my own road signs so maybe it will be good idea to detect squares or circles (shape of sign) and don't process all image but just ROI defined by detected square or circle.

2012-12-01 19:10:19 -0600 answered a question Digit and road sign recognition

I'm getting image from camera, use GaussianBlur(srcg,srcg,Size(5,5),0,0) and then Canny(srcg,srcg,low_tresh_slider,high_tresh_slider,3). I'm trying to use findContours(srcg,conturs,hierarchy,CV_RETR_TREE,CV_CHAIN_APPROX_SIMPLE,Point(0,0)) but I error like these

Assertion failed (k == STD_VECTOR_MAT) in release, file /build/buildd/opencv-2.3.1/modules/core/src/matrix.cpp, line 1364 terminate called after throwing an instance of 'cv::Exception' what(): /build/buildd/opencv-2.3.1/modules/core/src/matrix.cpp:1364: error: (-215) k == STD_VECTOR_MAT in function release

definicion of Mat srcg(src.size(),CV_8UC1); ( I read about findConturs function and it takes a single channel as a parameter. I am going in good direction with digit and sign recognition or should I use something different? I can make my own road signs so I think

2012-11-23 10:01:20 -0600 asked a question Black window in webcamera streaming

Hello. I want to display stream from camera. I find few tutorials in internet but my window is displaying a black image. Im working under linux, and they recognize the camera (lsusb in terminal shows "Bus 002 Device 006: ID 0ac8:0323 Z-Star Microelectronics Corp. Luxya WC-1200 USB 2.0 Webcam"). I have to install drivers when I want to use webcam(any tutorial not mentioned that and I'm little confused because capturing data from camera can be a part of work OpenCv library)? This is one of the examples found in the internet.

#include<opencv2/highgui/highgui.hpp>
#include<opencv/cv.h>

using namespace cv;

int main(int, char**)
{
    VideoCapture cap(-1); // open the default camera
    if(!cap.isOpened())  // check if we succeeded
        return -1;

    Mat edges;
    namedWindow("edges",1);
    for(;;)
    {
        Mat frame;
        cap >> frame; // get a new frame from camera
        cvtColor(frame, edges, CV_BGR2GRAY);
        GaussianBlur(edges, edges, Size(7,7), 1.5, 1.5);
        Canny(edges, edges, 0, 30, 3);
        imshow("edges", edges);
        if(waitKey(30) >= 0) break;
    }
    // the camera will be deinitialized automatically in VideoCapture destructor
    return 0;
}

I'm not sure about VideoCapture cap(-1); because I change this parameter randomly(in documentation I found only that constructor starts streaming from camera). But even with randomly chosen value when I unplugged the camera I got error "no device" so it might work properly. What should I do?

2012-11-22 14:47:08 -0600 received badge  Scholar (source)
2012-11-22 14:47:03 -0600 received badge  Supporter (source)
2012-11-21 09:48:22 -0600 commented answer Not declared in the scope

Now is everything ok. I write Cv_Window_Autosize and I should CV_WINDOW_AUTOSIZE. In second example I forgot libraries.

2012-11-21 09:01:57 -0600 received badge  Editor (source)
2012-11-21 09:00:51 -0600 asked a question Not declared in the scope

Hello. Yesterday I finally install opencv and my first example works fine. But second not, here's my code .

int main()

{

IplImage * img = cvLoadImage("obrazek.jpg");
cvNamedWindow("Przetworzone");
cvNamedWindow("Nie przetworzone");
cvShowImage("Przetworzone",img);
IplImage * img_wyj = cvCreateImage(cvGetSize(img),IPL_DEPTH_8U,3);
cvSmooth(img,img_wyj,CV_GAUSSIAN,11,11);
cvShowImage("Nie przetworzone",img_wyj);
cvWaitKey(0);
cvReleaseImage(&img);
cvReleaseImage(&img_wyj);
cvDestroyWindow("Przetworzone");
cvDestroyWindow("Nie przetworzone");

return 0;

}

path_to_the_open_cv/main.cpp:29: error:'CV_GAUSSIAN' was not declared in this scope path_to_the_open_cv/main.cpp:29: error:'cvSmooth' was not declared in this scope In other example I got error like this. path_to_the_open_cv/main.cpp:14: error:'Cv_Window_Autosize' was not declared in this scope when I want to do this(window called "Kamera" already exist).

cvNamedWindow("Kamera",Cv_Window_Autosize);

Im using QT Creator and im including opencv2/core/core.hpp, opencv2/highgui/highgui.hpp, opencv2/highgui/highgui_c.h.

2012-11-20 17:08:48 -0600 answered a question LINK : fatal error LNK1104: cannot open file 'opencv_core242d.lib'

I think I fixed the problem(first example of code is working). I install opencv on ubuntu ( sudo apt-get install libopencv-dev or something like that in ubuntu terminal ). Then you must create new project in QT Creator (file>new project> qt console application). You will get 2 files main.cpp and your_project_name.proj. Type in 'your_project_name.proj' "INCLUDEPATH += I/usr/include/" "LIBS += -lopencv_core \ -lopencv_highgui \ -lopencv_imgproc \ -lopencv_features2d \ -lopencv_calib3d"

The code in main.cpp file is

#include< opencv2/core/core.hpp>

#include< opencv2/highgui/highgui.hpp>

int main()

{

cv::Mat koko = cv::imread("plik.jpg");
cv::namedWindow("Oko");
cv::imshow("oko",koko);
cv::waitKey(5000);

return 0;

}

And it's work fine. I don't check any other examples.

2012-11-20 08:59:52 -0600 asked a question Including openCV in Qt or Microsoft Visual Studio

Hello. Last three days im trying to lunch OpenCv library in Microsoft Visual Studio and Qt(under windows and linux) and nothing. I read a lot of tutorials, wached youtube tutorials, read book and doing everyting step by step and nothing. I have notice there is a difference between tutorials and my openCv library. What sould i do to lunch OpenCv on QT creator(best option) or Microsoft Visual Studio. I know that is a most frequency asked question but nothing works.

2012-11-19 11:35:39 -0600 answered a question LINK : fatal error LNK1104: cannot open file 'opencv_core242d.lib'

Hello. I got similar problem. I read book, tutorials etc and it still don't work. Now I have download latest version of OpenCV (2.4.3). Include to my project ( in include directories) "D:\opencv\build\include\opencv2", "D:\opencv\build\include","D:\opencv\build\include\opencv" and in library directories library path "D:\opencv\build\x86\vc10\lib". And in Linker/Input/Additional Dependencies i add opencv_core243d.lib opencv_imgproc243d.lib opencv_highgui243d.lib opencv_ml243d.lib opencv_video243d.lib opencv_features2d243d.lib opencv_calib3d243d.lib opencv_objdetect243d.lib opencv_contrib243d.lib opencv_legacy243d.lib opencv_flann243d.lib

Now i can compile it. But after i run i got error Canot run this application because can't find opencv_core243d.dll. Reinstall should help.

2012-11-19 11:30:14 -0600 answered a question LINK : fatal error LNK1104: cannot open file 'opencv_core242d.lib'

Hello. I got similar problem. I read book, tutorials etc and it still don't work. Now I have download latest version of OpenCV (2.4.3). Include to my project

2012-11-17 18:21:49 -0600 asked a question Digit and road sign recognition

Hello. My purpose is to make a self driving car, witch recognize digits(speed limit) and road sign(not complex ie left or right arrow). Can I do it with open CV? I have 1 month to do that and I don't want to waste time to read about that library that I can't use to make my project.(I want to program in C++ using raspberry pi and A4WD robot)