Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8818083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:00:45+00:00 2026-06-14T05:00:45+00:00

I have been using the Kinect SDK (1.6) DepthBasicsD2D C++ example to take the

  • 0

I have been using the Kinect SDK (1.6) DepthBasicsD2D C++ example to take the depth frame from kinect and want to perform blob detection in OpenCV with the data.

I have configured OpenCV with the example and also understood the basic working of the example.

But somehow there’s no help anywhere and its difficult to figure out how to take the pixel data from Kinect and pass to OpenCV’s IplImage/cv::Mat structure.

Any thought on this problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T05:00:46+00:00Added an answer on June 14, 2026 at 5:00 am

    This could help you convert kinect color and depth images and depth images to OpenCV representations:

    // get a CV_8U matrix from a Kinect depth frame 
    cv::Mat * GetDepthImage(USHORT * depthData, int width, int height) 
    {
        const int imageSize = width * height; 
        cv::Mat * out = new cv::Mat(height, width, CV_8U) ;
        // map the values to the depth range
        for (int i = 0; i < imageSize; i++)
        {
            // get the lower 8 bits
            USHORT depth =  depthData[i];   
            if (depth >= kLower && depth <= kUpper) 
            {
                float y = c * (depth - kLower); 
                out->at<byte>(i) = (byte) y; 
            }
            else
            {
                out->at<byte>(i) = 0; 
            }
        }
        return out; 
    };
    
    // get a CV_8UC4 (RGB) Matrix from Kinect RGB frame
    cv::Mat * GetColorImage(unsigned char * bytes, int width, int height)
    {
        const unsigned int img_size = width * height * 4; 
        cv::Mat * out = new cv::Mat(height, width, CV_8UC4);
    
        // copy data
        memcpy(out->data, bytes, img_size); 
    
        return out; 
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been using CI just fine using the MySQL driver. I want to
Have been using a simple CSS only tooltip. Working Example css: .tip { position:relative;
I have been using the examples from this site ( http://dojotoolkit.org/documentation/tutorials/1.6/datagrid/ ) to render
I have been using ASIHTTPRequest to fetch the data and i want to cancel
I have been using WPF for a new project which is far from done.
I have been using TabActivity and I want the tab to display on every
I have been using struts-errors to pass messages from dispatch action class to view
Lately I have been working on trying facial recognition with the Kinect, using the
I have been programming against Kinect, and I now want to have games react
I have been using TortoiseSVN for some time and I really like it. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.