highgui.h ( File view )

  • By 2010-07-20
  • View(s):8
  • Download(s):0
  • Point(s): 1
//  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.

#ifndef _HIGH_GUI_
#define _HIGH_GUI_

#include "cv.h"
#ifdef WIN32
#include <windows.h>

#if defined(_CH_)
#include <cvch.h>

#ifdef __cplusplus
#define HIGHGUI_EXTERN_C extern "C"
extern "C" {

#endif /* __cplusplus */

#if defined HIGHGUI_EXPORTS && defined WIN32
    #define HIGHGUI_DLL_ENTRY __declspec(dllexport)


*                                Basic HighGUI functionality                             *

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

/* create window */
HIGHGUI_API int cvNamedWindow( const char* name, int flags );

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

/* resize/move window */
HIGHGUI_API void cvResizeWindow( const char* name, int width, int height );

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

HIGHGUI_API void cvDestroyAllWindows(void);

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

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

CV_EXTERN_C_FUNCPTR( void (*CvTrackbarCallback)(int pos) );

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

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

#define CV_EVENT_MOUSEMOVE      0
#define CV_EVENT_LBUTTONUP      4
#define CV_EVENT_RBUTTONUP      5
#define CV_EVENT_MBUTTONUP      6

#define CV_EVENT_FLAG_ALTKEY    32

CV_EXTERN_C_FUNCPTR( void (*CvMouseCallback )(int event, int x, int y, int flags) );
/* assign callback for mouse events */
HIGHGUI_API void cvSetMouseCallback( const char* window_name, CvMouseCallback on_mouse );

/*load image from file 
  iscolor: >0 - output image is always color,
            0 - output image is always grayscale,
           <0 - output image is color or grayscale dependending on the file */
HIGHGUI_API IplImage* cvLoadImage( const char* filename, int iscolor CV_DEFAULT(1));

/* save image to file */
HIGHGUI_API int cvSaveImage( const char* filename, const CvArr* image );

/* add folder to the image search path (used by cvLoadImage) */
HIGHGUI_API void cvAddSearchPath( const char* path );

/* utility function: convert one image to another with optional vertical flip */
HIGHGUI_API void cvConvertImage( const CvArr* src, CvArr* dst, int flip CV_DEFAULT(0));

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

*                             Working with AVIs and Cameras                              *

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

/* start capturing frames from AVI */
HIGHGUI_API CvCapture* cvCaptureFromAVI( const char* filename );

/* start capturing frames from camera */
HIGHGUI_API CvCapture* cvCaptureFromCAM( int index );

/*just grab frame, return 1 if success, 0 if fail 
  this function is thought to be fast               */  
HIGHGUI_API int cvGrabFrame( CvCapture* capture );

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

/* Just successive call of cvGrabFrame and cvRetrieveFrame
   !!!DO NOT RELEASE or MODIFY the retrieved frame!!!      */
HIGHGUI_API IplImage* cvQueryFrame( CvCapture* capture );

/* stop capturing/reading and free resources */
HIGHGUI_API void cvReleaseCapture( CvCapture** capture );

#define CV_CAP_PROP_POS_MSEC       0
#define CV_CAP_PROP_POS_FRAMES     1
#define CV_CAP_PROP_FPS            5
#define CV_CAP_PROP_FOURCC         6

/* retrieve or set capture properties */
HIGHGUI_API double cvGetCaptureProperty( CvCapture* capture, int property_id );
HIGHGUI_API int    cvSetCaptureProperty( CvCapture* capture, int property_id, double value );

/* "black box" AVI writer structure */
typedef struct CvAVIWriter CvAVIWriter;

#define CV_FOURCC(c1,c2,c3,c4)  \
    (((c1)&255) + (((c2)&255)<<8) + (((c3)&255)<<16) + (((c4)&255)<<24))

/* initialize AVI writer */
HIGHGUI_API CvAVIWriter* cvCreateAVIWriter( const char* filename, int fourcc,
                                            double fps, CvSize frameSize );

/* write frame to AVI */
HIGHGUI_API int cvWriteToAVI( CvAVIWriter* writer, const IplImage* image );

/* close AVI writer */
HIGHGUI_API void cvReleaseAVIWriter( CvAVIWriter** writer );

*                              Obsolete functions/synonyms                               *



#define cvvInitSystem cvInitSystem
#define cvvNamedWindow cvNamedWindow
#define cvvShowImage cvShowImage
#define cvvResizeWindow cvResizeWindow
#define cvvDestroyWindow cvDestroyWindow
#define cvvCreateTrackbar cvCreateTrackbar
#define cvvLoadImage(name) cvLoadImage((name),1)
#define cvvSaveImage cvSaveImage
#define cvvAddSearchPath cvAddSearchPath
#define cvvWaitKey(name) cvWaitKey(0)
#define cvvWaitKeyEx(name,delay) cvWaitKey(delay)
#define cvvConvertImage cvConvertImage

#ifdef WIN32

CV_EXTERN_C_FUNCPTR( int (CV_CDECL * CvWin32WindowCallback)
                     (HWND, UINT, WPARAM, LPARAM, int*));
HIGHGUI_API void set_preprocess_func( CvWin32WindowCallback on_preprocess );
HIGHGUI_API void set_postprocess_func( CvWin32WindowCallback on_postprocess );

CV_INLINE int iplWidth( const IplImage* img );
CV_INLINE int iplWidth( const IplImage* img )

    return !img ? 0 : !img->roi ? img->width : img->roi->width;


CV_INLINE int iplHeight( const IplImage* img );
CV_INLINE int iplHeight( const IplImage* img )

    return !img ? 0 : !img->roi ? img->height : img->roi->height;



#endif /* obsolete functions */

/* For use with Win32 */
#ifdef WIN32

CV_INLINE RECT NormalizeRect( RECT r );
CV_INLINE RECT NormalizeRect( RECT r )

    int t;

    if( r.left >
(Not finished, please download and read the complete file)
Expand> <Close

Want complete source code? Download it here

Point(s): 1

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
<HMMDemo>0.00 B20-08-04 14:48
untitled_baseCFG.txt272.00 B23-08-04 10:32
ContEHMM.h3.00 kB26-03-01 12:21
FaceBase.h7.99 kB05-11-01 22:08
HMMDemo.h3.78 kB26-03-01 12:21
HMMDemoDoc.h3.71 kB05-11-01 22:08
HMMDemoView.h4.22 kB05-11-01 22:08
HMMParams.h1.31 kB26-03-01 12:21
ImageBaseView.h4.49 kB05-11-01 22:08
InfoDialogs.h4.47 kB26-03-01 12:21
MainFrm.h5.33 kB05-11-01 22:08
MiscParams.h1.30 kB26-03-01 12:21
multiprocdiv.h24.71 kB02-11-01 22:45
resource.h3.16 kB26-03-01 12:21
SamplingParams.h1.43 kB26-03-01 12:21
StdAfx.h3.19 kB05-11-01 22:08
Threads.h735.00 B15-08-01 16:05
ContEHMM.cpp9.69 kB26-03-01 12:21
FaceBase.cpp49.22 kB18-11-02 19:32
HMMDemo.cpp18.88 kB05-11-01 22:08
HMMDemoDoc.cpp9.18 kB05-11-01 22:08
HMMDemoView.cpp6.56 kB26-11-02 16:45
HMMParams.cpp3.08 kB26-03-01 12:21
ImageBaseView.cpp10.66 kB05-11-01 22:08
InfoDialogs.cpp5.29 kB26-03-01 12:21
MainFrm.cpp17.08 kB05-11-01 22:08
MiscParams.cpp1.32 kB26-03-01 12:21
SamplingParams.cpp1.71 kB26-03-01 12:21
StdAfx.cpp2.28 kB26-03-01 12:21
~VCC.tmp80.00 kB20-04-05 09:31
<res>0.00 B10-11-03 12:46
Toolbar.bmp3.24 kB26-03-01 12:21
HMMDemo.ico1.05 kB26-03-01 12:21
HMMDemoDoc.ico1.05 kB26-03-01 12:21
HMMDemo.rc2399.00 B26-03-01 12:21
Thumbs.db5.00 kB20-03-05 14:16
HMMDemo.dsp6.21 kB22-03-05 15:45
HMMDemo.plg2.18 kB16-04-05 15:56
HMMDemo.rc18.42 kB26-03-01 12:21
highgui.h13.33 kB22-03-05 15:31
cv.h129.19 kB22-03-05 15:35
RCa0124034.94 kB20-03-05 14:17
HMMDemo.opt90.00 kB20-04-05 13:00
HMMDemo.aps39.01 kB16-04-05 15:06
cvt.txt46.93 kB22-03-05 15:38
cvtypes.h46.93 kB22-03-05 15:40
cverror.h9.88 kB22-03-05 15:42
cvcompat.h29.95 kB22-03-05 15:44
~VC20.tmp48.00 kB12-04-05 10:48
FaceBase.ncb49.00 kB19-04-05 21:28
FaceBase.plg3.90 kB20-04-05 12:55
~VCC6.tmp80.00 kB19-04-05 22:44
HMMDemoDoc.opt52.50 kB22-03-05 15:57
MainFrm.opt52.50 kB19-04-05 22:44
FaceBase.opt52.50 kB19-04-05 21:28
Camera.cpp8.47 kB12-04-05 10:54
Threads.cpp21.72 kB19-04-05 22:48
Camera.h3.29 kB12-04-05 10:54
Threads.opt52.50 kB19-04-05 22:45
StdAfx.opt52.50 kB19-04-05 22:44
HMMDemo.dsw1.09 kB19-04-05 22:42
HMMDemo.ncb273.00 kB20-04-05 13:00
HMMDemoDoc.dsp3.37 kB21-03-05 16:24
HMMDemoDoc.ncb49.00 kB22-03-05 15:57
HMMDemoDoc.plg690.00 B21-03-05 16:24
HMMDemoDoc.dsw729.00 B21-03-05 16:26
StdAfx.dsp3.32 kB21-03-05 21:56
StdAfx.ncb41.00 kB19-04-05 22:44
StdAfx.plg1.26 kB21-03-05 21:56
StdAfx.dsw537.00 B21-03-05 21:57
MainFrm.dsp3.33 kB21-03-05 21:57
MainFrm.ncb49.00 kB19-04-05 22:44
MainFrm.plg1.27 kB21-03-05 21:57
MainFrm.dsw539.00 B21-03-05 21:57
FaceBase.dsp3.34 kB21-03-05 21:58
FaceBase.dsw541.00 B21-03-05 21:58
Threads.dsp3.33 kB21-03-05 22:04
Threads.ncb49.00 kB19-04-05 22:45
Threads.plg1.26 kB20-04-05 12:55
Threads.dsw539.00 B21-03-05 22:05
Sponsored links

highgui.h (253.31 kB)

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


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!

Warm tip!

CodeForge to FavoriteFavorite by Ctrl+D