Skip to content

Commit 270cf91

Browse files
committed
added adjustments
1 parent 6d03038 commit 270cf91

1 file changed

Lines changed: 32 additions & 9 deletions

File tree

readme.md

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,35 +72,36 @@ This is the best option if you want to plug in your camera and get started right
7272
- Depth Quality Tool: Measure accuracy and fill rate.
7373

7474
### Setup Guides - precompiled SDK
75-
<div align="center" style="margin: 20px 0;">
75+
7676
<a href="./doc/distribution_linux.md"><img src="https://img.shields.io/badge/Ubuntu_Guide-333?style=flat&logo=ubuntu&logoColor=white" style="margin: 5px;" alt="Linux\Jetson Guide"/></a>
7777
<a href="./doc/distribution_windows.md"><img src="https://custom-icon-badges.demolab.com/badge/Windows_Guide-333?logo=windows11&logoColor=white" style="margin: 5px;" alt="Windows Guide"/></a>
78-
</div>
78+
79+
> **Note:** For **minor releases**, we publish Debian packages as release artifacts that you can download and install directly.
7980
8081
### 2️. Build from Source
8182
For a more custom installation, follow these steps to build the SDK from source.
8283
1. Clone the repository and create a build directory:
8384
```bash
8485
git clone https://github.com/IntelRealSense/librealsense.git
86+
cd librealsense
8587
mkdir build && cd build
8688
```
8789
2. Run CMake to configure the build:
8890
```bash
89-
cmake .. -DBUILD_EXAMPLES=true
91+
cmake ..
9092
```
9193
3. Build the project:
9294
```bash
93-
make -j$(nproc)
95+
cmake --build .
9496
```
9597

9698
### Setup Guides - build from source
97-
<div align="center" style="margin: 20px 0;">
99+
98100
<a href="./doc/installation.md"><img src="https://img.shields.io/badge/Ubuntu_Guide-333?style=flat&logo=ubuntu&logoColor=white" style="margin: 5px;" alt="Linux Guide"/></a>
99101
<a href="./doc/installation_jetson.md"><img src="https://img.shields.io/badge/Jetson_Guide-333?style=flat&logo=nvidia&logoColor=white" style="margin: 5px;" alt="Jetson Guide"/></a>
100102
<a href="./doc/installation_windows.md"><img src="https://custom-icon-badges.demolab.com/badge/Windows_Guide-333?logo=windows11&logoColor=white" style="margin: 5px;" alt="Windows Guide"/></a>
101103
<a href="./doc/installation_osx.md"><img src="https://img.shields.io/badge/macOS_Guide-333?style=flat&logo=apple&logoColor=white" style="margin: 5px;" alt="macOS Guide"/></a>
102104

103-
</div>
104105

