How to use openCV inside Yocto image

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to use openCV inside Yocto image

Jump to solution
19,341 Views
fikretalim
Contributor III

Hello,

I have created an image by using Yocto dora release with the command;

bitbake fsl-gui-image

I want to use openCV inside this image. For this purpose I have compiled openCV and the samples with the commands;

bitbake opencv

bitbake opencv-samples

But the problem is, fsl-gui-image is not updated after I compiled the openCV. Is there a process that I need to do for merging openCV inside fsl-gui-image or do I need to create a new custom image? How can I use openCV?

Thanks&Best Regards,

Fikret Alim

Labels (2)
Tags (3)
0 Kudos
1 Solution
11,050 Views
joshkurland
Contributor IV

You need to add the recipe to the image.  This can be done in a number of different ways.  The simplest may be to add to the end of your build/conf/local.conf file:

  CORE_IMAGE_EXTRA_INSTALL += "\

       opencv \

       opencv-samples \

"

Note that this will add OpenCV to EVERY image you try to make.  See this link for more information https://community.freescale.com/docs/DOC-95059

View solution in original post

0 Kudos
6 Replies
11,051 Views
joshkurland
Contributor IV

You need to add the recipe to the image.  This can be done in a number of different ways.  The simplest may be to add to the end of your build/conf/local.conf file:

  CORE_IMAGE_EXTRA_INSTALL += "\

       opencv \

       opencv-samples \

"

Note that this will add OpenCV to EVERY image you try to make.  See this link for more information https://community.freescale.com/docs/DOC-95059

0 Kudos
11,050 Views
fikretalim
Contributor III

Dear Josh,

Thank you very much for your support. It is now compiled and added to image, but the problem is, I still can not use opencv. Now, I found an opencv folder inside /usr/share, but it does not include neither executable nor source code. It only includes a samples folder which contain some images and videos. Also, I can not find any opencv libraries.

I don't know if you have expertise on opencv, but do you know  what should I do to use it now? Thank you for your support.

Best Regards,

Fikret Alim

0 Kudos
11,050 Views
andre_silva
NXP Employee
NXP Employee
0 Kudos
11,050 Views
mageswarand
Contributor I

Hi Andre Silva,

I want to disable phyton support in opencv2.4.bb.

can you please guide me how to do that.

I tried

EXTRA_OECMAKE =  -DBUILD_PYTHON_SUPPORT=OFF \

but not working

0 Kudos
11,050 Views
Mahyar
Contributor II

Hi Fikrel,

Have you figured out how to use openCV on Yocto?

I have done the same steps as you, but don't know how to use OpenCV yet

TIA

0 Kudos
11,049 Views
joshkurland
Contributor IV

I do have a little bit of experience with OpenCV, but I have only ever built it on Ubuntu (using x86 and Beableboard).  First things first, do you have all of the necessary plugins?  You will need ffmpeg, gstreamer, and a couple others too.  From my experience, OpenCV is not an executable, it is a set of libraries that can be linked to your code when compiling.  I have never used OpenCV with Yocto so I do not know what is included when it is build.  If you want sample code you may have to compile from source. 

This link helped me out a lot when I was first setting it up: http://www.ozbotz.org/opencv-installation-2-3-1/