Ask Your Question

yyyyazj's profile - activity

2014-03-06 02:21:21 -0600 commented answer Quesion on OpenCV used in Eclipse Linux

You mean in order to use eclipse to find the libraries in opencv I have to also generate my project first?

2014-03-06 02:19:45 -0600 commented question Quesion on OpenCV used in Eclipse Linux

I have insert /usr/local/include/opencv2 in include paths and /usr/local/lib in libraries paths, but the eclipse cannot also find the opencv.hpp which just in file opencv2

2014-02-21 04:50:22 -0600 commented question Quesion on OpenCV used in Eclipse Linux

sorry, I don't understand!!!

2014-02-21 04:48:52 -0600 commented answer Quesion on OpenCV used in Eclipse Linux

yes, I used cmake to create the include and lib files in /usr, there I can find all libraries.

2014-02-20 05:36:46 -0600 received badge  Editor (source)
2014-02-20 05:33:56 -0600 asked a question Quesion on OpenCV used in Eclipse Linux

With my eclipse, I have configured environment for opencv, but it appears always the problem like:

Building file: ../HelloWorld.cpp Invoking: Cross G++ Compiler arm-linux-gnueabihf-g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"HelloWorld.d" -MT"HelloWorld.d" -o "HelloWorld.o" "../HelloWorld.cpp" ../HelloWorld.cpp:1:30: fatal error: opencv2/opencv.hpp: No such file or directory compilation terminated. make: * [HelloWorld.o] Error 1

I have inserted /usr/local/include dans include paths and /usr/local/lib dans libraries paths.

And Here is my programme:

#include <opencv2/opencv.hpp>
#include<iostream>
#include<vector>

using namespace cv;
using namespace std;

int main(int argc, char *argv[])
{
cv::Mat frame;
cv::Mat back;
cv::Mat fore;
cv::VideoCapture cap(0);    
cv::BackgroundSubtractorMOG2 bg;
bg.nmixtures = 3;
bg.bShadowDetection = false;
std::vector<std::vector<cv::Point> > contours;
cv::namedWindow("Frame");
cv::namedWindow("Background");
for(;;)
{
cap >> frame; bg.operator ()(frame,fore);
bg.getBackgroundImage(back);
cv::erode(fore,fore,cv::Mat());
cv::dilate(fore,fore,cv::Mat());
cv::findContours(fore,contours,CV_RETR_EXTERNAL,CV_CHAIN_APPROX_NONE);
cv::drawContours(frame,contours,-1,cv::Scalar(0,0,255),2);
cv::imshow("Frame",frame);
cv::imshow("Background",back);
if(cv::waitKey(30) >= 0)
break;
}
return 0;

}