# OpenCV incompatibility with SDK 2.10

**URL:** <https://3dclub.orbbec3d.com/t/opencv-incompatibility-with-sdk-2-10/2932>\
**Category:** Advanced\
**Created:** [April 28, 2020, 10:27am UTC](https://3dclub.orbbec3d.com/t/opencv-incompatibility-with-sdk-2-10/2932 "2020-04-28T10:27:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![RafaelRey](https://3dclub.orbbec3d.com/letter_avatar_proxy/v4/letter/r/a4c791/32.png) [@RafaelRey](https://3dclub.orbbec3d.com/u/RafaelRey)\
**Post date:** [April 28, 2020, 10:27am UTC](https://3dclub.orbbec3d.com/t/opencv-incompatibility-with-sdk-2-10/2932/1 "2020-04-28T10:27:17Z")

</div>

Hello everyone

I’m working in a research project using one Astra Embedded S, I’ll be happy if I can receive some help about some compatibility issues we are having with the Astra SDK.

We are currently using the Astra Embedded S for body tracking purposes. Our system is a ROS based robot. The problem has come when we tried to migrate from Ubuntu 16.04 with ROS Kinetic and OpenCV 2 to Ubuntu 18.04 with ROS Melodic and OpenCV 3.2.We are using the latest version of the astra SDK the 2.10 version and the C++ API.

The issue is an apparent incompatibility between the Astra SDK and OpenCV 3.2, but we are not sure. The samples that come with the Astra SDK works fine all of them. The problem arises when we try to use together OpenCV 3.2 and the Astra SDK 2.10 in the same ROS Node / Class. We’ve found that the fact of only adding the OpenCV libraries to the #include produces an error at execution time. We didn’t have this problem before, using OpenCV 2 with Ubuntu 16.04. We are using CMake to compile our projects with C++14 standard.

If we add to one project (without instantiating anything from OpenCV in the source code)

`#include <opencv2/opencv.h>`

And the corresponding CMake flags to our CMakeLists.txt to properly compile it

```
find_package(OpenCV 3.2 REQUIRED)

```

And

```auto
target_link_libraries(${PROJECT_NAME}_node ${catkin_LIBRARIES} ${ASTRA_LIBRARIES} ${OpenCV_LIBS})
target_include_directories(${PROJECT_NAME}_node PUBLIC ${catkin_INCLUDE_DIRS} ${ASTRA_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS})

```

The compiler build and link the application without any problem. The problem appears in execution time, the application crashes because an exception arises from the function astra::initialize(). This is the error we got:

```auto
OpenCV Error: The function/feature is not implemented (Unknown/unsupported array type) in getMat_, file /build/opencv-L2vuMj/opencv-3.2.0+dfsg/modules/core/src/matrix.cpp, line 1289
terminate called after throwing an instance of 'cv::Exception'
  what(): /build/opencv-L2vuMj/opencv-3.2.0+dfsg/modules/core/src/matrix.cpp:1289: error: (-213) Unknown/unsupported array type in function getMat_

```

Is it possible that we are not properly building our nodes, or maybe it’s a known issue? If you need more detailed information we can provide it as soon as you want .We’d appreciate any help from you, thank you very much.

---

<div class="post-metadata">

**Author:** ![emaccheese](https://3dclub.orbbec3d.com/letter_avatar_proxy/v4/letter/e/5f9b8f/32.png) [@emaccheese](https://3dclub.orbbec3d.com/u/emaccheese)\
**Post date:** [April 29, 2020, 10:20pm UTC](https://3dclub.orbbec3d.com/t/opencv-incompatibility-with-sdk-2-10/2932/2 "2020-04-29T22:20:09Z")

</div>

> matrix.cpp:1289: error: (-213) Unknown/unsupported array type in function getMat\_

Where are you using this function in your code and how are you using it? maybe thats the issue? thats what i can tell from the error.  
I work with Windows.

---

<div class="post-metadata">

**Author:** ![RafaelRey](https://3dclub.orbbec3d.com/letter_avatar_proxy/v4/letter/r/a4c791/32.png) [@RafaelRey](https://3dclub.orbbec3d.com/u/RafaelRey)\
**Post date:** [April 30, 2020, 9:13am UTC](https://3dclub.orbbec3d.com/t/opencv-incompatibility-with-sdk-2-10/2932/3 "2020-04-30T09:13:15Z")

</div>

Hi emaccheese,

The problem is that this error arises withouth using **any** opencv function, only including the opencv generic header. And this happen only when I build the node with the Astra libs and the opencv libs.

---

<div class="post-metadata">

**Author:** ![yuaiyuan](https://3dclub.orbbec3d.com/letter_avatar_proxy/v4/letter/y/dec6dc/32.png) [@yuaiyuan](https://3dclub.orbbec3d.com/u/yuaiyuan)\
**Post date:** [April 30, 2020, 12:19pm UTC](https://3dclub.orbbec3d.com/t/opencv-incompatibility-with-sdk-2-10/2932/4 "2020-04-30T12:19:13Z")

</div>

Hi my friend,

This problem is cause by different opencv versions. Actually in the SDK opencv was used. You can check it in:

SDK\_PATH/lib/Plugins/obt/3rdparty/lib/

in 2.0.19 SDK, opencv 2.4.8 is used. I just installed opencv 2.4.8 then I can substitute SFML with opencv in the samples. It works in both Linux and Windows.

Hope this can helps you.

Best Regard

Guo
