We are thrilled to announce the release of DepthAI SDK 1.11.0, which brings a host of exciting new features and enhancements. In this blog post, we will highlight the main changes that have been introduced in this release!
Auto IR Mode
This new experimental feature in DepthAI SDK 1.11.0 automatically adjusts the power of the infrared (IR) projector and illumination based on the ambient lighting conditions. By dynamically adapting to the lighting environment, Auto IR Mode ensures optimal illumination for depth and spatial perception. This feature eliminates the need for manual adjustments, simplifying the setup process and making it easier for users to achieve accurate depth perception in varying lighting conditions.
The following example illustrates how to activate this feature (view on GitHub):
from depthai_sdk import OakCamera
with OakCamera() as oak:
left = oak.create_camera('left')
right = oak.create_camera('right')
stereo = oak.create_stereo(left=left, right=right)
# Automatically estimate IR brightness and adjust it continuously
stereo.set_auto_ir(auto_mode=True, continuous_mode=True)
oak.visualize([stereo.out.disparity, left])
oak.start(blocking=True)
Point Cloud Support
DepthAI SDK 1.11.0 introduces point cloud support, which is an exciting addition for generating immersive 3D visualizations. Point clouds provide a three-dimensional representation of the scene captured by the OAK device. By leveraging the depth information from the stereo cameras, you can now generate accurate and detailed 3D point cloud visualizations. This feature enables a more immersive and interactive experience, allowing you to explore the captured scene from different angles and perspectives.
Make sure to install Rerun SDK using the following command: pip install rerun-sdk
.
The following example shows how to visualize point cloud using Rerun (view on GitHub):
from depthai_sdk import OakCamera
from depthai_sdk.classes.packets import PointcloudPacket
import rerun as rr
import subprocess
import time
subprocess.Popen(["rerun", "--memory-limit", "200MB"])
time.sleep(1) # Wait til rerun spins up
rr.init("Rerun ", spawn=False)
rr.connect()
def callback(packet: PointcloudPacket):
colors = packet.color_frame.getCvFrame()[..., ::-1] # BGR to RGB
rr.log_image('Color Image', colors)
points = packet.points.reshape(-1, 3)
rr.log_points("Pointcloud", points, colors=colors.reshape(-1, 3))
with OakCamera() as oak:
pcl = oak.create_pointcloud()
oak.callback(pcl, callback=callback)
oak.start(blocking=True)
To view the complete list of changes, please visit GitHub release page. We value your feedback and encourage you to share your experiences, suggestions, and ideas with our community. Together, we can continue to improve and evolve DepthAI SDK library to meet the ever-growing demands!