Opencv on i.MX8 Yocto

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

Opencv on i.MX8 Yocto

Jump to solution
4,868 Views
xu_ji1
Contributor V

Hello,

About i.MX8 Yocto,does the Opencv in aarch64-mx8-poky-linux will upgrade?

Now we use i.MX8 QM 2.3.0 Yocto release the OpenCV version is 4.0.1,we want OpenCV version 4.1.2

does it will upgrade or how to get new OpenCV version?

Thanks

0 Kudos
1 Solution
4,586 Views
don_gunn
Contributor V

Hi Xu Ji,

Using the Yocto 5.4.3 release, Python 3 works for this. From the command line on your board:

root@imx8qmmek:~# python3

>>>import cv2

>>> cv2.__version__
'4.2.0'

Don

View solution in original post

0 Kudos
8 Replies
4,586 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello Xu,

in the MX8QM we have the OpenCV 3.4, you have to wait until next releases for version 4.x, currently we are in L5.4.3 BSP, se next releases will appear in July 2020.

Regards

0 Kudos
4,586 Views
xu_ji1
Contributor V

Hi,

You say OpenCV 3.4 is in 4.0.1.imx folder?How to check the correct OpenCV version in Yocto?

Thanks

0 Kudos
4,586 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hi,

The OpenCV version is contained within a special

cv2.__version__

  variable, which you can access like this:

Checking your OpenCV version using Python
$ python
>>> import cv2
>>> cv2.__version__
'3.0.0'

The

cv2.__version__

  variable is simply a string which you can split into the major and minor versions:

Checking your OpenCV version using Python
>>> (major, minor, _) = cv2.__version__.split(".")
>>> major
'3'
>>> minor
'0'

Regards

0 Kudos
4,586 Views
xu_ji1
Contributor V

hi,

When I input >>> import cv2 on board

it is show that error:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named cv2

pls help check it

Thanks

0 Kudos
4,587 Views
don_gunn
Contributor V

Hi Xu Ji,

Using the Yocto 5.4.3 release, Python 3 works for this. From the command line on your board:

root@imx8qmmek:~# python3

>>>import cv2

>>> cv2.__version__
'4.2.0'

Don

0 Kudos
4,586 Views
xu_ji1
Contributor V

Hi Don,

Thanks, and do u know how to upgrade Yocto 2.3.0 release OpenCV verison to 4.2.0 that Yocto 5.4.3 release?

0 Kudos
4,586 Views
don_gunn
Contributor V

Hi Xu Ji,

I don’t see a Yocto 2.3.0 release. The earliest Yocto release that I can see support for the MX8 QM in is 4.9.51. You might want to double check the version that you are on.

When you run “bitbake ” you will see the “DISTRO_VERSION” listed. The best way to get a newer version of OpenCV would be to use a new distro.

You can check the version that is provided in your BSP by running:

$ bitbake -s | grep opencv

opencv :4.2.0.imx-r0

In Distro 4.19-warrior you get OpenCV 4.0.1. It might be possible to integrate 4.2.0 into an older distro but it would probably be a fair bit of work.

Best recommendation is to move to Yocto distro 5.4-zeus to get OpenCV 4.2.0

Don

Don Gunn BEng, Bsc

Advanced Engineer, Processor Specialist

Future Intelligent Solutions

C: 604-318-1319

www.FutureElectronics.com<http://www.futureelectronics.com/>;

This communication is subject to Future Electronics' Email Policy

WARNING: Please do not attach, forward or reply with any Export Controlled Technical Data, Documents/Drawings (EAR and ITAR) to this email.<http://www1.futureelectronics.com/disclaimer.html>

<https://www.futureelectronics.com/help/shipping-impacts/letter>

Click on the banner to go to our website for updates.

0 Kudos
4,586 Views
xu_ji1
Contributor V

Hi,

May I use the Python check OpenCV version on the 8QM mek HW board?

0 Kudos