Zed Pics smearing when using the cpp API

Hey Iv’e noticed i’m getting a constant smear in the bottom of the picture:


Im using ZED mini and sdk 3.8 on l4t 35.1 here is a snippet of the code:

        ERROR_CODE returned_state = zed_.grab();
        if (returned_state == ERROR_CODE::SUCCESS) {
            sl::Mat image;
            sl::Mat image_right;
            std_msgs::msg::Header hdr;
            hdr.stamp = msg_time;
            zed_.retrieveImage(image, VIEW::LEFT);
            zed_.retrieveImage(image_right, VIEW::RIGHT);
            cv::Mat cvImageBGR = slMat2cvMat(image);
            cv::Mat cvImageRGB;
            cv::cvtColor(cvImageBGR, cvImageRGB, cv::COLOR_BGR2RGB);

            // cv::cvtColor(cvImageBGR, cvImageRGB, cv::COLOR_BGR2RGB);// TODO
            // cv::cvtColor(cvImageRGB, cvImageBGR, cv::COLOR_BGR2RGB);// TODO
            if (cvImageRGB.empty()) {
                // Matrix is empty
                RCLCPP_ERROR(this->get_logger(), "Left Image is empty!");
                return false;
            }
            sensor_msgs::msg::Image::SharedPtr msg = cv_bridge::CvImage(hdr, encoding_, cvImageRGB).toImageMsg();
            msg->header.frame_id = "left_camera";
            publisher_->publish(*msg.get());
            

Hi @eladpar,

Is this something you notice only using the C++ API, or can you reproduce this when opening the camera with tools such as ZED_Explorer or ZED_Depth_Viewer?

Additionally, could you send the file from ZED_Diagnostic to debug further?

Best,
Matthew

1 Like

Hey Thanks for the reply.
it seems to happen only in the Zed_Depth_Viewer and not in the Zed_Explorer:
pictures:


Zed_Diagnostic:

{
    "AI Models": {
        "info": [
            "MULTI CLASS DETECTION is not optimized",
            "MULTI CLASS MEDIUM DETECTION is not optimized",
            "MULTI CLASS ACCURATE DETECTION is not optimized",
            "HUMAN BODY FAST DETECTION is not optimized",
            "HUMAN BODY MEDIUM DETECTION is not optimized",
            "HUMAN BODY ACCURATE DETECTION is not optimized",
            "PERSON HEAD DETECTION is not optimized",
            "PERSON HEAD ACCURATE DETECTION is not optimized",
            "REID ASSOCIATION is not optimized",
            "NEURAL DEPTH is not optimized"
        ]
    },
    "Camera Test": {
        "InternalDevicesCount": 2,
        "ZEDCount": 1,
        "camera": {
            "Device ID": 0,
            "Firmware": 1523,
            "Init Output": "OK",
            "Model": "ZED Mini",
            "Serial Number": 14992692,
            "valid": [
                "<b>Camera: </b>ZED Mini",
                "<b>Firmware: </b>1523"
            ]
        },
        "resolutions": {
            "HD1080@15": {
                "fps (input)": 15,
                "fps (output)": 15,
                "height (input)": 1080,
                "height (output)": 1080,
                "initialization": "OK",
                "status": true,
                "width (input)": 1920,
                "width (output)": 1920
            },
            "HD1080@30": {
                "fps (input)": 30,
                "fps (output)": 30,
                "height (input)": 1080,
                "height (output)": 1080,
                "initialization": "OK",
                "status": true,
                "width (input)": 1920,
                "width (output)": 1920
            },
            "HD2K@15": {
                "fps (input)": 15,
                "fps (output)": 15,
                "height (input)": 1242,
                "height (output)": 1242,
                "initialization": "OK",
                "status": true,
                "width (input)": 2208,
                "width (output)": 2208
            },
            "HD720@15": {
                "fps (input)": 15,
                "fps (output)": 15,
                "height (input)": 720,
                "height (output)": 720,
                "initialization": "OK",
                "status": true,
                "width (input)": 1280,
                "width (output)": 1280
            },
            "HD720@30": {
                "fps (input)": 30,
                "fps (output)": 30,
                "height (input)": 720,
                "height (output)": 720,
                "initialization": "OK",
                "status": true,
                "width (input)": 1280,
                "width (output)": 1280
            },
            "HD720@60": {
                "dropCount": 2,
                "fps (input)": 60,
                "fps (output)": 60,
                "height (input)": 720,
                "height (output)": 720,
                "imageCount": 498,
                "initialization": "OK",
                "status": true,
                "tearingCount": 0,
                "width (input)": 1280,
                "width (output)": 1280
            },
            "VGA@100": {
                "fps (input)": 100,
                "fps (output)": 100,
                "height (input)": 376,
                "height (output)": 376,
                "initialization": "OK",
                "status": true,
                "width (input)": 672,
                "width (output)": 672
            },
            "VGA@15": {
                "fps (input)": 15,
                "fps (output)": 15,
                "height (input)": 376,
                "height (output)": 376,
                "initialization": "OK",
                "status": true,
                "width (input)": 672,
                "width (output)": 672
            },
            "VGA@30": {
                "fps (input)": 30,
                "fps (output)": 30,
                "height (input)": 376,
                "height (output)": 376,
                "initialization": "OK",
                "status": true,
                "width (input)": 672,
                "width (output)": 672
            },
            "VGA@60": {
                "fps (input)": 60,
                "fps (output)": 60,
                "height (input)": 376,
                "height (output)": 376,
                "initialization": "OK",
                "status": true,
                "width (input)": 672,
                "width (output)": 672
            }
        },
        "sensors": {
            "Firmware": 517,
            "Init Output": "OK",
            "Model": "ZED Mini (MCU)",
            "Serial Number": 14992692
        }
    },
    "Graphics Card": {
        "deviceCount": 1,
        "deviceDriverVersion": 11040,
        "devices": [
            {
                "arch": "Volta",
                "computeCapability": "7.2",
                "cores": 768,
                "name": "Xavier",
                "totalMemoryBytes": "7179411456",
                "totalMemoryMB": 6846.8203125
            }
        ],
        "initResult": 0,
        "valid": [
            "<b>Graphics card: </b> Xavier"
        ]
    },
    "Processor": {
        "OS": "Ubuntu 20.04.4 LTS ",
        "avxSupported": false,
        "coreCount": "6",
        "cpu": " ARMv8 Processor rev 0 (v8l)",
        "datetime": "2024-01-22 03:56:53 PM",
        "hyperThreading": "0",
        "motherboard": "NVIDIA Jetson Xavier NX - AVerMedia NX215, Unknown",
        "ramCapacity": "7.179411",
        "ramUsage": "",
        "ramUsed": "6.054519",
        "threadCount": "6",
        "valid": [
            "<b>Processor: </b>  ARMv8 Processor rev 0 (v8l)",
            "<b>Motherboard: </b> NVIDIA Jetson Xavier NX - AVerMedia NX215, Unknown"
        ]
    },
    "USB": {
        "CorruptedFirmware": false,
        "MCUDetected": true,
        "USBList": [
            {
                "USBMode": 3,
                "USB_path": "/3/4",
                "bDescriptorType": 1,
                "bDeviceProtocol": 1,
                "bLength": 18,
                "bMaxPacketSize0": 9,
                "bNumConfigurations": 1,
                "bcdDevice": "1.0",
                "bcdUSB": "3.0",
                "bcdUSBClass": 239,
                "bcdUSBSubClass": 2,
                "busNumber": 2,
                "device": "ZED mini",
                "iManufacturer": 1,
                "iProduct": 2,
                "iSerial": 0,
                "idProduct": "0xf682",
                "idVendor": "0x2b03"
            },
            {
                "USB_path": "/3/1",
                "idProduct": "0x1790",
                "idVendor": "0x0b95"
            },
            {
                "USB_path": "/3",
                "idProduct": "0x0411",
                "idVendor": "0x0bda"
            },
            {
                "USBMode": 2,
                "USB_path": "/2/4",
                "bDescriptorType": 1,
                "bDeviceProtocol": 0,
                "bLength": 18,
                "bMaxPacketSize0": 64,
                "bNumConfigurations": 1,
                "bcdDevice": "2.5",
                "bcdUSB": "2.0",
                "bcdUSBClass": 0,
                "bcdUSBSubClass": 0,
                "busNumber": 1,
                "device": "ZED mini MCU",
                "iManufacturer": 1,
                "iProduct": 2,
                "iSerial": 3,
                "idProduct": "0xf681",
                "idVendor": "0x2b03"
            },
            {
                "USB_path": "/2/3",
                "idProduct": "0xc534",
                "idVendor": "0x046d"
            },
            {
                "USB_path": "/2/2",
                "idProduct": "0x003d",
                "idVendor": "0x2341"
            },
            {
                "USB_path": "/2",
                "idProduct": "0x5411",
                "idVendor": "0x0bda"
            }
        ],
        "USBMode": 3,
        "ZED Camera Module Detected": 63106,
        "ZED MCU Module Detected": 63105,
        "ZEDDetected": true,
        "valid": [
            "<b>USB Bandwidth: </b> OK"
        ]
    },
    "ZED SDK": {
        "CUDA Toolkit version": "V11.4.239 -->located in /usr/local/cuda-11.4/bin/nvcc",
        "CUDA loading": false,
        "ZED SDK Version (Diag)": "3.8.1",
        "ZED SDK Version (RT)": "3.8.1",
        "ai": {
            "checkAI": true,
            "cudaVersion": 11040,
            "cudnnCudartVersion": 11040,
            "cudnnVersion": 8401,
            "cudnnVersionExpected": 8401,
            "tensorVersion": 8401
        },
        "binFiles": [
            "libsl_ai.so",
            "libsl_zed.so",
            "libsl_zed_static.a"
        ],
        "resourcesFiles": [
        ],
        "resourcesFilesExpected": [
            "objects_performance_2.2"
        ],
        "valid": [
            "<b>ZED SDK version:</b> 3.8.1",
            "<b>CUDA version:</b> V11.4.239"
        ]
    }
}

Hi @eladpar ,

Thank you for the information you’ve provided.

This was an issue fixed in version 4.0.3 of the ZED SDK. I would suggest upgrading to the SDK 4.0 if possible.