none
To show the picture in D2D and OpenCV RRS feed

  • Question

  • Hello everybody,

    I am now trying to realize the gender recognition function with OpenCV, and coming to a new problem. I plan do this by the head image and I try to get the head from the RBG using KinectV2, whos SDK already provides the function 

    get_FaceBoundingBox();

    which tell me where the head is.

    And I would like to use the cv::Mat to store the head image information. But not until I use the two functions:

    1.imshow("Title",ColorImage);//OpenCV

    2.m_pRenderTarget->DrawBitmap(m_pBitmap);//D2D

    did I realize that the image first one seems to be both amplified and not complete compared with the second one. And this means the right 2D-Coordinate of the faceBox in D2D is wrong in OpenCV.

    The way I load the RBG into a cv::Mat is:

    Mat ColorImage(nHeight, nWidth, CV_8UC4, pBuffer);

    I am not sure whether it is right, especially the "CV_8UC4", which means the type.

    Anybody knows about the solution? Thanks a lot!

    Sunday, July 26, 2015 8:45 AM

All replies