OpenCV problem
Hi, I download and install OpenCV 3.1, but when I want to start a code it wrote me back this error message
CODE
#include "highgui.h"
int main(void)
{
cvNamedWindow("Demo", CV_WINDOW_AUTOSIZE);
cvCapture* capture = cvCreateCameraCapture(0);
IplImage* frame;
while(1)
{
frame = cvQueryFrame(capture);
if(!frame)break;
cvShowImage("Demo",frame);
char c = cvWaitKey(33);
if(c==27)break;
}
cvReleaseCapture(&capture);
cvDestroyWindow("Demo");
return 0;
}
here is my error message
CMakeFiles/camera.dir/camera.c.o: In function `cvPointFrom32f':
camera.c:(.text+0x7a4): undefined reference to `cvRound'
camera.c:(.text+0x7bc): undefined reference to `cvRound'
CMakeFiles/camera.dir/camera.c.o: In function `cvReadInt':
camera.c:(.text+0x1378): undefined reference to `cvRound'
CMakeFiles/camera.dir/camera.c.o: In function `cvEllipseBox':
camera.c:(.text+0x169c): undefined reference to `cvRound'
camera.c:(.text+0x16bc): undefined reference to `cvRound'
collect2: ld returned 1 exit status
CMakeFiles/camera.dir/build.make:113: recipe for target 'camera' failed
make[2]: * [camera] Error 1
CMakeFiles/Makefile2:63: recipe for target 'CMakeFiles/camera.dir/all' failed
make[1]: * [CMakeFiles/camera.dir/all] Error 2
Makefile:75: recipe for target 'all' failed
make: * [all] Error 2
please what I have to do to solve this problem? :)
please show us your cmdline (you're probably not linking something)
here is my code
unfortunately this is using opencv's deprecated c-api. please try to avoid any of it, and instead use cv::Mat, cv::VideoCapture , cv::imshow(), etc.
Hi, please can you tell me which of that are deprecated?? or where can I find new one? :)