Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.

AruCo or AprilTag support?

DaveInPA
New Contributor I
1,817 Views

I'm in need to use a marker like Aruco or AprilTag but seems like the OpenCV version for OpenVino doesn't have Aruco library included. I then tried to pip install AprilTag library but got a whole bunch of errors.

 

Is anyone using either of these (or others) fiducial tags with OpenVino? I don't need anything special here - just a single marker that I can use to position a rover....

0 Kudos
8 Replies
Peh_Intel
Moderator
1,789 Views

Hi Davel,

 

Thanks for reaching out to us.

 

Yes, OpenCV that comes with OpenVINO does not have the Aruco library.

 

ArUco library is included in the opencv-contrib-python package which you can install via:

pip install opencv-contrib-python

 

We are reaching out to OpenCV development team for any suggestion or workaround to include similar marker library for OpenCV version for OpenVINO.

 

In a meanwhile, are you using OpenCV in Raspbian Buster 32-bit?

 

 

Regards,

Peh

 

0 Kudos
DaveInPA
New Contributor I
1,775 Views

I’m using the openCV build for openVino on a window 10 and Raspbian Buster 32 machine. 

Just to confirm - there is no way to reference different OpenCV libraries within a single python application correct? So no way around this one?

0 Kudos
Peh_Intel
Moderator
1,757 Views

Hi Davel,

 

Yes, you cannot import two different OpenCV libraries.

 

You can get the ArUco library that included in the opencv-contrib-python package which you can install via:

pip install opencv-contrib-python

 

Next, you can install Intel® Distribution of OpenVINO™ Toolkit from PyPI Repository.

·      Runtime package with the Inference Engine inside.

·      Developer package that includes the runtime package as a dependency, Model Optimizer, Accuracy Checker and Post-Training Optimization Tool.

 

In another way, you also can build your own Custom OpenCV with the extra modules and use it in building Open Source OpenVINO™.

 

 

Regards,

Peh

 

0 Kudos
DaveInPA
New Contributor I
1,749 Views

Ok i uninstalled everything on my windows machine as a start and started from scratch.

 

- installed Python 3.8

- installed CMAKE

- did a build from source of OpenCV and included the OPenCV-Contrib-Python package in that build (used cmake and then MSVC 2019 to compile)

 

At this point I confirmed my OpenCV install was working as expected including Aruco tag support. Then..

 

- Installed OpenVINO using windows installed (w_openvino_toolkit_p_2021.4.582_online) - DID NOT SELECT OPENCV option

 

- ran the setupvars.bat script and then used the CMD window to set the different environment variables permanently

 

Now when I run my application that uses OpenVINO for inference and OpenCV for image processing it all works just fine. In the past I had installed "The OpenCV compile optimized for Intel OpenVino" and was under the assumption that was a special build of OpenCV that was required for OpenVino. 

 

BEFORE --> cv2.__version__ = "4.5.5_openvino"

NOW  --> "4.5.5"

 

So what is the difference between these 2 different builds or versions of OpenCV? My application appears to run just fine as it did before (and with Aruco tags!). 

 

Thanks

 

 

0 Kudos
Peh_Intel
Moderator
1,722 Views

Hi Davel,


Technically, OpenVINO™ is not linked with OpenCV, as OpenCV is used as image processing library. OpenCV for OpenVINO™ is based compiled with selected features supported in OpenVINO™. This OpenCV version is not a special build or optimized build purposely for OpenVINO™. In performance perspective, OpenCV version and OpenCV version for OpenVINO™ are actually no difference.



Regards,

Peh


0 Kudos
DaveInPA
New Contributor I
1,715 Views

Thank you for clarifying - i am all set now that I understand I can just use the normal OpenCV build/install. You can close this thread and appreciate your help!

 

For others it might be good to clarify some things which adds a lot of confusion to installs and troubleshooting potential issues:

 

1 - What is the difference between the open source version of OpenVino (build from source) vs. the Intel Distribution of OpenVino - are they exactly the same but Intel version is just built with certain compiler flags? Why would you use one over the other?

 

2 -What is the purpose of using the OpenVino branch of OpenCV vs the regular build/install of OpenCV?

 

 

 

0 Kudos
Maksim_S_Intel
Employee
1,702 Views

BTW, OpenCV supports chessboards with meta information: https://docs.opencv.org/4.5.4/d9/d0c/group__calib3d.html#gadc5bcb05cb21cf1e50963df26986d7c9 , chessboard generation script have been updated recently to support them too.

 

OpenCV is included in OpenVINO mostly for convenience, it has been built and tested on same supported platforms as OpenVINO. Major differences from default build configuration are:

  • higher baseline CPU optimization level (SSE 4.2), security-related compilation flags enabled
  • less external dependencies (built-in libjpeg, libpng, ...; plugin-based videoio, highgui, parallel backends)
  • enabled integration with OpenVINO (dnn and gapi modules can use InferenceEngine/ngraph backend)
0 Kudos
Peh_Intel
Moderator
1,644 Views

Hi Davel,


This thread will no longer be monitored since this issue has been resolved. If you need any additional information from Intel, please submit a new question. 


Regards,

Peh



0 Kudos
Reply