none
Using opencv with Kinect for azure RRS feed

  • Question

  • k4a_image_t depth_image = k4a_capture_get_depth_image(capture);

    color_frame=cv::Mat(k4a_image_get_height_pixels(color_image), k4a_image_get_width_pixels(color_image), CV_8UC3, k4a_image_get_buffer(color_image));

    cv::imshow("color", color_frame);

    The imshow here creates a 'segmentation fault' even though there are proper values in the matrix. I check this is not an opencv fault. Could someone please help to visualize color and depth data using opencv. 

    Friday, July 5, 2019 9:46 PM

Answers

  • First make sure you're requesting color frames in K4A_IMAGE_FORMAT_COLOR_BGRA32 format when you start the camera.
    Also make sure you're using a CV8U4 (instead of 3) OpenCV Mat as it's a 4bit per pixel buffer.

    Brekel

    Saturday, July 6, 2019 6:18 PM
    Moderator