Ask Your Question

Revision history [back]

Hough, RANSAC, Kalman, issue with (Unhandled Expression )

Hello everyone, I am try to develop a lane detection and tracking program using opencv. I am having this annoying ERROR which is saying that there is undhandeled expression at a memory location

The main.cpp program is :

‪#‎include‬ <iostream>

include <vector>

include <opencv2 core="" core.hpp="">

include <opencv2 highgui="" highgui.hpp="">

include <opencv2 imgproc="" imgproc.hpp="">

include "laneDetection.h"

include "CKalmanFilter.h"

using namespace std; using namespace cv; int main(int argc, char** argv) { laneDetection detect; int keypressed = 0; IplImage *frame = NULL; CvCapture *input_video2 = cvCreateFileCapture("road.avi"); Mat input_video = cvarrToMat(input_video2); if(input_video.empty()){ //check if there is a frame fprintf(stderr,"Error: Can not read from file\n\n\n\n"); return -1;}

detect.LMFiltering(input_video); vector<vec2f> lines = detect.houghTransform(); Mat imgfinal = detect.drawLines(input_video,lines); while(keypressed =!27){ frame = cvQueryFrame(input_video2); Mat img2 = cvarrToMat(frame); if (img2.empty()){ fprintf(stderr,"Error : Images has been finished\n\n\n\n"); return -1; } detect.LMFiltering(img2); vector<vec2f> lines2 = detect.houghTransform(); if (lines2.size() < 2) { imgfinal = detect.drawLines(img2,lines); continue; } CKalmanFilter KF2(lines); vector<vec2f> pp = KF2.predict(); vector<vec2f> lines2Final = KF2.update(lines2); lines = lines2Final; imgfinal = detect.drawLines(img2,lines2); } //End of the loop } //End of Main

image description

I am sure that there is no problem with CKalmanfilter.cpp and lanedetection.cpp

click to hide/show revision 2
No.2 Revision

updated 2015-10-22 22:44:00 -0600

berak gravatar image

Hough, RANSAC, Kalman, issue with (Unhandled Expression )

Hello everyone, I am try to develop a lane detection and tracking program using opencv. I am having this annoying ERROR which is saying that there is undhandeled expression at a memory location

The main.cpp program is :

‪#‎include‬ <iostream>

include <vector>

include <opencv2 core="" core.hpp="">

include <opencv2 highgui="" highgui.hpp="">

include <opencv2 imgproc="" imgproc.hpp="">

include "laneDetection.h"

include "CKalmanFilter.h"

<iostream> #include <vector> #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #include "laneDetection.h" #include "CKalmanFilter.h" using namespace std; using namespace cv; int main(int argc, char** argv) { laneDetection detect; int keypressed = 0; IplImage *frame = NULL; CvCapture *input_video2 = cvCreateFileCapture("road.avi"); Mat input_video = cvarrToMat(input_video2); if(input_video.empty()){ //check if there is a frame fprintf(stderr,"Error: Can not read from file\n\n\n\n"); return -1;}

-1;} detect.LMFiltering(input_video); vector<vec2f> vector<Vec2f> lines = detect.houghTransform(); Mat imgfinal = detect.drawLines(input_video,lines); while(keypressed =!27){ frame = cvQueryFrame(input_video2); Mat img2 = cvarrToMat(frame); if (img2.empty()){ fprintf(stderr,"Error : Images has been finished\n\n\n\n"); return -1; } detect.LMFiltering(img2); vector<vec2f> vector<Vec2f> lines2 = detect.houghTransform(); if (lines2.size() < 2) { imgfinal = detect.drawLines(img2,lines); continue; } CKalmanFilter KF2(lines); vector<vec2f> vector<Vec2f> pp = KF2.predict(); vector<vec2f> vector<Vec2f> lines2Final = KF2.update(lines2); lines = lines2Final; imgfinal = detect.drawLines(img2,lines2); } //End of the loop } //End of Main

Main

image description

I am sure that there is no problem with CKalmanfilter.cpp and lanedetection.cpp