1 /*M///////////////////////////////////////////////////////////////////////////////////////
3 // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
5 // By downloading, copying, installing or using the software you agree to this license.
6 // If you do not agree to this license, do not download, install,
7 // copy or use the software.
10 // Intel License Agreement
11 // For Open Source Computer Vision Library
13 // Copyright (C) 2000, Intel Corporation, all rights reserved.
14 // Third party copyrights are property of their respective owners.
16 // Redistribution and use in source and binary forms, with or without modification,
17 // are permitted provided that the following conditions are met:
19 // * Redistribution's of source code must retain the above copyright notice,
20 // this list of conditions and the following disclaimer.
22 // * Redistribution's in binary form must reproduce the above copyright notice,
23 // this list of conditions and the following disclaimer in the documentation
24 // and/or other materials provided with the distribution.
26 // * The name of Intel Corporation may not be used to endorse or promote products
27 // derived from this software without specific prior written permission.
29 // This software is provided by the copyright holders and contributors "as is" and
30 // any express or implied warranties, including, but not limited to, the implied
31 // warranties of merchantability and fitness for a particular purpose are disclaimed.
32 // In no event shall the Intel Corporation or contributors be liable for any direct,
33 // indirect, incidental, special, exemplary, or consequential damages
34 // (including, but not limited to, procurement of substitute goods or services;
35 // loss of use, data, or profits; or business interruption) however caused
36 // and on any theory of liability, whether in contract, strict liability,
37 // or tort (including negligence or otherwise) arising in any way out of
38 // the use of this software, even if advised of the possibility of such damage.
58 void FillBitmapInfo( BITMAPINFO* bmi, int width, int height, int bpp, int origin );
62 #define HG_OK 0 /* Don't bet on it! */
63 #define HG_BADNAME -1 /* Bad window or file name */
64 #define HG_INITFAILED -2 /* Can't initialize HigHGUI. Possibly, can't find vlgrfmts.dll */
65 #define HG_WCFAILED -3 /* Can't create a window */
66 #define HG_NULLPTR -4 /* The null pointer where it should not appear */
67 #define HG_BADPARAM -5
69 #define CV_WINDOW_MAGIC_VAL 0x00420042
70 #define CV_TRACKBAR_MAGIC_VAL 0x00420043
72 /***************************** CvCapture structure ******************************/
74 #define CV_CAPTURE_BASE_API_COUNT 6
76 typedef void (CV_CDECL* CvCaptureCloseFunc) ( CvCapture* capture );
77 typedef int (CV_CDECL* CvCaptureGrabFrameFunc) ( CvCapture* capture );
78 typedef IplImage * (CV_CDECL* CvCaptureRetrieveFrameFunc) ( CvCapture* capture );
79 typedef double (CV_CDECL* CvCaptureGetPropertyFunc) ( CvCapture* capture, int id );
80 typedef int (CV_CDECL* CvCaptureSetPropertyFunc) ( CvCapture* capture,
81 int id, double value );
82 typedef const char * (CV_CDECL* CvCaptureGetDescriptionFunc)( CvCapture* capture );
84 typedef struct CvCaptureVTable
87 CvCaptureCloseFunc close;
88 CvCaptureGrabFrameFunc grab_frame;
89 CvCaptureRetrieveFrameFunc retrieve_frame;
90 CvCaptureGetPropertyFunc get_property;
91 CvCaptureSetPropertyFunc set_property;
92 CvCaptureGetDescriptionFunc get_description;
96 typedef struct CvCapture
98 CvCaptureVTable* vtable;
104 typedef CvCapture* (CV_CDECL * CvCaptureFromFile)( const char* filename );
106 typedef CvVideoWriter* (CV_CDECL * CvCreateVideoWriter)( const char * filename,
107 int fourcc, double fps, CvSize frameSize, int is_color );
109 typedef int (CV_CDECL * CvWriteFrame)( CvVideoWriter * writer, const IplImage * image );
111 typedef void (CV_CDECL * CvReleaseVideoWriter)( CvVideoWriter ** writer );
118 /* uncomment to enable OpenEXR codec (will not compile under MSVC6) */
119 //#define HAVE_ILMIMF 1
121 /* uncomment to enable CMUCamera1394 fireware camera module */
122 //#define HAVE_CMU1394 1
126 #if defined (HAVE_CAMV4L) || defined (HAVE_CAMV4L2)
127 CvCapture * cvCaptureFromCAM_V4L( int index );
131 CvCapture * cvCaptureFromCAM_DC1394( int index );
135 CvCapture* cvCaptureFromCAM_MIL( int index );
139 CvCapture * cvCaptureFromCAM_CMU( int index );
143 CV_IMPL CvCapture * cvCaptureFromCAM_TYZX( int index );
147 CvCapture* cvCaptureFromFile_Win32( const char* filename );
149 CvCapture* cvCaptureFromCAM_VFW( int index );
150 CvCapture* cvCaptureFromFile_VFW( const char* filename );
152 CvVideoWriter* cvCreateVideoWriter_VFW( const char* filename, int fourcc,
153 double fps, CvSize frameSize, int is_color );
154 int cvWriteFrame_VFW( CvVideoWriter* _writer, const IplImage* image );
155 void cvReleaseVideoWriter_VFW( CvVideoWriter** writer );
160 CvCapture* cvCaptureFromFile_XINE (const char* filename);
164 CvCapture* cvCaptureFromFile_FFMPEG (const char* filename);
167 #ifdef HAVE_QUICKTIME
168 CvCapture * cvCaptureFromFile_QT (const char * filename);
169 CvCapture * cvCaptureFromCAM_QT (const int index);
172 #endif /* __HIGHGUI_H_ */