Orbbec Gemini camera SDK adaptation notes. 2

Posted by fred12ned on Thu, 04 Nov 2021 05:10:35 +0100

I like the sentence in the navigation very much. You have deviated from the route and have been re planned for you. Please choose a U-turn at the right position. But ah, there is no way back in life

Orbbec Gemini camera SDK adaptation notes

About RGBD camera selection (Obi Zhongguang)

This article explains the directory structure and several files of the SDK.

https://developer.orbbec.com.cn/download.html?id=64

SDK link location

For our simple use of cameras, obtaining data flow is the most important thing

The official interface is OpenNI. Next, we'll explore the relevant resources, and then install and use it on the ARM device.

First attach the SDK address:

https://developer.orbbec.com.cn/develop_details.html?id=2

That's it

Because this is an open-source magic modified version (in fact, it is not a magic modified version):

https://github.com/OpenNI/OpenNI2

Location here

If you have a chance, check the difference (compare the difference between the previous version and Obi)

Also note that RGB is read using OpenCV

Examples under the Arm platform

ad locum

Look at the installation requirements. In fact, they are all OK

In fact, I think it means 1G of running memory

Just download this

https://developer.orbbec.com.cn/download.html?id=64

If you are using raspberry pie or Jetson Nano, please come to this address to download what I mean

It's not big. It's hosted by Alibaba cloud

Decompressed content, or a very clear structure

These so libraries are compiled binary libraries and need to be placed at the link location of our dynamic libraries

It should be noted that:

The driver of USBLib may be required. There is no driver problem for RGBD cameras under Linux.

https://sourceforge.net/projects/libusb/files/libusb-1.0/

Direct download

- Linux:
  - LibUSB 1.0.x
    sudo apt-get install libusb-1.0-0
  - LibUDEV
    sudo apt-get install libudev0
  - FreeGLUT3
    sudo apt-get install freeglut3

You need to install the above three libraries to help us run OpenNI. If you want to compile OpenGL, your last library needs to install the development version.

   sudo apt-get install freeglut3-dev

OpenNI compilation requires the installation of the following libraries

Linux
-----
- GCC 4.x
    sudo apt-get install g++
- Python 2.6+/3.x
    sudo apt-get install python
- LibUSB 1.0.x
    sudo apt-get install libusb-1.0-0-dev
- LibUDEV
    sudo apt-get install libudev-dev
- JDK 6.0
    sudo apt-get install openjdk-6-jdk
- FreeGLUT3
    sudo apt-get install freeglut3-dev
- Doxygen
    sudo apt-get install doxygen
- GraphViz
    sudo apt-get install graphviz

As for compiling, it's easier ~ in the OpenNI directory

make

If it's cross compiling

  - ARM_CXX=<path to cross-compilation g++>
  - ARM_STAGING=<path to cross-compilation staging dir>

Define environment variables first

PLATFORM=Arm make

Then, because CMake is used, execute the above.

https://structure.io/openni

I searched OpenNI's official website and found that there was actually a second-generation SDK

There is an SDK called the structure SDK. I don't know if it can be used

You can also register as a developer to download additional SDK s

Here is a download

This is the directory structure

And doc

It doesn't seem to work. That's it

But there are also examples of ROS in the SDK. I think I can transplant them completely

The above SDK is the OpenNI upgrade SDK, and the following SDK is the SDK we use, that is, the next generation.

https://structure.io/openni

Address here

Here we can download a zip file and open it with a browser

Find the index file and open it

At first glance, it looks the same as our Obi SDK document (I'm afraid it's not the same). I looked at it. It should be all the same.

I think this setting is very necessary.

Continue reading:

When writing our RGBD application, the SDK installation statement should be like this:

Add a second such header file

The header file is located here

This is the other headers I found in the OpenNI header file

The macros here are written on supported platforms

You can see the error method in the instance

In other words, when you drive the camera, you need to initialize it first. In fact, it's the driver. If the driver is not installed, it won't work, but we don't know what's wrong, so it's equivalent to printing a log.

API

What a function looks like

Description of the function

OpenNI header file

All class declarations

The next chapter continues~