Home » Source Code » Face recognition » highgui.h

highgui.h ( File view )

Description: 1  Pro...
  • By 辞海之鱼 2012-11-02
  • View(s):55
  • Download(s):1
  • Point(s): 1
			/*M///////////////////////////////////////////////////////////////////////////////////////
//
//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
//  By downloading, copying, installing or using the software you agree to this license.
//  If you do not agree to this license, do not download, install,
//  copy or use the software.
//
//
//                        Intel License Agreement
//                For Open Source Computer Vision Library
//
// Copyright (C) 2000, Intel Corporation, all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
//   * Redistribution's of source code must retain the above copyright notice,
//     this list of conditions and the following disclaimer.
//
//   * Redistribution's in binary form must reproduce the above copyright notice,
//     this list of conditions and the following disclaimer in the documentation
//     and/or other materials provided with the distribution.
//
//   * The name of Intel Corporation may not be used to endorse or promote products
//     derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Intel Corporation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/

#ifndef _HIGH_GUI_
#define _HIGH_GUI_

#ifndef SKIP_INCLUDES

  #include "cxcore.h"
  #if defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64
    #include <windows.h>
  #endif

#else // SKIP_INCLUDES

  #if defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64
    #define CV_CDECL __cdecl
    #define CV_STDCALL __stdcall
  #else
    #define CV_CDECL
    #define CV_STDCALL
  #endif

  #ifndef CV_EXTERN_C
    #ifdef __cplusplus
      #define CV_EXTERN_C extern "C"
      #define CV_DEFAULT(val) = val
    #else
      #define CV_EXTERN_C
      #define CV_DEFAULT(val)
    #endif
  #endif

  #ifndef CV_EXTERN_C_FUNCPTR
    #ifdef __cplusplus
      #define CV_EXTERN_C_FUNCPTR(x) extern "C" {
 typedef x; 
}
    #else
      #define CV_EXTERN_C_FUNCPTR(x) typedef x
    #endif
  #endif

  #ifndef CV_INLINE
    #if defined __cplusplus
      #define CV_INLINE inline
    #elif (defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64) && !defined __GNUC__
      #define CV_INLINE __inline
    #else
      #define CV_INLINE static
    #endif
  #endif /* CV_INLINE */

  #if (defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64) && defined CVAPI_EXPORTS
    #define CV_EXPORTS __declspec(dllexport)
  #else
    #define CV_EXPORTS
  #endif

  #ifndef CVAPI
    #define CVAPI(rettype) CV_EXTERN_C CV_EXPORTS rettype CV_CDECL
  #endif

#endif // SKIP_INCLUDES

#if defined(_CH_)
  #pragma package <chopencv>
  #include <chdl.h>
  LOAD_CHDL(highgui)
#endif