105106
## Python Packages
106107
[![pyrealsense2](https://img.shields.io/pypi/v/pyrealsense2.svg?label=pyrealsense2&logo=pypi)](https://pypi.org/project/pyrealsense2/)
@@ -109,7 +110,6 @@ For a more custom installation, follow these steps to build the SDK from source.
109110
**Which should I use?**
110111
- **Stable:** `pyrealsense2` — validated releases aligned with SDK tags (Recommended for most users).
111112
- **Beta:** `pyrealsense2-beta` — fresher builds for early access and testing. Expect faster updates.
112-
> Note: until we provide a beta `apt install`, using the latest beta may require **cloning the development branch and compiling from source**.
113113

114114
### Install
115115
```bash
@@ -121,8 +121,9 @@ pip install pyrealsense2-beta # Beta
121121
## Ready to Hack!
122122

123123
Our library offers a high level API for using RealSense depth cameras (in addition to lower level ones).
124-
The following C++ snippet shows how to start streaming frames and extracting the depth value of a pixel:
124+
The following snippets show how to start streaming frames and extracting the depth value of a pixel:
125125

126+
**C++**
126127
```cpp
127128
#include <librealsense2/rs.hpp>
128129
#include <iostream>
@@ -143,6 +144,28 @@ int main() {
143144
}
144145
```
145146
147+
**Python**
148+
```python
149+
import pyrealsense2 as rs
150+
151+
pipeline = rs.pipeline() # Create a pipeline
152+
pipeline.start() # Start streaming
153+
154+
try:
155+
while True:
156+
frames = pipeline.wait_for_frames()
157+
depth_frame = frames.get_depth_frame()
158+
if not depth_frame:
159+
continue
160+
161+
width, height = depth_frame.get_width(), depth_frame.get_height()
162+
dist = depth_frame.get_distance(width // 2, height // 2)
163+
print(f"The camera is facing an object {dist:.3f} meters away", end="\r")
164+
165+
finally:
166+
pipeline.stop() # Stop streaming
167+
```
168+
146169
For more information on the library, please follow our [examples](./examples) or [tools](./tools/), and read the [documentation](./doc) to learn more.
147170
148171
## Supported Platforms
@@ -159,7 +182,7 @@ For more information on the library, please follow our [examples](./examples) or
159182
160183
| C++ | C | C# | Python | ROS 2 |Rest API |
161184
|-----|---|----|--------|-------|---------|
162-
| <div align="center"><a href="https://dev.realsenseai.com/docs/code-samples"><img src="https://librealsense.intel.com/readme-media/cpp.png" width="50%" alt="" /></a></div> | <div align="center"><a href="https://dev.realsenseai.com/docs/code-samples"><img src="https://librealsense.intel.com/readme-media/c.png" width="60%" alt="" /></a></div> | <div align="center"><a href="https://dev.realsenseai.com/docs/csharp-wrapper"><img src="https://librealsense.intel.com/readme-media/c-sharp.png" width="50%" alt="" /></a></div> | <div align="center"><a href="https://dev.realsenseai.com/docs/python2"><img src="https://librealsense.intel.com/readme-media/python.png" width="30%" alt="" /></a></div> | <div align="center"><a href="https://dev.realsenseai.com/docs/ros2-wrapper"><picture><source media="(prefers-color-scheme: dark)" srcset="https://librealsense.intel.com/readme-media/ros2-dark.png"><img src="https://librealsense.intel.com/readme-media/ROS2-light.png" width="80%" alt="ROS 2" /></picture></a></div> | <div align="center"><a href="https://github.com/IntelRealSense/librealsense/blob/development/wrappers/rest-api/README.md"><img src="https://librealsense.intel.com/readme-media/REST_API.png" width="50%" alt="Rest API" /></a></div>|
185+
| <div align="center"><a href="https://dev.realsenseai.com/docs/code-samples"><img src="https://librealsense.intel.com/readme-media/cpp.png" width="50%" alt="" /></a></div> | <div align="center"><a href="https://dev.realsenseai.com/docs/code-samples"><img src="https://librealsense.intel.com/readme-media/c.png" width="55%" alt="" /></a></div> | <div align="center"><a href="https://dev.realsenseai.com/docs/csharp-wrapper"><img src="https://librealsense.intel.com/readme-media/c-sharp.png" width="50%" alt="" /></a></div> | <div align="center"><a href="https://dev.realsenseai.com/docs/python2"><img src="https://librealsense.intel.com/readme-media/python.png" width="30%" alt="" /></a></div> | <div align="center"><a href="https://dev.realsenseai.com/docs/ros2-wrapper"><picture><source media="(prefers-color-scheme: dark)" srcset="https://librealsense.intel.com/readme-media/ros2-dark.png"><img src="https://librealsense.intel.com/readme-media/ROS2-light.png" width="80%" alt="ROS 2" /></picture></a></div> | <div align="center"><a href="https://github.com/IntelRealSense/librealsense/blob/development/wrappers/rest-api/README.md"><img src="https://librealsense.intel.com/readme-media/REST_API.png" width="50%" alt="Rest API" /></a></div>|
163186
164187
For more platforms and wrappers look over [here](https://dev.realsenseai.com/docs/docs-get-started).
165188
> Full feature support varies by platform – refer to the [release notes](https://github.com/IntelRealSense/librealsense/wiki/Release-Notes) for details.

0 commit comments

Comments
 (0)