Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

temporal effect on depth result in ghosty image

Hi, I'm trying to do temporarl removal on depth image, and I'm getting a ghosty image as shown in the video below https://www.youtube.com/watch?v=5HBlpuihzks&feature=youtu.be

and here is the code:

   while (key != 'q') {

        if (zed.grab(runtime_parameters) == ERROR_CODE::SUCCESS) {

            zed.retrieveImage(depth_image_zed_display, VIEW::DEPTH, MEM::CPU, new_image_size);

            zed.retrieveMeasure(depth_image_zed, MEASURE::DEPTH, MEM::CPU, new_image_size);
            cv::Mat dst;
            //cv::boxFilter(depth_image_ocv_display, dst, -1, cv::Size(1, 1));

            cv::Mat result;
            double factor = 0.5;
            cv::addWeighted(depth_image_ocv, 1.0 - factor, last_image, factor, 0.0, result);
            last_image = result;


            cv::imshow("dep", depth_image_ocv_display);


            cv::Mat ucharMat, ucharMatScaled;
            result.convertTo(result, CV_8UC1);
            // scale values from 0..1 to 0..255
            result.convertTo(ucharMatScaled, CV_8UC1, 255, 0);
            cv::imshow("filtered_ dep", ucharMatScaled);


            // Handle key event
            key = cv::waitKey(10);
        }
    }

temporal effect on depth result in ghosty image

Hi, I'm trying to do temporarl removal on depth image, and I'm getting a ghosty image as shown in the video below https://www.youtube.com/watch?v=5HBlpuihzks&feature=youtu.behttps://www.youtube.com/watch?v=5HBlpuihzks

and here is the code:

   while (key != 'q') {

        if (zed.grab(runtime_parameters) == ERROR_CODE::SUCCESS) {

            zed.retrieveImage(depth_image_zed_display, VIEW::DEPTH, MEM::CPU, new_image_size);

            zed.retrieveMeasure(depth_image_zed, MEASURE::DEPTH, MEM::CPU, new_image_size);
            cv::Mat dst;
            //cv::boxFilter(depth_image_ocv_display, dst, -1, cv::Size(1, 1));

            cv::Mat result;
            double factor = 0.5;
            cv::addWeighted(depth_image_ocv, 1.0 - factor, last_image, factor, 0.0, result);
            last_image = result;


            cv::imshow("dep", depth_image_ocv_display);


            cv::Mat ucharMat, ucharMatScaled;
            result.convertTo(result, CV_8UC1);
            // scale values from 0..1 to 0..255
            result.convertTo(ucharMatScaled, CV_8UC1, 255, 0);
            cv::imshow("filtered_ dep", ucharMatScaled);


            // Handle key event
            key = cv::waitKey(10);
        }
    }

temporal effect on depth result in ghosty image

Hi, I'm trying to do temporarl removal on depth image, and I'm getting a ghosty image as shown in the video below https://www.youtube.com/watch?v=5HBlpuihzks

image description and here is the code:

   while (key != 'q') {

        if (zed.grab(runtime_parameters) == ERROR_CODE::SUCCESS) {

            zed.retrieveImage(depth_image_zed_display, VIEW::DEPTH, MEM::CPU, new_image_size);

            zed.retrieveMeasure(depth_image_zed, MEASURE::DEPTH, MEM::CPU, new_image_size);
            cv::Mat dst;
            //cv::boxFilter(depth_image_ocv_display, dst, -1, cv::Size(1, 1));

            cv::Mat result;
            double factor = 0.5;
            cv::addWeighted(depth_image_ocv, 1.0 - factor, last_image, factor, 0.0, result);
            last_image = result;


            cv::imshow("dep", depth_image_ocv_display);


            cv::Mat ucharMat, ucharMatScaled;
            result.convertTo(result, CV_8UC1);
            // scale values from 0..1 to 0..255
            result.convertTo(ucharMatScaled, CV_8UC1, 255, 0);
            cv::imshow("filtered_ dep", ucharMatScaled);


            // Handle key event
            key = cv::waitKey(10);
        }
    }