Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

i think, you want this:

    void *pMemVoid; //pointer to where the image is stored
    is_GetImageMem (hCam, &pMemVoid);

    cv::Mat image(height, width, CV_8UC3, (uchar*)pMemVoid);
    cv::imshow("lalala", image);

please avoid using IplImage* , or , anything from opencv's arcane c-api.

instead, stick to using cv::Mat consistently.

(wherever you found that code, it's horribly outdated)

i think, you want this:this instead:

    void *pMemVoid; //pointer to where the image is stored
    is_GetImageMem (hCam, &pMemVoid);

    cv::Mat image(height, width, CV_8UC3, (uchar*)pMemVoid);
    cv::imshow("lalala", image);

please avoid using IplImage* , or , anything from opencv's arcane c-api.

instead, stick to using cv::Mat consistently.

(wherever you found that code, it's horribly outdated)

i think, you want this instead:

    void *pMemVoid; //pointer to where the image is stored
    is_GetImageMem (hCam, &pMemVoid);

    cv::Mat image(height, width, CV_8UC3, (uchar*)pMemVoid);
    cv::imshow("lalala", image);

also, since you mention opencv3.0, please:

#include <opencv2/opencv.hpp>