#ifdef __cplusplus
  extern "C" {

#endif /* __cplusplus */

/****************************************************************************************\
*                                  Basic GUI functions                                   *
\****************************************************************************************/

/* this function is used to set some external parameters in case of X Window */
CVAPI(int) cvInitSystem( int argc, char** argv );

CVAPI(int) cvStartWindowThread();

#define CV_WINDOW_AUTOSIZE  1
/* create window */
CVAPI(int) cvNamedWindow( const char* name, int flags CV_DEFAULT(CV_WINDOW_AUTOSIZE) );

/* display image within window (highgui windows remember their content) */
CVAPI(void) cvShowImage( const char* name, const CvArr* image );

/* resize/move window */
CVAPI(void) cvResizeWindow( const char* name, int width, int height );
CVAPI(void) cvMoveWindow( const char* name, int x, int y );


/* destroy window and all the trackers associated with it */
CVAPI(void) cvDestroyWindow( const char* name );

CVAPI(void) cvDestroyAllWindows(void);

/* get native window handle (HWND in case of Win32 and Widget in case of X Window) */
CVAPI(void*) cvGetWindowHandle( const char* name );

/* get name of highgui window given its native handle */
CVAPI(const char*) cvGetWindowName( void* window_handle );


typedef void (CV_CDECL *CvTrackbarCallback)(int pos);

/* create trackbar and display it on top of given window, set callback */
CVAPI(int) cvCreateTrackbar( const char* trackbar_name, const char* window_name,
                             int* value, int count, CvTrackbarCallback on_change);

typedef void (CV_CDECL *CvTrackbarCallback2)(int pos, void* userdata);

CVAPI(int) cvCreateTrackbar2( const char* trackbar_name, const char* window_name,
                              int* value, int count, CvTrackbarCallback2 on_change,
                              void* userdata CV_DEFAULT(0));

/* retrieve or set trackbar position */
CVAPI(int) cvGetTrackbarPos( const char* trackbar_name, const char* window_name );
CVAPI(void) cvSetTrackbarPos( const char* trackbar_name, const char* window_name, int pos );

#define CV_EVENT_MOUSEMOVE      0
#define CV_EVENT_LBUTTONDOWN    1
#define CV_EVENT_RBUTTONDOWN    2
#define CV_EVENT_MBUTTONDOWN    3
#define CV_EVENT_LBUTTONUP      4
#define CV_EVENT_RBUTTONUP      5
#define CV_EVENT_MBUTTONUP      6
#define CV_EVENT_LBUTTONDBLCLK  7
#define CV_EVENT_RBUTTONDBLCLK  8
#define CV_EVENT_MBUTTONDBLCLK  9

#define CV_EVENT_FLAG_LBUTTON   1
#define CV_EVENT_FLAG_RBUTTON   2
#define CV_EVENT_FLAG_MBUTTON   4
#define CV_EVENT_FLAG_CTRLKEY   8
#define CV_EVENT_FLAG_SHIFTKEY  16
#define CV_EVENT_FLAG_ALTKEY    32

typedef void (CV_CDECL *CvMouseCallback )(int event, int x, int y, int flags, void* param);

/* assign callback for mouse events */
CVAPI(void) cvSetMouseCallback( const char* window_name, CvMouseCallback on_mouse,
                                void* param CV_DEFAULT(NULL));

/* 8bit, color or not */
#define CV_LOAD_IMAGE_UNCHANGED  -1
/* 8bit, gray */
#define CV_LOAD_IMAGE_GRAYSCALE   0
/* ?, color */
#define CV_LOAD_IMAGE_COLOR       1
/* any depth, ? */
#define CV_LOAD_IMAGE_ANYDEPTH    2
/* ?, any color */
#define CV_LOAD_IMAGE_ANYCOLOR    4

/* load image from file
  iscolor can be a combination of above flags where CV_LOAD_IMAGE_UNCHANGED
  overrides the other flags
  using CV_LOAD_IMAGE_ANYCOLOR alone is equivalent to CV_LOAD_IMAGE_UNCHANGED
  unless CV_LOAD_IMAGE_ANYDEPTH is specified images are converted to 8bit
*/
CVAPI(IplImage*) cvLoadImage( const char* filename, int iscolor CV_DEFAULT(CV_LOAD_IMAGE_COLOR));
CVAPI(CvMat*) cvLoadImageM( const char* filename, int iscolor CV_DEFAULT(CV_LOAD_IMAGE_COLOR));

#define CV_IMWRITE_JPEG_QUALITY 1
#define CV_IMWRITE_PNG_COMPRESSION 16
#define CV_IMWRITE_PXM_BINARY 32

/* save image to file */
CVAPI(int) cvSaveImage( const char* filename, const CvArr* image,
                        const int* params CV_DEFAULT(0) );

/* decode image stored in the buffer */
CVAPI(IplImage*) cvDecodeImage( const CvMat* buf, int iscolor CV_DEFAULT(CV_LOAD_IMAGE_COLOR));
CVAPI(CvMat*) cvDecodeImageM( const CvMat* buf, int iscolor CV_DEFAULT(CV_LOAD_IMAGE_COLOR));

/* encode image and store the result as a byte vector (single-row 8uC1 matrix) */
CVAPI(CvMat*) cvEncodeImage( const char* ext, const CvArr* image,
                             const int* params CV_DEFAULT(0) );

#define CV_CVTIMG_FLIP      1
#define CV_CVTIMG_SWAP_RB   2
/* utility function: convert one image to another with optional vertical flip */
CVAPI(void) cvConvertImage( const CvArr* src, CvArr* dst, int flags CV_DEFAULT(0));

/* wait for key event infinitely (delay<=0) or for "delay" milliseconds */
CVAPI(int) cvWaitKey(int delay CV_DEFAULT(0));


/****************************************************************************************\
*                         Working with Video Files and Cameras                           *
\****************************************************************************************/

/* "black box" capture structure */
typedef struct CvCapture CvCapture;

/* start capturing frames from video file */
CVAPI(CvCapture*) cvCreateFileCapture( const char* filename );

#define CV_CAP_ANY      0     // autodetect

#define CV_CAP_MIL      100   // MIL proprietary drivers

#define CV_CAP_VFW      200   // platform native
#define CV_CAP_V4L      200
#define CV_CAP_V4L2     200

#define CV_CAP_FIREWARE 300   // IEEE 1394 drivers
#define CV_CAP_FIREWIRE 300
#define CV_CAP_IEEE1394 300
#define CV_CAP_DC1394   300
#define CV_CAP_CMU1394  300

#define CV_CAP_STEREO   400   // TYZX proprietary drivers
#define CV_CAP_TYZX     400
#define CV_TYZX_LEFT    400
#define CV_TYZX_RIGHT   401
#define CV_TYZX_COLOR   402
#define CV_TYZX_Z       403

#define CV_CAP_QT       500   // QuickTime

#define CV_CAP_UNICAP   600   // Unicap drivers

#define CV_CAP_DSHOW    700   // DirectShow (via videoInput)

/* start capturing frames from camera: index = camera_index + domain_offset (CV_CAP_*) */
CVAPI(CvCapture*) cvCreateCameraCapture( int index );

/* grab a frame, return 1 on success, 0 on fail.
  this function is thought to be fast               */
CVAPI(int) cvGrabFrame( CvCapture* capture );

/* get the frame grabbed with cvGrabFrame(..)
  This function may apply some frame processing like
  frame decompression, flipping etc.
  !!!DO NOT RELEASE or MODIFY the retrieved frame!!! */
CVAPI(IplImage*) cvRetrieveFrame( CvCapture* capture, int streamIdx CV_DEFAULT(0) );

/* Just a combination of cvGrabFrame and cvRetrieveFrame
   !!!DO NOT RELEASE or MODIFY the retrieved fra
...
...
(Not finished, please download and read the complete file)
			
...
Expand> <Close

Want complete source code? Download it here

Point(s): 1

Download
0 lines left, continue to read
Sponsored links

File list

Tips: You can preview the content of files by clicking file names^_^
Name Size Date
algotest.cpp765.00 B01-09-10 23:47
algotest.h384.00 B01-09-10 22:27
algotest.vcproj3.76 kB19-08-10 23:28
algotest.vcproj.YANKE-COMPUTER.Admin.user1.39 kB02-09-10 13:12
feret.cpp2.95 kB01-09-10 22:56
feret_dupI_list.txt28.49 kB20-08-10 20:24
feret_fa_list.txt47.38 kB20-08-10 20:20
feret_fb_list.txt47.43 kB20-08-10 20:21
feret_fc_list.txt7.85 kB20-08-10 20:23
feret_train_list.txt39.40 kB20-08-10 20:14
histModel.bmp6.37 kB22-06-10 17:55
mask.bmp20.39 kB16-05-10 19:26
orl.cpp1.53 kB01-09-10 22:56
cvNotes.txt3.50 kB25-06-10 23:13
asmlibrary.dll56.00 kB13-12-09 14:49
dggev.dll117.50 kB25-08-10 14:24
ASM.tif900.83 kB10-05-10 22:51
asmfitting.h3.51 kB04-12-09 18:27
asmlibrary.h24.76 kB28-07-10 21:50
asmlibrary.lib44.72 kB13-12-09 14:49
FaceAlign.h605.00 B01-09-10 22:57
FaceAlign.rc2.27 kB09-08-10 16:52
FaceAlign.vcproj4.06 kB16-08-10 13:50
FaceAlign.vcproj.YANKE-COMPUTER.Admin.user1.38 kB02-09-10 13:12
FaceAlign_ASM.cpp3.30 kB20-08-10 17:21
FaceAlign_ASM.h1.88 kB24-08-10 12:11
FaceAlign_coord.cpp1.40 kB20-08-10 22:16
FaceAlign_coord.h630.00 B24-08-10 12:15
FaceAlign_Haar.cpp2.65 kB14-08-10 15:37
FaceAlign_Haar.h1.16 kB24-08-10 12:14
resource.h388.00 B08-08-10 20:11
FaceFeature.h412.00 B17-08-10 23:53
FaceFeature.vcproj3.96 kB16-08-10 12:08
FaceFeature.vcproj.YANKE-COMPUTER.Admin.user1.38 kB02-09-10 13:12
FaceFeature_Gabor.cpp6.30 kB15-08-10 14:04
FaceFeature_Gabor.h2.20 kB20-08-10 17:30
FaceFeature_GaborF.cpp6.22 kB01-09-10 23:30
FaceFeature_GaborF.h934.00 B20-08-10 17:30
FaceFeature_pixel.cpp452.00 B15-08-10 13:27
FaceFeature_pixel.h421.00 B20-08-10 17:30
FaceMngr.h886.00 B01-09-10 22:57
FaceMngr.vcproj3.80 kB17-08-10 23:37
FaceMngr.vcproj.YANKE-COMPUTER.Admin.user1.38 kB02-09-10 13:12
FaceMngr_complete.cpp9.99 kB02-09-10 13:00
FaceMngr_complete.h4.40 kB24-08-10 11:50
FaceMngr_fast.cpp6.40 kB02-09-10 12:58
FaceMngr_fast.h3.47 kB01-09-10 22:52
FaceMngr_fast_fast.cpp1.66 kB17-08-10 22:54
FaceMngr_fast_fast.h1.29 kB17-08-10 22:53
orl_func.cpp1.88 kB17-08-10 22:56
config.ini86.00 B14-08-10 15:42
frsetup.vdproj57.66 kB14-08-10 16:08
AdvDlg.cpp871.00 B08-08-10 13:56
AdvDlg.h414.00 B09-08-10 18:11
AsmModel.amf824.28 kB30-11-09 10:08
config.ini171.00 B14-08-10 15:42
dlgStuff.cpp3.27 kB09-08-10 18:11
EnrollDlg.cpp9.37 kB14-08-10 17:26
EnrollDlg.h1.23 kB09-08-10 18:11
frtest.cpp1.26 kB17-05-10 11:07
frtest.h436.00 B09-08-10 18:11
frtest.rc9.06 kB10-07-10 17:16
frtest.vcproj6.15 kB14-08-10 15:38
frtest.vcproj.YANKE-COMPUTER.Admin.user1.39 kB02-09-10 13:12
frtestDlg.cpp6.56 kB01-09-10 23:32
frtestDlg.h1.30 kB09-08-10 18:11
haarcascade_frontalface_alt.xml898.31 kB27-09-09 05:48
histModel.bmp6.37 kB22-06-10 17:55
mask.bmp20.39 kB16-05-10 19:26
noface.bmp57.47 kB26-05-10 10:57
noimage.bmp57.47 kB27-05-10 14:03
outline.txt852.00 B14-08-10 15:37
ProjDefs.h293.00 B08-08-10 13:32
RecogDlg.cpp7.47 kB12-08-10 22:50
RecogDlg.h1.14 kB12-08-10 21:43
frtest.ico66.19 kB28-11-07 16:21
frtest.rc2362.00 B08-05-10 21:51
Resource.h2.37 kB30-06-10 16:38
result.bmp57.47 kB26-05-10 10:56
stdafx.cpp353.00 B25-05-10 09:57
stdafx.h882.00 B22-06-10 19:55
targetver.h1.01 kB01-07-10 14:40
TrainDlg.cpp1.86 kB08-08-10 13:32
TrainDlg.h533.00 B09-08-10 18:11
WebCam.cpp2.77 kB08-08-10 13:32
WebCam.h1.14 kB08-08-10 13:29
WndUtils.cpp2.49 kB14-08-10 17:19
WndUtils.h932.00 B14-08-10 17:19
frtest.sln6.00 kB01-09-10 23:43
frtest.suo199.50 kB02-09-10 13:12
LightPrep.cpp5.07 kB15-08-10 14:53
LightPrep.h1.15 kB20-08-10 19:39
LightPrep.vcproj3.59 kB14-08-10 15:38
LightPrep.vcproj.YANKE-COMPUTER.Admin.user1.38 kB02-09-10 13:12
cv.h69.64 kB27-09-09 05:48
cv.hpp42.87 kB28-09-09 07:34
cv200.lib454.84 kB22-06-10 16:45
cv200d.lib457.17 kB22-06-10 16:35
cvcompat.h39.73 kB22-06-10 16:59
cvtypes.h12.21 kB27-09-09 05:48
cvver.h2.48 kB01-10-09 00:08
cxcore.h85.45 kB27-09-09 05:48
cxcore.hpp79.70 kB22-06-10 16:34
cxcore200.lib406.90 kB22-06-10 16:43
cxcore200d.lib408.23 kB22-06-10 16:34
cxerror.h8.60 kB22-06-10 16:25
cxflann.h6.77 kB27-09-09 05:48
cxmat.hpp148.29 kB01-10-09 00:56
cxmisc.h27.40 kB27-09-09 05:48
cxoperations.hpp84.18 kB01-10-09 00:08
cxtypes.h51.87 kB01-10-09 01:32
frtest.suo99.00 kB28-07-10 16:51
highgui.h17.74 kB27-09-09 05:48
highgui.hpp4.51 kB27-09-09 05:48
highgui200.lib232.50 kB22-06-10 16:47
highgui200d.lib233.15 kB22-06-10 16:35
PublicHeaders.h518.00 B01-09-10 23:45
output.txt26.97 kB19-08-10 19:34
pnotes.txt4.22 kB12-08-10 22:16
readme.txt1.79 kB01-09-10 23:57
dggev.h2.02 kB25-08-10 19:30
dggev.lib1.64 kB25-08-10 14:24
Subspace.cpp8.01 kB20-08-10 19:43
Subspace.h2.21 kB24-08-10 12:30
Subspace.vcproj3.65 kB14-08-10 15:38
Subspace.vcproj.YANKE-COMPUTER.Admin.user1.38 kB02-09-10 13:12
svn-commit.tmp42.00 B02-09-10 11:08
tnotes.txt1.27 kB30-08-10 18:51
CompDefs.h162.00 B14-08-10 12:45
cvTools.cpp5.17 kB17-08-10 10:08
FreqTools.cpp5.29 kB20-08-10 19:46
tools.def15.00 B28-07-10 21:30
tools.h3.97 kB20-08-10 19:46
tools.vcproj4.04 kB14-08-10 15:38
tools.vcproj.YANKE-COMPUTER.Admin.user1.38 kB02-09-10 13:12
程序文档.doc45.50 kB24-08-10 22:01
<res>0.00 B20-08-10 22:06
<algotest>0.00 B02-09-10 13:13
<exe>0.00 B02-09-10 13:14
<FaceAlign>0.00 B02-09-10 13:13
<FaceFeature>0.00 B02-09-10 13:13
<FaceMngr>0.00 B02-09-10 13:13
<frsetup>0.00 B20-08-10 22:06
<frtest>0.00 B02-09-10 13:13
<LightPrep>0.00 B02-09-10 13:13
<opencv>0.00 B01-09-10 23:45
<Subspace>0.00 B02-09-10 13:13
<tools>0.00 B02-09-10 13:13
<frtest_dlls>0.00 B01-08-12 22:35
...
Sponsored links

highgui.h (1.42 MB)

Need 1 point
Your Point(s)

Your Point isn't enough.

Get point immediately by PayPal

More(Debit card / Credit card / PayPal Credit / Online Banking)

Submit your source codes. Get more point

LOGIN

Don't have an account? Register now
Need any help?
Mail to: support@codeforge.com

切换到中文版?

CodeForge Chinese Version
CodeForge English Version

Where are you going?

^_^"Oops ...

Sorry!This guy is mysterious, its blog hasn't been opened, try another, please!
OK

Warm tip!

CodeForge to FavoriteFavorite by Ctrl+D