Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python applications for RealSense #13647

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added applications/shape_detector/doc/corner.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added applications/shape_detector/doc/planes.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added applications/shape_detector/doc/planes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 51 additions & 0 deletions applications/shape_detector/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
![](doc/planes.png)


# Introduction

This code provides examples of the detection of 3D objects like planes, lines and corners using RGB and Depth information from RealSense camera. The following objects are supported:

- Planes : detected multiple planes in the depth image
- Edges : detecting edges / intersection of planes
- Corners: three plane intersection/ junctions

These objects could be integrated in your robotics and video processing pipe line.
Your code can run in real time, using examples below.


## Installation Windows

1. Install python 3.10 from Python Release Python 3.10.0 | <https://www.python.org>

2. Create virtual environment. In Windows PowerShell:

python -m venv <your path>\Envs\planes3d

3. Activate virtual environment. In Windows CMD shell:

<your path>\Envs\planes3d\Scripts\activate.bat

4. Installing realsense driver. For example, download pyrealsense2-2.55.10.089-cp310-cp310-win_amd64.whl:

pip install pyrealsense2-2.55.10.6089-cp310-cp310-win_amd64.whl

5. Install opencv and numpy:

pip install opencv-contrib-python

6. Install scipy:

python -m pip install scipy

7. Install matplotlib:

pip install matplotlib

## Usage

```py
>>> from plane_detector import PlaneDetector

>>> pd = PlaneDetector()

```
1 change: 1 addition & 0 deletions applications/shape_detector/src/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
print('Utils-Src')
Loading