Ask Your Question

Revision history [back]

If you don't use HighGui, then you need to grab the frame and display it yourself using the Windows APIs (e.g. Win32 or MFC).

If you don't use HighGui, then you need to grab the frame and display it yourself using the Windows APIs (e.g. Win32 or MFC).

This tutorial shows how to capture from a camera.

If CvvImage was a highgui class that was removed from OpenCV from ver. 2.2.
It has 2 methods relevant to drawing in a Win32/MFC application.

#if defined WIN32 || defined _WIN32
    /* draw part of image to the specified DC */
    virtual void  Show( HDC dc, int x, int y, int width, int height,
                        int from_x = 0, int from_y = 0 );
    /* draw the current image ROI to the specified rectangle of the destination DC */
    virtual void  DrawToHDC( HDC hDCDst, RECT* pDstRect );
#endif

Unfortunately, if you don't use HighGui, the HighGui windows, then after you need to grab the frame and frame you'll have to display it yourself using the Windows APIs (e.g. Win32 or MFC).MFC). Some relevant Win32/MFC functions to do this are ::SetDIBitsToDevice or ::StretchDIBits.

This tutorial shows You can refer to c:\OpenCV_install_folder\modules\highgui\src\window_w32.cpp to see how to capture from a camera.it's done there.

CvvImage was a highgui class that was removed from OpenCV from ver. 2.2.
It has had 2 methods relevant to drawing in a Win32/MFC application.

#if defined WIN32 || defined _WIN32
    /* draw part of image to the specified DC */
    virtual void  Show( HDC dc, int x, int y, int width, int height,
                        int from_x = 0, int from_y = 0 );
    /* draw the current image ROI to the specified rectangle of the destination DC */
    virtual void  DrawToHDC( HDC hDCDst, RECT* pDstRect );
#endif

Unfortunately, if you don't use the HighGui windows, then after you grab the frame you'll have to display it yourself using the Windows APIs (e.g. Win32 or MFC). Some relevant Win32/MFC functions to do this are ::SetDIBitsToDevice or ::StretchDIBits.

You can refer to c:\OpenCV_install_folder\modules\highgui\src\window_w32.cpp to see how it's done there.

CvvImage was a highgui class that was removed from OpenCV from ver. 2.2.
It had 2 methods relevant to drawing in a Win32/MFC application.

#if defined WIN32 || defined _WIN32
    /* draw part of image to the specified DC */
    virtual void  Show( HDC dc, int x, int y, int width, int height,
                        int from_x = 0, int from_y = 0 );
    /* draw the current image ROI to the specified rectangle of the destination DC */
    virtual void  DrawToHDC( HDC hDCDst, RECT* pDstRect );
#endif

Unfortunately, if you don't use the HighGui windows, then after you grab the frame you'll have to display it yourself using the Windows APIs (e.g. Win32 or MFC). Some MFC).
The
relevant Win32/MFC functions to do this are ::SetDIBitsToDevice or ::StretchDIBits.

You can refer to c:\OpenCV_install_folder\modules\highgui\src\window_w32.cpp to see how it's done there.