How to use openCV inside Yocto image

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to use openCV inside Yocto image

跳至解决方案
21,124 次查看
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

标签 (2)
标记 (3)
0 项奖励
回复
1 解答
12,833 次查看
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 项奖励
回复
6 回复数
12,834 次查看
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 项奖励
回复
12,833 次查看
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 项奖励
回复
12,833 次查看
andre_silva
NXP Employee
NXP Employee
0 项奖励
回复
12,833 次查看
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 项奖励
回复
12,833 次查看
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 项奖励
回复
12,832 次查看
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/