Community
cancel
Showing results for 
Search instead for 
Did you mean: 
JBüch
Novice
1,073 Views

OpenCV on Edison (running a program)

Hey everybody!

I followed this tutorial here: https://software.intel.com/en-us/articles/opencv-300-ipp-tbb-enabled-on-yocto-with-intel-edison# comment-1840942 OpenCV 3.0.0 ( IPP & TBB enabled ) on Yocto with Intel® Edison with new Yocto image release | Intel® Developer Zone and everything worked fine. When I tried to run the program above I got the errors above. Now I removed the last part where I wait for the esc key to be pressed and it works But sometimes I still get the error. I usually have to start the prgram up to 3 times to get it running. Before it starts I get the errors (usually 3 times in a row). I think it is because the frame is not ready yet or there is still something left in the buffer...or maybe I have to close the video stream again and then reopen it before starting the program again? Any suggestions mucho appreciated

Julian

7 Replies
Carlos_M_Intel
Employee
106 Views

Hi jbuechel,

As you said, it looks like you are not closing all the processes related to the tasks so you are not able to open them again. Also, there are some libraries suggested in the log, have you tried to install/update them?

When you boot the board, are you able to run the code on the first try?

Regards,

Charlie

JBüch
Novice
106 Views

Thank you for the fast reply! I have not tried to install those libs...how do I do that? And yes when I boot the Edison I can run the program. :)

Carlos_M_Intel
Employee
106 Views

Hi jbuechel,

In order to install libraries there are some options for example you can find the .ipk file and install them with opkg or you install the packages from source using make.

If the code is working every time after every boot, I think that the problem is as you said:

..I think it is because the frame is not ready yet or there is still something left in the buffer...or maybe I have to close the video stream again and then reopen it before starting the program again?..

Take a look at the functions in: http://docs.opencv.org/modules/highgui/doc/reading_and_writing_images_and_video.html Reading and Writing Images and Video — OpenCV 2.4.11.0 documentation It could help you with this.

Regards,

Charlie

Carlos_M_Intel
Employee
106 Views

Hi Julian,

Do you have updates in this?

Regards,

Charlie

JBüch
Novice
106 Views

Yes! Im sorry everything turned out to be fine. I just had to release the

video capture device when I stopped the program. Also something really annoying: Everytime I exit the

program with ^C the video capture device is still running. You have to

replug the camera to make it work again. There is a work-aroun somewhere.

Carlos_M_Intel
Employee
106 Views

Hi jbuechel,

I'm not aware of a workaround for this, I think you could modify your code to not exiting the routine with ^C and use another method to close the device like http://docs.opencv.org/master/d8/dfe/classcv_1_1VideoCapture.html# gsc.tab=0 release ()

Maybe something like:

http://stackoverflow.com/questions/20049081/using-opencv-c-interface-do-i-need-to-release-camera-cap... Using OpenCV C++ interface do i need to release camera capture created with VideoCapture(int device?)

http://www.cplusplus.com/forum/general/154365/ OpenCV - Opening and Closing Webcam

Regards,

Charlie

JBüch
Novice
106 Views

Thank you this community might not be as detailed as maybe Arduino, but I feel like you guys put in a lot of effort in answering the wuestions as fast as possible. This is great.

Reply