On DJI Matrice 210 (M210), the Onboard SDK has access to the live camera stream from both the fpv camera and the main camera (the one mounted on the gimbal). This is part of the Advanced Sensing feature. As a result, in addition to viewing the live video frame from the DJI Go App, developers can write powerful onboard applications that read the image frames from the cameras, process and analyze them and take actions (such as rotate the gimbal or move the drone) if necessary.
The camera stream data is transmitted through the USB connection between the M210 and the onboard computer, same as the stereo vision data. The RC must be turned on for the main camera stream to be transmitted, while the FPV camera stream is always available.
The Advanced Sensing library provides a set of simple APIs for developers to start, stop the camera streams, and check availability and obtain a copy of the latest image frame, for both the FPV camera and the main camera, listed as follows
bool startFPVCameraStream(CameraImageCallback cb = NULL, void * cbParam = NULL); |
Through the above APIs, developers have 2 ways to access the images
For details of the APIs, please refer to the API Ref and the samples.
Different cameras can be mounted on the gimbal of the M210. The Onboard SDK can get main camera stream from the Zenmuse X4S and Zenmuse X5S.
The resolution of images from the FPV camera stream is 608x448. The resolution of images from the main camera stream can be 1920x1080 (Video Mode, 1080p), 1440x1080 (Camera Mode, 1080p), 1280x720 (Video Mode, 720p), or 960x720 (Camera Mode, 720p), which can be set in DJI Go. The frame rates for both FPV camera stream and the main camera stream are 30 FPS.
Under the hood, the data transmitted from the M210 to the onboard computer is compressed video stream at 30 fps. The onboard SDK uses FFmpeg to decode the video stream and outputs each decoded image frame. As a result,