In this step, we will modify our camcv code to
- remove the preview display provided by MMAL layer
- copy the camera buffer to a CvMat object
- link CvMat to a IplImage object and display it
- do some cleaning to remove all useless code (for us)
1. Download the camcv.c file here and note following comments/change : http://raufast.org/download/camcv.c
Lines 61+ : add OpenCV Includes
// *** PR : ADDED for OPENCV
#include <cv.h>
#include <highgui.h>
Line 156 : modify init values for test (size of file)
// *** PR : modif for demo purpose : smaller image
state->timeout = 1000; // 5s delay before take image
state->width = 320;//2592;
state->height = 200; //1944;
Line 230+ : in static void encoder_buffer_callback function. This is the core of the modification. This function is a callback, call to get the image in the queue. buffer contains the picture from the camera.
// *** PR : OPEN CV Stuff here !
// create a CvMat empty structure, with size of the buffer.
CvMat* buf = cvCreateMat(1,buffer->length,CV_8UC1);
// copy buffer from cam to CvMat
buf->data.ptr = buffer->data;
// decode image (interpret jpg)
IplImage *img = cvDecodeImage(buf, CV_LOAD_IMAGE_COLOR);
// we can save it !
cvSaveImage(“foobar.bmp”, img,0);
// or display it
cvNamedWindow(“camcvWin”, CV_WINDOW_AUTOSIZE);
cvShowImage(“camcvWin”, img );
cvWaitKey(0);
Line 711/726/823 : we remove the native preview window (replaced by opencv window)
// *** PR : we don’t want preview
camera_preview_port = NULL;
// PR : we don’t want preview
// status = connect_ports(camera_preview_port, preview_input_port, &state.preview_connection);
// mmal_connection_destroy(state.preview_connection);
2. compile, run and check if your “foobar.bmp” file is created and if a nice window shows your picture taken by Pi Cam ! (press key to stop)
At this stage you should be very enthousiastic ! You can control your rpi camera with OpenCV ! Beautiful are bits, trees and the Pi.
Pingback: OpenCV and Pi Camera Board ! | Think RPI
Great, thanks! But one comment. To make the compile process work I had to modify the CMakeLists.txt like this:
find_package( OpenCV REQUIRED )
……
target_link_libraries(camcv /opt/vc/lib/libmmal_core.so ….. ${OpenCV_LIBS})
Thanks. This did work for me 🙂
I already had OPENCV_LIBS at the end of the target_link line but changing it to OpenCv_LIBS seemed to fix my problem thanks. This was odd as I’d managed to compile in step 4 and hadn’t changed anything except the camcv.c file.
Hm, I’m using the exact camcv.c file you’ve posted here, but getting this when I run it:
mmal: main: Failed to create preview component
mmal: Failed to run camera app. Please check for firmware updates
Any ideas what I might be doing wrong?
Thanks.
Hi. Sometimes this error message appears but it’s working anyway (this message is sent by the first or last callback). If the soft does’nt work, is raspistill or raspivid working?
Hi,
The message appears for me too but the foobar.bmp doesn’t get created and I don’t see the image being taken. raspistill still works.
I just changed
” else if (!raspipreview_create(&state.preview_parameters)) ” line in main to
” else if ( (status = raspipreview_create(&state.preview_parameters)) != MMAL_SUCCESS) ”
and it works now!
My version of camcv.c does not have a line “else if (!raspipreview_create(&state.preview_parameters)) “, it instead already has “else if ( (status = raspipreview_create(&state.preview_parameters)) != MMAL_SUCCESS)” but I am still not getting the foobar.bmp file.
Also, I can’t run the program as ./camcv but ./camcv -t 1000, would this have anything to do with it?
Thank you Gabriel! That worked for me and made me smile 🙂
Thank you Gabriel!! It totally worked for me as well
pukster I had a solution for you if it’s not too late:
after the line: default_status(&state);
add this one:
state.filename=”foobar.jpg”;
After applying the changes I seem to be getting the following error
tvservice-client: Failed to connect to TV service: -1
I even just replaced the code for camcv.c with the provided code: http://raufast.org/download/camcv.c and I still get the same error.
I think I fixed it my own problem. I forgot to run cmake . & make
I tried to compile it again but I get these messages:
CMakeFiles/camcv.dir/camcv.c.o: In function `cvRound’:
camcv.c:(.text+0x178): undefined reference to `lrint’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvDecRefData’:
camcv.c:(.text+0xfd4): undefined reference to `cvFree_’
camcv.c:(.text+0x107c): undefined reference to `cvFree_’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvGetRow’:
camcv.c:(.text+0x1214): undefined reference to `cvGetRows’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvGetCol’:
camcv.c:(.text+0x1254): undefined reference to `cvGetCols’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvReleaseMatND’:
camcv.c:(.text+0x127c): undefined reference to `cvReleaseMat’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvSubS’:
camcv.c:(.text+0x1448): undefined reference to `cvAddS’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvCloneSeq’:
camcv.c:(.text+0x1494): undefined reference to `cvSeqSlice’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvSetNew’:
camcv.c:(.text+0x151c): undefined reference to `cvSetAdd’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvGetSetElem’:
camcv.c:(.text+0x15ec): undefined reference to `cvGetSeqElem’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvEllipseBox’:
camcv.c:(.text+0x1724): undefined reference to `cvEllipse’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvFont’:
camcv.c:(.text+0x1788): undefined reference to `cvInitFont’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvReadIntByName’:
camcv.c:(.text+0x186c): undefined reference to `cvGetFileNodeByName’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvReadRealByName’:
camcv.c:(.text+0x1958): undefined reference to `cvGetFileNodeByName’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvReadStringByName’:
camcv.c:(.text+0x1a00): undefined reference to `cvGetFileNodeByName’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvReadByName’:
camcv.c:(.text+0x1a4c): undefined reference to `cvGetFileNodeByName’
camcv.c:(.text+0x1a60): undefined reference to `cvRead’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvContourPerimeter’:
camcv.c:(.text+0x1aa8): undefined reference to `cvArcLength’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvCalcHist’:
camcv.c:(.text+0x1ae8): undefined reference to `cvCalcArrHist’
CMakeFiles/camcv.dir/camcv.c.o: In function `encoder_buffer_callback’:
camcv.c:(.text+0x1ee8): undefined reference to `cvCreateMat’
camcv.c:(.text+0x1f08): undefined reference to `cvDecodeImage’
camcv.c:(.text+0x1f1c): undefined reference to `cvSaveImage’
camcv.c:(.text+0x1f28): undefined reference to `cvNamedWindow’
camcv.c:(.text+0x1f34): undefined reference to `cvShowImage’
camcv.c:(.text+0x1f3c): undefined reference to `cvWaitKey’
collect2: ld returned 1 exit status
make[2]: *** [camcv] Error 1
make[1]: *** [CMakeFiles/camcv.dir/all] Error 2
make: *** [all] Error 2
What should I do?
Hi,
How did you fix this problem ?
What did you put in the CMakeLists.txt
Thanks
Martin
Got everything working now.
Really appreciate the amount of work gone into this project.
Thank You !
Any help how did you fix it? Same issue here!
What did you put in the file? I’m getting the same issue…
For the ones asking down here, the answer is in the upper comment, just add ${OpenCV_LIBS} at the end of target_link_libraries in CMakesList.txt
Please help me, i added ${OpenCV_LIBS} at the end of target_link_libraries in CMakesList.txt but error still occur. i copy camcv.c at top
.
CMakeFiles/camcv.dir/camcv.c.o: In function `cvRound’:
camcv.c:(.text+0×178): undefined reference to `lrint’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvDecRefData’:
camcv.c:(.text+0xfd4): undefined reference to `cvFree_’
camcv.c:(.text+0x107c): undefined reference to `cvFree_’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvGetRow’:
camcv.c:(.text+0×1214): undefined reference to `cvGetRows’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvGetCol’:
camcv.c:(.text+0×1254): undefined reference to `cvGetCols’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvReleaseMatND’:
camcv.c:(.text+0x127c): undefined reference to `cvReleaseMat’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvSubS’:
camcv.c:(.text+0×1448): undefined reference to `cvAddS’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvCloneSeq’:
camcv.c:(.text+0×1494): undefined reference to `cvSeqSlice’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvSetNew’:
camcv.c:(.text+0x151c): undefined reference to `cvSetAdd’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvGetSetElem’:
camcv.c:(.text+0x15ec): undefined reference to `cvGetSeqElem’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvEllipseBox’:
camcv.c:(.text+0×1724): undefined reference to `cvEllipse’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvFont’:
camcv.c:(.text+0×1788): undefined reference to `cvInitFont’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvReadIntByName’:
camcv.c:(.text+0x186c): undefined reference to `cvGetFileNodeByName’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvReadRealByName’:
camcv.c:(.text+0×1958): undefined reference to `cvGetFileNodeByName’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvReadStringByName’:
camcv.c:(.text+0x1a00): undefined reference to `cvGetFileNodeByName’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvReadByName’:
camcv.c:(.text+0x1a4c): undefined reference to `cvGetFileNodeByName’
camcv.c:(.text+0x1a60): undefined reference to `cvRead’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvContourPerimeter’:
camcv.c:(.text+0x1aa8): undefined reference to `cvArcLength’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvCalcHist’:
camcv.c:(.text+0x1ae8): undefined reference to `cvCalcArrHist’
CMakeFiles/camcv.dir/camcv.c.o: In function `encoder_buffer_callback’:
camcv.c:(.text+0x1ee8): undefined reference to `cvCreateMat’
camcv.c:(.text+0x1f08): undefined reference to `cvDecodeImage’
camcv.c:(.text+0x1f1c): undefined reference to `cvSaveImage’
camcv.c:(.text+0x1f28): undefined reference to `cvNamedWindow’
camcv.c:(.text+0x1f34): undefined reference to `cvShowImage’
camcv.c:(.text+0x1f3c): undefined reference to `cvWaitKey’
collect2: ld returned 1 exit status
make[2]: *** [camcv] Error 1
make[1]: *** [CMakeFiles/camcv.dir/all] Error 2
make: *** [all] Error 2
if i added
#include
#include
this error appear.
did @Gabriel said to change and it works for me
yeah, I also got
mmal: main: Failed to create preview component
mmal: Failed to run camera app. Please check for firmware updates
And I fix it just as @Gabriel said
How did you fix it exactly?
I tried to change resolution with 1280×1024 and it doesn’t work ? How Can i solve this problem ?
I noticed this too. If I change the resolution (everything different from 320×200) the software run but it doesn’t save the image and to use again the camera I have to reboot the raspberry. Somebody knows why?
IMPORTANT: Resolution has to be a multiple of 320×240
Ex: 640×240
640×480
…
1280×720
I use 1280×720 which gives me ok FPS for not so real time application. 🙂
But the resolution in the example is 320 x 200 (not 240).
If I try the resolutions you wrote it still generates me foobar.jpg but it’s empty. I think the problem is that the buffer passed to cvDecodeImage is still filling and that function return an empty IplImage.
Right now I can only generate images with the example resolution (320×200).
Suggestions?
Oh this was the part of the tutorial that used raspistill not raspivid ? Yes in raspistill you can chose exotic resolutions but in raspivid it has to be a multiple of 240. Why not switch to raspivid (next step of the tutorial) ? I mean I don’t see the point in using raspistill since it has to open and then close the camera buffer before every image.
Also I recommend using uv4l since it’s a driver and not a “hack”:
(See example 4) http://www.linux-projects.org/modules/sections/index.php?op=viewarticle&artid=16
This tutorial helped me a lot but I just can’t use this messy way to do things for my project. uv4l is the right way to do this, install a driver and then call VideoCapture cap(-1); and cap.read(frame);
I was trying to follow this tutorial step by step but next step is what I needed and now it works.
I’ll see uv4l too.
Thanks a lot Void.
Hi Pierre
I am new to opencv, RPI, this camera… so my question might seem silly but it is my question. Toutes mes excuses.
I would like to use the python-opencv. Your neat tutorial uses C from the source of raspistill. Is there an easy way I can use this or interface with python-opencv?
It has been 10 years since I last used python but around 20 since I used C… but I would like the development speed of python.
Merci
Pedro
ps. Maybe I should go to a USB camera?
hi. Well, if you’re a beginner, you will find many samples of opencv Python (or C) with usb camera. It will help you to master concepts… if you want to try C/C++, start with my “magic mirror” post. It works with usb cam. Easier.
Thanks Pierre. I was going to do that… but found uv4l-raspicam that so far is able to do the trick. I can create a /dev/video and capture in python-opencv. But the source is not available… Thanks again.
So you are saying that for now we can’t use the python-opencv ? 😦
That is not what Pierre said…. The raspicam driver for uv4l is doing the trick for me so far with python-cv so far. Maybe it also does it for you.
I confirm that the uv4l-raspicam driver works fine with opencv and/or python
Yes I figured that out a long while later. Would have been nice if someone posted this link here:
http://www.linux-projects.org/modules/sections/index.php?op=viewarticle&artid=16
I have the same problem as Gabriel and i did the Fix, now i get the file but i get
(camcvWin:3119): Gtk-WARNING **: cannot open display:
what to do??
Up until the moment I applied Gabriel’s fix foobar.bmp didn’t appear at all. So yes now it works but I get the following message:
(camcvWin:11084): Gtk-WARNING **: cannot open display:
The code responsible for this massage is when our camcv tries to display the image just beneath the code that makes the foobar.bmp (found it with some fprintfs)
// or display it
cvNamedWindow(“camcvWin”, CV_WINDOW_AUTOSIZE);
cvShowImage(“camcvWin”, img );
cvWaitKey(0);
This is probably due to the fact that I don’t have a X-Server running on the Pi (?), I’m not so good with Linux so some help would be appreciated to figure out how to make it display the image, like raspivid does when a screen is connected to the Pi.
I whas trying to run the program from putty that whas whay i got the mesage but when i run it from the pi it works for me.
Well right now SSH is the only way I can access my Pi. And yes I’m using putty. So what do you think ? Is Putty the cause or is it just the fact that I’m trying to execute the binary over SSH ?
@Void – yes it is because you do not have a display attached. You can run everything from ssh but when it needs to display something it will need to have an open display so maybe connect the pi to one or try to vnc to the pi so that it has a display somewhere…?
If I run this code from ssh it gives me Gtk-WARNING **: cannot open display: and you said why but If I run it from the pi, with a display attached, it gives me Window system doesn’t support OpenGL and the window does not open.
Did I miss to install something else on the pi?
A simple way to solve this is to connect to the Pi with ssh -x 192.168.?.? to get x forwarding.
So there are 3 options:
– You have Linux then you just need to type the -x to give you x forwarding
– You have windows and putty: there is a way to do this but I gave up on it because it was frustrating to set up
– You have windows and a Linux Virtual Machine on VirtualBox. I did this so as to make everything easier.
Also if you have Konqueror on your VM/Linux (with kde desktop) you can type in the address bar of Konqueror “fish://pi@192.168.?.?”, enter your password and then you will be able to work with the Pi as if it was a folder in your VM/Linux, meaning drag and drop files, click on things and also open files directly with local software like KWrite text editor. A good way to bypass vim if you don’t like it.
I don’t know if that is my problem. If I run a program that displays an image with opencv directly on the raspberry it says GdkGLExt-WARNING **: window system doesn’t support OpenGL.
So I think it’s something missing in the Pi installation and not with ssh (if I run ssh with -x it gives me the warning).
ssh -x works for me. If you get opengl error with ssh -x then your host linux pc (the one you are working on not the pi) has OpenGL problems. I don’t know about adding a display to the pi though.
One thing is for sure if you are having the cannot open display warning then it’s definitely the fact that you are not running X forwarding with ssh -x.
I’m getting the “Gtk-WARNING **: cannot open display: message” , too, and I’m directly on the RPi. raspistill works. I can also launch the graphical desktop via ‘startx’ and then shell to LXTerminal session and camcv works properly.
In looking at Pierre’s screenshot in his Step 5 post above, it’s clear that this whole tutorial is within a graphical session. I’ll resume the tutorial in this way but I’d appreciate if somebody had some ideas on how to get OpenCV to work without the need for a heavy graphical desktop. If I find a way, I’ll share here.
Fantastic Tutorial thanks… However please help as I am getting build issues:
pi@raspberrypi ~/Face Recognition $ make
Scanning dependencies of target reco
make[2]: Warning: File `FaceRec.cpp’ has modification time 2.1e+07 s in the future
[100%] Building CXX object CMakeFiles/reco.dir/FaceRec.cpp.o
/home/pi/Face Recognition/FaceRec.cpp:40:0: warning: “_GNU_SOURCE” redefined [enabled by default]
:0:0: note: this is the location of the previous definition
/home/pi/Face Recognition/FaceRec.cpp:148:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/pi/Face Recognition/FaceRec.cpp:148:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/pi/Face Recognition/FaceRec.cpp:148:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/pi/Face Recognition/FaceRec.cpp:148:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/pi/Face Recognition/FaceRec.cpp: In function ‘MMAL_COMPONENT_T* create_camera_component(RASPISTILL_STATE*)’:
/home/pi/Face Recognition/FaceRec.cpp:343:10: error: expected primary-expression before ‘.’ token
/home/pi/Face Recognition/FaceRec.cpp:344:10: error: expected primary-expression before ‘.’ token
/home/pi/Face Recognition/FaceRec.cpp:345:10: error: expected primary-expression before ‘.’ token
/home/pi/Face Recognition/FaceRec.cpp:346:10: error: expected primary-expression before ‘.’ token
/home/pi/Face Recognition/FaceRec.cpp:347:10: error: expected primary-expression before ‘.’ token
/home/pi/Face Recognition/FaceRec.cpp:348:10: error: expected primary-expression before ‘.’ token
/home/pi/Face Recognition/FaceRec.cpp:349:10: error: expected primary-expression before ‘.’ token
/home/pi/Face Recognition/FaceRec.cpp:350:10: error: expected primary-expression before ‘.’ token
/home/pi/Face Recognition/FaceRec.cpp:351:10: error: expected primary-expression before ‘.’ token
/home/pi/Face Recognition/FaceRec.cpp:352:10: error: expected primary-expression before ‘.’ token
/home/pi/Face Recognition/FaceRec.cpp: In function ‘int main(int, const char**)’:
/home/pi/Face Recognition/FaceRec.cpp:652:26: error: invalid conversion from ‘int’ to ‘MMAL_STATUS_T’ [-fpermissive]
/home/pi/Face Recognition/FaceRec.cpp:778:1: error: jump to label ‘error’ [-fpermissive]
/home/pi/Face Recognition/FaceRec.cpp:735:11: error: from here [-fpermissive]
/home/pi/Face Recognition/FaceRec.cpp:739:7: error: crosses initialization of ‘int num_iterations’
/home/pi/Face Recognition/FaceRec.cpp:778:1: error: jump to label ‘error’ [-fpermissive]
/home/pi/Face Recognition/FaceRec.cpp:716:10: error: from here [-fpermissive]
/home/pi/Face Recognition/FaceRec.cpp:739:7: error: crosses initialization of ‘int num_iterations’
make[2]: *** [CMakeFiles/reco.dir/FaceRec.cpp.o] Error 1
make[1]: *** [CMakeFiles/reco.dir/all] Error 2
try to compile as C code, not C++.
@Pierre – how would the instructions change if I compiled OpenCV 2.4.6.1 from source?
Why the error occurs ‘Parse error. Expected a command name, got unquoted argument with text ” “. ?
/home/pi/camcv/CMakeLists.txt:21: where is .. link_directories( /home/pi/libfacerec-master)
Hey Pierre,
I’m making a project with Raspberry Pi and Pi Cam and found your blog. First of all, I should say I think you did nice job there.
And now my question, I tried so many times to change resolution but it didn’t work. After this problem I keep trying to understand the entire program but i was not able to find where is the error. Could you help me?
Thanks.
Wait, when you download http://raufast.org/download/camcv.c as stated in step 1, is that a fully functioning source code, or do you expect us to also make those modifactions? I can’t tell if you are stating what needs to be changed, or what has been changed.
Well if you had actually opened the file, it would have taken you 2 min to understand that those modifications are already in it…
Hi, thanks for this software.
When i run ./camcv the image foobar.bmp is generated but no window appears and it says: Window system doesn’t support OpenGL.
What did I miss?
Thanks
Hi, would like to say you did an awesome job here. I’m using a piece of C++ code to do some image processing, but having great difficulty converting it to C (to be used in camcv.c). I even tried linking the C++ function to be called in the camcv.c, it linked fine after I made the respective changes to C++ function such as “extern “C” {}” etc. It did compile cmake but had many issues passing the image/matrix of image from the buffer to the C++ function. Is it possible to to use camcv.c as camcv.cpp (so then I may simply add in my C++ function)? what changes would need to be made? As you can see from the above message from Ritchie Perry, there are only errors related to two functions when compiling as cpp.
Sorry about my silly question but i really need an answer to make it work . That is how to install opencv with raspberry and steps to do it ? I found the opencv for linux at the opencv wedsite but don’t know how to write it to SDcard . I’m a mechatronic student so that I’m very bad about linux 🙂
Hello. Well, if you follow the 7 steps of the Magic mirror project on this blog, you should be able to install…. However, if you really want to invest time on such project, i strongly recommend to learn linux : this could help to really understand things. Good Luck
I’ve had similar issues to others, though came into this step with a build that was still throwing pictures. Now I get;
$ ./camcv -t 1000
mmal: mmal_vc_port_parameter_set: failed to set port parameter 64:0:ENOSYS
mmal: Function not implemented
mmal: main: Failed to create preview component
mmal: Failed to run camera app. Please check for firmware updates
I have traced this down to mmal.vc.mmal_vc_api.c, and the call to;
mmal_vc_port_parameter_set(MMAL_PORT_T *port, const MMAL_PARAMETER_HEADER_T *param)
inside there is a call:
status = mmal_vc_sendwait_message(mmal_vc_get_client(), &msg.header, msglen, MMAL_WORKER_PORT_PARAMETER_SET, &reply, &replylen, MMAL_FALSE);
Which apparently is returning false, as the error message is the first error message above.
Any ideas?
Any comment would be most appreciated 🙂
Try the next step where you implement a video code (lot faster). You should also try the uv4l driver for a cleaner code (Example4):
http://www.linux-projects.org/modules/sections/index.php?op=viewarticle&artid=16
I got this error
root@raspberrypi:/home/camcv# ./camcv -1000
mmal: main: Failed to create preview component
mmal: Failed to run camera app. Please check for firmware updates
but my raspistill – still working,
anyone can help??
I too have tried Step 5 and get the following error messages
mmal: main: Failed to create preview component
mmal: Failed to run camera app. Please check for firmware updates
I am running from a xterm in startx. I have tried the fixes suggested above and still get the same error. There is no display and foobar.bmp is not created. Do you have any ideas?
I have complied the new camcv.c file successfuly
by:
cmake.c
make
It gives :
pi@raspberrypi ~/camcv $ make
— Configuring done
— Generating done
— Build files have been written to: /home/pi/camcv
Scanning dependencies of target camcv
[ 7%] Building C object CMakeFiles/camcv.dir/RaspiCamControl.c
[ 15%] Building C object CMakeFiles/camcv.dir/RaspiCLI.c.o
[ 23%] Building C object CMakeFiles/camcv.dir/RaspiPreview.c.o
[ 30%] Building C object CMakeFiles/camcv.dir/camcv.c.o
[ 38%] Building C object CMakeFiles/camcv.dir/RaspiTex.c.o
[ 46%] Building C object CMakeFiles/camcv.dir/RaspiTexUtil.c.o
[ 53%] Building C object CMakeFiles/camcv.dir/gl_scenes/teapot.
[ 61%] Building C object CMakeFiles/camcv.dir/gl_scenes/models.
[ 69%] Building C object CMakeFiles/camcv.dir/gl_scenes/square.
[ 76%] Building C object CMakeFiles/camcv.dir/gl_scenes/mirror.
[ 84%] Building C object CMakeFiles/camcv.dir/gl_scenes/yuv.c.o
[ 92%] Building C object CMakeFiles/camcv.dir/gl_scenes/sobel.c
[100%] Building C object CMakeFiles/camcv.dir/tga.c.o
Linking C executable camcv
[100%] Built target camcv
After that I try to execute camcv file I get this error :
pi@raspberrypi ~/camcv $ ./camcv
mmal: mmal_vc_component_create: failed to create component ‘vc.ril.camera’ (1:ENOMEM)
mmal: mmal_component_create_core: could not create component ‘vc.ril.camera’ (1)
mmal: Failed to create camera component
mmal: main: Failed to create camera component
mmal: Camera is not enabled in this build. Try running “sudo raspi-config” and ensure that “camera” has been enabled
I am using USB camera instead of Raspberry Camera.
Please help.
I am sorry for the typo :
I have compiled the code by :
cmake .
make
But I when I am trying to run camcv, it is giving error :
mmal: mmal_vc_component_create: failed to create component ‘vc.ril.camera’ (1:ENOMEM)
mmal: mmal_component_create_core: could not create component ‘vc.ril.camera’ (1)
mmal: Failed to create camera component
mmal: main: Failed to create camera component
mmal: Camera is not enabled in this build. Try running “sudo raspi-config” and ensure that “camera” has been enabled
I am using USB camera instead of Raspberry Camera.
Please help.
hello. If you use an USB Camera, it’s a lot easier !!! just follow the steps of the “Magic Mirror” articles on the same blog.
Hello,
Thank you very much for your tutorial. I’m not using Raspi unless other system like it. It works with a Debian embedded.
I’m working in order to program the C code with Notepad++ (with FTP connection) and in order to compile and run my program I use the putty with serial connection.
My problem:
When I program “cvSameImage (argv[2], img, 95);”, it compiles correctly and then I run the project as “sudo ./myproject hola.jpg sortida.jpg” it works correctly (without any error), but I don’t find where my sortida.jpg file is.
I understand it should be saved in the same directory as hola.jpg but it isn’t.
Also, I write /find -name sortida.jpg but doesn’t found any file.
Do you know what it can be possible? what I do wrong?
it could be many things. The best way is to debug your code adding printf functions to track errorcode or …
Thank you Pierre,
But I don’t have any error, only I cannot see my output picture. I compile (by make), then I run (by ./myproject inputpicture.jpg outputpicture.jpg) but the outputpicture doesn’t appears. The inputpicture is in the same directory as the project.
How I can debug it? I tried to install gdb but I got some problems.. Do you know any simple tutorial in order to install a debuger?
Thanks a lot!
Thank you Pierre,
But I don’t have any error, only I cannot see my output picture. I compile (by make), then I run (by ./myproject inputpicture.jpg outputpicture.jpg) but the outputpicture doesn’t appears. The inputpicture is in the same directory as the project.
How I can debug it? I tried to install gdb but I got some problems.. Do you know any simple tutorial in order to install a debuger?
Thanks a lot!
I’ve just install gdb and run my program. And as I thought, the problem is in cvSaveImage () but, I don’t know why.
I define it as:
cvSaveImage (“prova.jpg”, img, 95);
So, it seems it is correct. I don’t know how I can resolved it.
Thanks for your attention!
Finally, I found out the problem was in third parameter of cvSaveImage. I don’t know why, but with cvSaveImage (“prova.jpg”, img, 0); it works.
Thank you!
Great Gabriel!
I just changed
” else if (!raspipreview_create(&state.preview_parameters)) ” line in main to
” else if ( (status = raspipreview_create(&state.preview_parameters)) != MMAL_SUCCESS) ”
Works like a charm!
It works. Ca marche!!
Please help me,
i added ${OpenCV_LIBS} at the end of target_link_libraries in CMakesList.txt but error still occur.
.
CMakeFiles/camcv.dir/camcv.c.o: In function `cvRound’:
camcv.c:(.text+0×178): undefined reference to `lrint’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvDecRefData’:
camcv.c:(.text+0xfd4): undefined reference to `cvFree_’
camcv.c:(.text+0x107c): undefined reference to `cvFree_’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvGetRow’:
camcv.c:(.text+0×1214): undefined reference to `cvGetRows’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvGetCol’:
camcv.c:(.text+0×1254): undefined reference to `cvGetCols’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvReleaseMatND’:
camcv.c:(.text+0x127c): undefined reference to `cvReleaseMat’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvSubS’:
camcv.c:(.text+0×1448): undefined reference to `cvAddS’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvCloneSeq’:
camcv.c:(.text+0×1494): undefined reference to `cvSeqSlice’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvSetNew’:
camcv.c:(.text+0x151c): undefined reference to `cvSetAdd’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvGetSetElem’:
camcv.c:(.text+0x15ec): undefined reference to `cvGetSeqElem’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvEllipseBox’:
camcv.c:(.text+0×1724): undefined reference to `cvEllipse’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvFont’:
camcv.c:(.text+0×1788): undefined reference to `cvInitFont’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvReadIntByName’:
camcv.c:(.text+0x186c): undefined reference to `cvGetFileNodeByName’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvReadRealByName’:
camcv.c:(.text+0×1958): undefined reference to `cvGetFileNodeByName’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvReadStringByName’:
camcv.c:(.text+0x1a00): undefined reference to `cvGetFileNodeByName’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvReadByName’:
camcv.c:(.text+0x1a4c): undefined reference to `cvGetFileNodeByName’
camcv.c:(.text+0x1a60): undefined reference to `cvRead’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvContourPerimeter’:
camcv.c:(.text+0x1aa8): undefined reference to `cvArcLength’
CMakeFiles/camcv.dir/camcv.c.o: In function `cvCalcHist’:
camcv.c:(.text+0x1ae8): undefined reference to `cvCalcArrHist’
CMakeFiles/camcv.dir/camcv.c.o: In function `encoder_buffer_callback’:
camcv.c:(.text+0x1ee8): undefined reference to `cvCreateMat’
camcv.c:(.text+0x1f08): undefined reference to `cvDecodeImage’
camcv.c:(.text+0x1f1c): undefined reference to `cvSaveImage’
camcv.c:(.text+0x1f28): undefined reference to `cvNamedWindow’
camcv.c:(.text+0x1f34): undefined reference to `cvShowImage’
camcv.c:(.text+0x1f3c): undefined reference to `cvWaitKey’
collect2: ld returned 1 exit status
make[2]: *** [camcv] Error 1
make[1]: *** [CMakeFiles/camcv.dir/all] Error 2
make: *** [all] Error 2
in discussions,martin said,
“Hi,
How did you fix this problem ?
What did you put in the CMakeLists.txt
Thanks
Martin”
then he said,
“Got everything working now.
Really appreciate the amount of work gone into this project.
Thank You !”
@martin how did u correct those errors..pls help..urgent!!…
Hi papu,
I have the same promble now.
Can you tell me how to solve it?
Thanks.
This is my CMakeLists.txt
cmake_minimum_required(VERSION 2.8)
project( camcv )
SET(COMPILE_DEFINITIONS -Werror)
#OPENCV
find_package( OpenCV REQUIRED )
#link_directories( /home/pi/libfacerec-0.04 )
include_directories(/opt/vc/userland/host_applications/linux/libs/bcm_host/include)
include_directories(/opt/vc/userland/host_applications/linux/apps/raspicam/gl_scenes)
include_directories(/opt/vc/userland/interface/vcos)
include_directories(/opt/vc/userland)
include_directories(/opt/vc/userland/interface/vcos/pthreads)
include_directories(/opt/vc/userland/interface/vmcs_host/linux)
include_directories(/opt/vc/userland/interface/khronos/include)
include_directories(/opt/vc/userland/interface/khronos/common)
include_directories(./gl_scenes)
include_directories(.)
include_directories(/opt/vc/include)
include_directories(/opt/vc/include/interface/vcos)
include_directories(/opt/vc/include/interface/vcos/pthreads)
include_directories(/opt/vc/include/interface/vmcs_host/linux)
add_executable(camcv RaspiCamControl.c RaspiCLI.c RaspiPreview.c camcv.c RaspiTex.c RaspiTexUtil.c gl_scenes/teapot.c gl_scenes/models.c gl_scenes/square.c gl_scenes/mirror.c gl_scenes/yuv.c gl_scenes/sobel.c tga.c)
target_link_libraries(camcv /opt/vc/lib/libmmal_core.so /opt/vc/lib/libmmal_util.so /opt/vc/lib/libmmal_vc_client.so /opt/vc/lib/libvcos.so /opt/vc/lib/libbcm_host.so /opt/vc/lib/libGLESv2.so /opt/vc/lib/libEGL.so pthread -lm ${OPENCV_LIBS})
hey
Hi: I tried to change the image size at state->height and state->width. It seems like I cannot modify the image size. Can you help me to capture images with higher resolution ?
appreciate
For Gabriel’s comments, I works well!
But represent to one line
“xlib: extension “RANDR” missing on disply “:10.0”
What’s means? and Wow to i slove?
Hi, after I modified camcv.c I got this error:
pi@raspberrypi ~/camcv $ make
[ 7%] Building C object CMakeFiles/camcv.dir/camcv.c.o
/home/pi/camcv/camcv.c:62:16: fatal error: cv.h: No such file or directory
compilation terminated.
make[2]: *** [CMakeFiles/camcv.dir/camcv.c.o] Error 1
make[1]: *** [CMakeFiles/camcv.dir/all] Error 2
make: *** [all] Error 2
I really dont know where the vc.h file is.
Please help me.
Thanks a lot!
I have the same problem.Do you fix it now?
Hi,
just still have problems with compiling after replacing the camcv.c file:
pi@raspberrypi ~/camcv $ cmake .
CMake Error at CMakeLists.txt:1 (find_package):
By not providing “FindOpenCv.cmake” in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by “OpenCv”, but
CMake did not find one.
Could not find a package configuration file provided by “OpenCv” with any
of the following names:
OpenCvConfig.cmake
opencv-config.cmake
Add the installation prefix of “OpenCv” to CMAKE_PREFIX_PATH or set
“OpenCv_DIR” to a directory containing one of the above files. If “OpenCv”
provides a separate development package or SDK, be sure it has been
installed.
— Configuring incomplete, errors occurred!
Please help me!
Thanks a lot!
Tim
Please help me!
Which versions of opencv are you using.
Is there somebody who got it working and could upload a mirror in dropbox or something else for others?
Best Regards!
Tim
This is my final CMakeList:
cmake_minimum_required(VERSION 2.8)
project(camcv)
SET(COMPILE_DEFINITIONS -Werror)
#OPENCV
find_package( OpenCV REQUIRED )
include_directories(/opt/vc/userland-master/host_applications/linux/libs/bcm_host/include)
include_directories(/opt/vc/userland-master/host_applications/linux/apps/raspicam/gl_scenes)
include_directories(/opt/vc/userland-master/interface/vcos)
include_directories(/opt/vc/userland-master)
include_directories(/opt/vc/userland-master/interface/vcos/pthreads)
include_directories(/opt/vc/userland-master/interface/vmcs_host/linux)
include_directories(/opt/vc/userland-master/interface/khronos/include)
include_directories(/opt/vc/userland-master/interface/khronos/common)
include_directories(./gl_scenes)
include_directories(.)
include_directories(/opt/vc/include)
include_directories(/opt/vc/include/interface/vcos)
include_directories(/opt/vc/include/interface/vcos/pthreads)
include_directories(/opt/vc/include/interface/vmcs_host/linux)
add_executable( camcv RaspiCamControl.c RaspiCLI.c RaspiPreview.c camcv.c RaspiTex.c RaspiTexUtil.c tga.c gl_scenes/teapot.c gl_scenes/models.c gl_scenes/square.c gl_scenes/mirror.c gl_scenes/yuv.c gl_scenes/sobel.c)
target_link_libraries( camcv /opt/vc/lib/libmmal_core.so /opt/vc/lib/libmmal_util.so /opt/vc/lib/libmmal_vc_client.so /opt/vc/lib/libvcos.so /opt/vc/lib/libbcm_host.so /opt/vc/lib/libGLESv2.so /opt/vc/lib/libEGL.so pthread -lm ${OpenCV_LIBS} )
Pingback: Failed to run camera app. Please check for firmware updates - DL-UAT
i keep getting a “fatal error” saying cv.h there is no such file or directory, how can i fix this please help!
Look at my comment below.
cv.h no such file or directory can be solved by using opencv/cv.h and opencv/highgui.h
An old post of mine that might help people that are new to this:
…
Also I recommend using uv4l since it’s a driver and not a “hack”:
(See example 4) http://www.linux-projects.org/modules/sections/index.php?op=viewarticle&artid=16
This tutorial helped me a lot but I just can’t use this messy way to do things for my project. uv4l is the right way to do this, install a driver and then call VideoCapture cap(-1); and cap.read(frame);
I am getting the following message, I am using Raspberry Pi 2. with Raspi cam. plz help me out to resolve this issue.
camcv Camera App v1.3.8
Runs camera for specific time, and take JPG capture at end if requested
usage: camcv [options]
Image parameter commands
-?, –help : This help information
-w, –width : Set image width
-h, –height : Set image height
-q, –quality : Set jpeg quality
-r, –raw : Add raw bayer data to jpeg metadata
-o, –output : Output filename (to write to stdout, use ‘-o -‘). If not specified, no file is saved
-l, –latest : Link latest complete image to filename
-v, –verbose : Output verbose information during run
-t, –timeout : Time (in ms) before takes picture and shuts down (if not specified, set to 5s)
-th, –thumb : Set thumbnail parameters (x:y:quality) or none
-d, –demo : Run a demo mode (cycle through range of camera options, no capture)
-e, –encoding : Encoding to use for output file (jpg, bmp, gif, png)
-x, –exif : EXIF tag to apply to captures (format as ‘key=value’) or none
-tl, –timelapse : Timelapse mode. Takes a picture every ms
-fp, –fullpreview : Run the preview using the still capture resolution (may reduce preview fps)
-k, –keypress : Wait between captures for a ENTER, X then ENTER to exit
-s, –signal : Wait between captures for a SIGUSR1 from another process
-g, –gl : Draw preview to texture instead of using video render component
-gc, –glcapture : Capture the GL frame-buffer instead of the camera image
-set, –settings : Retrieve camera settings and write to stdout
-cs, –camselect : Select camera . Default 0
-bm, –burst : Enable ‘burst capture mode’
-md, –mode : Force sensor mode. 0=auto. See docs for other modes available
-dt, –datetime : Replace frame number in file name with DateTime (YearMonthDayHourMinSec)
-ts, –timestamp : Replace frame number in file name with unix timestamp (seconds since 1900)
Preview parameter commands
-p, –preview : Preview window settings
-f, –fullscreen : Fullscreen preview mode
-op, –opacity : Preview window opacity (0-255)
-n, –nopreview : Do not display a preview window
Image parameter commands
-sh, –sharpness : Set image sharpness (-100 to 100)
-co, –contrast : Set image contrast (-100 to 100)
-br, –brightness : Set image brightness (0 to 100)
-sa, –saturation : Set image saturation (-100 to 100)
-ISO, –ISO : Set capture ISO
-vs, –vstab : Turn on video stabilisation
-ev, –ev : Set EV compensation
-ex, –exposure : Set exposure mode (see Notes)
-awb, –awb : Set AWB mode (see Notes)
-ifx, –imxfx : Set image effect (see Notes)
-cfx, –colfx : Set colour effect (U:V)
-mm, –metering : Set metering mode (see Notes)
-rot, –rotation : Set image rotation (0-359)
-hf, –hflip : Set horizontal flip
-vf, –vflip : Set vertical flip
-roi, –roi : Set region of interest (x,y,w,d as normalised coordinates [0.0-1.0])
-ss, –shutter : Set shutter speed in microseconds
-awbg, –awbgains : Set AWB gains – AWB mode must be off
-drc, –drc : Set DRC Level
-st, –stats : Force recomputation of statistics on stills capture pass
-a, –annotate : Enable/Set annotate flags or text
-3d, –stereo : Select stereoscopic mode
-dec, –decimate : Half width/height of stereo image
-3dswap, –3dswap : Swap camera order for stereoscopic
-ae, –annotateex : Set extra annotation parameters (text size, text colour(hex YUV), bg colour(hex YUV))
Notes
Exposure mode options :
auto,night,nightpreview,backlight,spotlight,sports,snow,beach,verylong,fixedfps,antishake,fireworks
AWB mode options :
off,auto,sun,cloud,shade,tungsten,fluorescent,incandescent,flash,horizon
Image Effect mode options :
none,negative,solarise,sketch,denoise,emboss,oilpaint,hatch,gpen,pastel,watercolour,film,blur,saturation,colourswap,washedout,posterise,colourpoint,colourbalance,cartoon
Metering Mode options :
average,spot,backlit,matrix
Dynamic Range Compression (DRC) options :
off,low,med,high
Preview parameter commands
-gs, –glscene : GL scene square,teapot,mirror,yuv,sobel
-gw, –glwin : GL window settings
pi@Pi ~/camcv $
Is there anything else I have to set ?
Kind Regards
Amit
Did you figure out your problem? If so please post solution as I am having the same problem.
Thanks in advance
What would it take to get this to work at any other resolution?
I need photos only, not video and I don’t mind the delay. need good photos.
Hi Pierre,
I have this error :
CMakeFiles/camcv.dir/camcv.c.o: In function `cvPointFrom32f’:
camcv.c:(.text+0x178): undefined reference to `cvRound’
do you know what’s wrong ?
(I have the same CMakeList than @Cedric just above, and your camcv.c)
Thanks
Regards
Bonjour,
Ya personne pour nous donner en un bloc la procedure a suivre a ce niveau ?
Nous bloquons tous :
– au niveau du camcv.c a modifier
– et encore avec le CMakeLists.txt qui doit etre aussi modifier.
Merci de nous dire s’il faut rajouter des fichiers quelque part.
Merci tout le monde.
CMakeFiles/camcv.dir/build.make:123: recipe for target ‘CMakeFiles/camcv.dir/camcv.c.o’ failed
make[2]: *** [CMakeFiles/camcv.dir/camcv.c.o] Error 1
CMakeFiles/Makefile2:60: recipe for target ‘CMakeFiles/camcv.dir/all’ failed
make[1]: *** [CMakeFiles/camcv.dir/all] Error 2
Makefile:76: recipe for target ‘all’ failed
make: *** [all] Error 2
Maintenant j’ai ce resultat !!! AIDE please
[100%] Building C object CMakeFiles/camcv.dir/tga.c.o
Linking C executable camcv
CMakeFiles/camcv.dir/camcv.c.o: dans la fonction « cvDecRefData »:
camcv.c:(.text+0xfe0): référence indéfinie vers « cvFree_ »
camcv.c:(.text+0x1088): référence indéfinie vers « cvFree_ »
CMakeFiles/camcv.dir/camcv.c.o: dans la fonction « cvGetRow »:
camcv.c:(.text+0x1220): référence indéfinie vers « cvGetRows »
CMakeFiles/camcv.dir/camcv.c.o: dans la fonction « cvGetCol »:
camcv.c:(.text+0x1260): référence indéfinie vers « cvGetCols »
CMakeFiles/camcv.dir/camcv.c.o: dans la fonction « cvReleaseMatND »:
camcv.c:(.text+0x1288): référence indéfinie vers « cvReleaseMat »
CMakeFiles/camcv.dir/camcv.c.o: dans la fonction « cvSubS »:
camcv.c:(.text+0x143c): référence indéfinie vers « cvAddS »
CMakeFiles/camcv.dir/camcv.c.o: dans la fonction « cvCloneSeq »:
camcv.c:(.text+0x1488): référence indéfinie vers « cvSeqSlice »
CMakeFiles/camcv.dir/camcv.c.o: dans la fonction « cvSetNew »:
camcv.c:(.text+0x1510): référence indéfinie vers « cvSetAdd »
CMakeFiles/camcv.dir/camcv.c.o: dans la fonction « cvGetSetElem »:
camcv.c:(.text+0x15e0): référence indéfinie vers « cvGetSeqElem »
CMakeFiles/camcv.dir/camcv.c.o: dans la fonction « cvEllipseBox »:
camcv.c:(.text+0x1718): référence indéfinie vers « cvEllipse »
CMakeFiles/camcv.dir/camcv.c.o: dans la fonction « cvFont »:
camcv.c:(.text+0x1780): référence indéfinie vers « cvInitFont »
CMakeFiles/camcv.dir/camcv.c.o: dans la fonction « cvReadIntByName »:
camcv.c:(.text+0x1868): référence indéfinie vers « cvGetFileNodeByName »
CMakeFiles/camcv.dir/camcv.c.o: dans la fonction « cvReadRealByName »:
camcv.c:(.text+0x1948): référence indéfinie vers « cvGetFileNodeByName »
CMakeFiles/camcv.dir/camcv.c.o: dans la fonction « cvReadStringByName »:
camcv.c:(.text+0x19f0): référence indéfinie vers « cvGetFileNodeByName »
CMakeFiles/camcv.dir/camcv.c.o: dans la fonction « cvReadByName »:
camcv.c:(.text+0x1a3c): référence indéfinie vers « cvGetFileNodeByName »
camcv.c:(.text+0x1a50): référence indéfinie vers « cvRead »
CMakeFiles/camcv.dir/camcv.c.o: dans la fonction « cvContourPerimeter »:
camcv.c:(.text+0x1a98): référence indéfinie vers « cvArcLength »
CMakeFiles/camcv.dir/camcv.c.o: dans la fonction « cvCalcHist »:
camcv.c:(.text+0x1ad8): référence indéfinie vers « cvCalcArrHist »
CMakeFiles/camcv.dir/camcv.c.o: dans la fonction « encoder_buffer_callback »:
camcv.c:(.text+0x1ef0): référence indéfinie vers « cvCreateMat »
camcv.c:(.text+0x1f10): référence indéfinie vers « cvDecodeImage »
camcv.c:(.text+0x1f24): référence indéfinie vers « cvSaveImage »
camcv.c:(.text+0x1f30): référence indéfinie vers « cvNamedWindow »
camcv.c:(.text+0x1f3c): référence indéfinie vers « cvShowImage »
camcv.c:(.text+0x1f44): référence indéfinie vers « cvWaitKey »
collect2: error: ld returned 1 exit status
CMakeFiles/camcv.dir/build.make:392: recipe for target ‘camcv’ failed
make[2]: *** [camcv] Error 1
CMakeFiles/Makefile2:60: recipe for target ‘CMakeFiles/camcv.dir/all’ failed
make[1]: *** [CMakeFiles/camcv.dir/all] Error 2
Makefile:76: recipe for target ‘all’ failed
make: *** [all] Error 2
I have exactly the same Error, please somebody help me, if already solved this problem!!!
I have exactly the same Error, somebody can help me please ??
The solution is stated above more than one time. I’d also suggest you to change your working language to English even if you’re not native speaking, which simplifies error solution:
> just add ${OpenCV_LIBS} at the end of target_link_libraries in CMakesList.txt
I add ${OpenCV_LIBS} and i have the same error !