Tutorial - Health Status
Tutorial - Health Status
This tutorial shows how to enable the camera’s image and sensor health checks and read the detailed health status returned by the SDK. It reports whether the current frame is corrupted, and flags low image quality, low lighting, low depth reliability and low motion-sensor reliability, so your application can detect and react to degraded camera conditions in real time.
Getting Started
- First, download the latest version of the ZED SDK.
- Download the Health Status sample code in C++.
Code Overview
Open the camera with the image validity check enabled
As in previous tutorials, we create, configure and open the ZED. Here, we also set enable_image_validity_check in InitParameters: a value of 1 enables the base health check, while higher values (2, 3) progressively enable image-quality and blur/quality verification at extra computational cost.
Detect corrupted frames
If the health check detects a corrupted frame, grab() returns the CORRUPTED_FRAME warning instead of SUCCESS (both are non-fatal — any error code lower than or equal to ERROR_CODE::SUCCESS still means a new image is available).
Read the detailed health status
Beyond the per-frame grab() result, Camera::getHealthStatus() returns a HealthStatus structure with independent indicators for image quality, lighting, depth and motion-sensor reliability.
low_image_quality and low_lighting are only evaluated when enable_image_validity_check is set to 2 or higher.

