OceanView
OceanView is a cutting-edge vision processing and mapping system built for real-time robotics applications. Developed from December 2024 to February 2025, this project integrates DepthAI hardware with a robust OpenCV processing pipeline to capture and analyze high-resolution color and depth data. The system detects obstacles such as algae and coral, calculates precise 3D positions for scoring, and manages map data using advanced spatial querying. Real-time data transmission is handled through custom UDP/TCP modules, while a Flask-based dashboard provides live video streaming and system status updates.

Key Code Snippet
The snippet below illustrates the core loop of the main controller that processes frames from DepthAI, performs image processing with OpenCV, and updates the web dashboard:
def main_loop(self):
try:
while True:
# Retrieve the latest frames from the DepthAI pipeline.
color_frame = self.depthai_pipeline.get_frame()
depth_frame = self.depthai_pipeline.get_depth_frame()
# If no frame is available, wait briefly before checking again.
if color_frame is None or depth_frame is None:
time.sleep(0.01)
continue
# Process the frame to detect algae and coral,
# and compute 3D positions using the OpenCV processor.
processed_frame, algae_positions, coral_positions = self.opencv_processor.process_frame(color_frame, depth_frame)
# Update the web dashboard with the processed frame.
self.flask_server_handler.update_frame(processed_frame)
# Additional operations (e.g., saving images or sending UDP data) can be performed here.
except KeyboardInterrupt:
print("Stopping System")
except Exception as e:
logging.error(f"An unexpected error occurred: {e}")
Relevant Links
Additional Information
Charger Robotics’s 2024 Competition code leveredged the best FIRST codebase practices and cutting edge software. Key features include:
- An integrated DepthAI pipeline for capturing undistorted color and depth frames at 1080p.
- A comprehensive OpenCV processing module that detects objects, extracts bounding boxes, and calculates 3D positions with subpixel accuracy.
- Map management and obstacle detection using YAML configurations, KDTree spatial queries, and custom block detection algorithms.
- Real-time data transmission via UDP/TCP and a Flask-powered status dashboard with live video streaming and system monitoring.
Future improvements may include refining the obstacle detection algorithms, integrating additional hardware interfaces, and expanding the dashboard features.