OAK depth camera usage tutorial

  • 1. Download libraries and dependencies
  • 1.Initialization

echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="03e7", MODE="0666"' | sudo tee /etc/udev/rules.d/80-movidius.rules

sudo udevadm control --reload-rules && sudo udevadm trigger

 2.depthai code library file package loading

git clone depthai: DepthAI Python API utilities, examples, and tutorials.    #Download the code library to the main directory

 

As shown in the fourth data packet in the second row of the main directory in the figure

two. Compilation of code files

Example 1: Person detection

  1. Execute dependent code files

cd depthai                   #Enter the depthai directory, which is the directory where the dependent code files are located

python3 install_requirements.py #Execution  

2. Execute code file

python3 depthai_demo.py -usbs usb2 #Force to use usb2 to transmit signals

 

Example 2: sdk point cloud

The sdk file requires more dependencies, and more dependencies need to be installed based on the previous installation of the depthai library.

  1. Dependencies required as long as you execute the sdk file

pip install -U depthai-sdk

2.Rerun visual point cloud, RerunSDK 

pip install rerun-sdk

3. Enter the directory where the point cloud main program file is located

 

4. Right-click on the blank area and click Open in Terminal

5. Execute python3 pointcloud.py -usbs usb2, that’s it

 

 Three: Analysis of Frequently Asked Questions

  1. Force usb2 communication

usb2 refers to the common four-contact port cable, such as a common charging cable, and the oak camera uses the usb3 interface by default, which is blue inside and has nine contact ports, as shown below. Generally, it is not available without special configuration. , if you use usb3 communication, you can remove the -usbs usb2 statement in the above command.

  1. import(error)problem

This problem is usually caused by two situations: there is a problem with the component version or there is a problem with the dependency version.

At this time, you need to update the version of the component or dependency according to the file needs. The component is similar to opencv-python, etc., and the dependency is like the update of depthai-sdk above. You need to use the statement in the terminal to update, such as pip install -U depthai -sdk, for other import issues, please refer to the troubleshooting section of the official documentation, the URL is at the end.

2.No module problem

In this case, the specific module has not been downloaded yet. Search the module name, find its download statement, and download it, or check the official documentation for similar fault reports. The methods to solve the problem are similar. You can check Take a look, maybe it will inspire you

3.Download problem of depthai library

For the oak camera library, when looking for open source code, it is usually downloaded when you download the depth package for the first time. There is no need to download it again, or rename it and then download an identical package. It is not necessary. Just do it next time, especially for those with URLs in official documents, ending with depthai, which are basically download addresses.

4. Data acquisition

  1. oak China official tutorial

1.1.4. Ubuntu — DepthAI Docs 0.3.0.0 documentation

Troubleshooting and error reporting can be found in the Q&A section.

 

2. oak China csdn and WeChat communication group (contact information at the bottom of the oak official homepage, quick reply if you have any questions)

csdn URL:OAK China_Official Blog_CSDN Blog-OAK depth camera usage tutorial, OAK depth camera common errors, OAK depth camera application case bloggers 

3.oak China B station sample video tutorial

5. Remarks

  1. If you want to understand and correct the program more comprehensively and intuitively, you can choose to run it in pycharm instead of the terminal, which is more proactive and conducive to in-depth understanding of the code itself. Good morning and worry-free.
  2. This process inevitably requires scientific Internet access, such as accessing foreign code websites such as github, so you can do it early and save worry. You can also register an account yourself to share your IT experience
  3. For some details, just search on csdn. Don’t forget to bring ubuntu and its version number.

Guess you like

Origin blog.csdn.net/m0_64854963/article/details/131613726