1 # This file was automatically generated by SWIG (http://www.swig.org).
4 # Do not make changes to this file unless you know what you are doing--modify
5 # the SWIG interface file instead.
6 # This file is compatible with both classic and new-style classes.
8 from sys import version_info
9 if version_info >= (2,6,0):
10 def swig_import_helper():
11 from os.path import dirname
15 fp, pathname, description = imp.find_module('_highgui', [dirname(__file__)])
21 _mod = imp.load_module('_highgui', fp, pathname, description)
25 _highgui = swig_import_helper()
26 del swig_import_helper
31 _swig_property = property
33 pass # Python < 2.2 doesn't have 'property'.
34 def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
35 if (name == "thisown"): return self.this.own(value)
37 if type(value).__name__ == 'SwigPyObject':
38 self.__dict__[name] = value
40 method = class_type.__swig_setmethods__.get(name,None)
41 if method: return method(self,value)
42 if (not static) or hasattr(self,name):
43 self.__dict__[name] = value
45 raise AttributeError("You cannot add attributes to %s" % self)
47 def _swig_setattr(self,class_type,name,value):
48 return _swig_setattr_nondynamic(self,class_type,name,value,0)
50 def _swig_getattr(self,class_type,name):
51 if (name == "thisown"): return self.this.own()
52 method = class_type.__swig_getmethods__.get(name,None)
53 if method: return method(self)
54 raise AttributeError(name)
57 try: strthis = "proxy of " + self.this.__repr__()
59 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
64 except AttributeError:
69 class CvRNG_Wrapper(_object):
70 __swig_setmethods__ = {}
71 __setattr__ = lambda self, name, value: _swig_setattr(self, CvRNG_Wrapper, name, value)
72 __swig_getmethods__ = {}
73 __getattr__ = lambda self, name: _swig_getattr(self, CvRNG_Wrapper, name)
75 def __init__(self, *args):
76 this = _highgui.new_CvRNG_Wrapper(*args)
77 try: self.this.append(this)
78 except: self.this = this
79 def ptr(self): return _highgui.CvRNG_Wrapper_ptr(self)
80 def ref(self): return _highgui.CvRNG_Wrapper_ref(self)
81 def __eq__(self, *args): return _highgui.CvRNG_Wrapper___eq__(self, *args)
82 def __ne__(self, *args): return _highgui.CvRNG_Wrapper___ne__(self, *args)
83 __swig_destroy__ = _highgui.delete_CvRNG_Wrapper
84 __del__ = lambda self : None;
85 CvRNG_Wrapper_swigregister = _highgui.CvRNG_Wrapper_swigregister
86 CvRNG_Wrapper_swigregister(CvRNG_Wrapper)
88 class CvSubdiv2DEdge_Wrapper(_object):
89 __swig_setmethods__ = {}
90 __setattr__ = lambda self, name, value: _swig_setattr(self, CvSubdiv2DEdge_Wrapper, name, value)
91 __swig_getmethods__ = {}
92 __getattr__ = lambda self, name: _swig_getattr(self, CvSubdiv2DEdge_Wrapper, name)
94 def __init__(self, *args):
95 this = _highgui.new_CvSubdiv2DEdge_Wrapper(*args)
96 try: self.this.append(this)
97 except: self.this = this
98 def ptr(self): return _highgui.CvSubdiv2DEdge_Wrapper_ptr(self)
99 def ref(self): return _highgui.CvSubdiv2DEdge_Wrapper_ref(self)
100 def __eq__(self, *args): return _highgui.CvSubdiv2DEdge_Wrapper___eq__(self, *args)
101 def __ne__(self, *args): return _highgui.CvSubdiv2DEdge_Wrapper___ne__(self, *args)
102 __swig_destroy__ = _highgui.delete_CvSubdiv2DEdge_Wrapper
103 __del__ = lambda self : None;
104 CvSubdiv2DEdge_Wrapper_swigregister = _highgui.CvSubdiv2DEdge_Wrapper_swigregister
105 CvSubdiv2DEdge_Wrapper_swigregister(CvSubdiv2DEdge_Wrapper)
107 cvReleaseCapture = _highgui.delete_CvCapture
109 cvReleaseVideoWriter = _highgui.delete_CvVideoWriter
112 def cvRetrieveFrame(*args):
113 """cvRetrieveFrame(CvCapture capture) -> CvMat"""
114 return _highgui.cvRetrieveFrame(*args)
116 def cvQueryFrame(*args):
117 """cvQueryFrame(CvCapture capture) -> CvMat"""
118 return _highgui.cvQueryFrame(*args)
120 def cvInitSystem(*args):
121 """cvInitSystem(int argc, char argv) -> int"""
122 return _highgui.cvInitSystem(*args)
124 def cvStartWindowThread():
125 """cvStartWindowThread() -> int"""
126 return _highgui.cvStartWindowThread()
127 CV_WINDOW_AUTOSIZE = _highgui.CV_WINDOW_AUTOSIZE
129 def cvNamedWindow(*args):
130 """cvNamedWindow(char name, int flags = 1) -> int"""
131 return _highgui.cvNamedWindow(*args)
133 def cvShowImage(*args):
134 """cvShowImage(char name, CvArr image)"""
135 return _highgui.cvShowImage(*args)
137 def cvResizeWindow(*args):
138 """cvResizeWindow(char name, int width, int height)"""
139 return _highgui.cvResizeWindow(*args)
141 def cvMoveWindow(*args):
142 """cvMoveWindow(char name, int x, int y)"""
143 return _highgui.cvMoveWindow(*args)
145 def cvDestroyWindow(*args):
146 """cvDestroyWindow(char name)"""
147 return _highgui.cvDestroyWindow(*args)
149 def cvDestroyAllWindows():
150 """cvDestroyAllWindows()"""
151 return _highgui.cvDestroyAllWindows()
153 def cvGetWindowHandle(*args):
154 """cvGetWindowHandle(char name) -> void"""
155 return _highgui.cvGetWindowHandle(*args)
157 def cvGetWindowName(*args):
158 """cvGetWindowName(void window_handle) -> char"""
159 return _highgui.cvGetWindowName(*args)
161 def cvCreateTrackbar(*args):
163 cvCreateTrackbar(char trackbar_name, char window_name, int value, int count,
164 CvTrackbarCallback on_change) -> int
166 return _highgui.cvCreateTrackbar(*args)
168 def cvCreateTrackbar2(*args):
170 cvCreateTrackbar2(char trackbar_name, char window_name, int value, int count,
171 CvTrackbarCallback2 on_change, void userdata = None) -> int
173 return _highgui.cvCreateTrackbar2(*args)
175 def cvGetTrackbarPos(*args):
176 """cvGetTrackbarPos(char trackbar_name, char window_name) -> int"""
177 return _highgui.cvGetTrackbarPos(*args)
179 def cvSetTrackbarPos(*args):
180 """cvSetTrackbarPos(char trackbar_name, char window_name, int pos)"""
181 return _highgui.cvSetTrackbarPos(*args)
182 CV_EVENT_MOUSEMOVE = _highgui.CV_EVENT_MOUSEMOVE
183 CV_EVENT_LBUTTONDOWN = _highgui.CV_EVENT_LBUTTONDOWN
184 CV_EVENT_RBUTTONDOWN = _highgui.CV_EVENT_RBUTTONDOWN
185 CV_EVENT_MBUTTONDOWN = _highgui.CV_EVENT_MBUTTONDOWN
186 CV_EVENT_LBUTTONUP = _highgui.CV_EVENT_LBUTTONUP
187 CV_EVENT_RBUTTONUP = _highgui.CV_EVENT_RBUTTONUP
188 CV_EVENT_MBUTTONUP = _highgui.CV_EVENT_MBUTTONUP
189 CV_EVENT_LBUTTONDBLCLK = _highgui.CV_EVENT_LBUTTONDBLCLK
190 CV_EVENT_RBUTTONDBLCLK = _highgui.CV_EVENT_RBUTTONDBLCLK
191 CV_EVENT_MBUTTONDBLCLK = _highgui.CV_EVENT_MBUTTONDBLCLK
192 CV_EVENT_FLAG_LBUTTON = _highgui.CV_EVENT_FLAG_LBUTTON
193 CV_EVENT_FLAG_RBUTTON = _highgui.CV_EVENT_FLAG_RBUTTON
194 CV_EVENT_FLAG_MBUTTON = _highgui.CV_EVENT_FLAG_MBUTTON
195 CV_EVENT_FLAG_CTRLKEY = _highgui.CV_EVENT_FLAG_CTRLKEY
196 CV_EVENT_FLAG_SHIFTKEY = _highgui.CV_EVENT_FLAG_SHIFTKEY
197 CV_EVENT_FLAG_ALTKEY = _highgui.CV_EVENT_FLAG_ALTKEY
199 def cvSetMouseCallbackOld(*args):
200 """cvSetMouseCallbackOld(char window_name, CvMouseCallback on_mouse, void param = None)"""
201 return _highgui.cvSetMouseCallbackOld(*args)
202 CV_LOAD_IMAGE_UNCHANGED = _highgui.CV_LOAD_IMAGE_UNCHANGED
203 CV_LOAD_IMAGE_GRAYSCALE = _highgui.CV_LOAD_IMAGE_GRAYSCALE
204 CV_LOAD_IMAGE_COLOR = _highgui.CV_LOAD_IMAGE_COLOR
205 CV_LOAD_IMAGE_ANYDEPTH = _highgui.CV_LOAD_IMAGE_ANYDEPTH
206 CV_LOAD_IMAGE_ANYCOLOR = _highgui.CV_LOAD_IMAGE_ANYCOLOR
208 def cvLoadImageM(*args):
209 """cvLoadImageM(char filename, int iscolor = 1) -> CvMat"""
210 return _highgui.cvLoadImageM(*args)
211 CV_IMWRITE_JPEG_QUALITY = _highgui.CV_IMWRITE_JPEG_QUALITY
212 CV_IMWRITE_PNG_COMPRESSION = _highgui.CV_IMWRITE_PNG_COMPRESSION
213 CV_IMWRITE_PXM_BINARY = _highgui.CV_IMWRITE_PXM_BINARY
215 def cvSaveImage(*args):
216 """cvSaveImage(char filename, CvArr image, int params = None) -> int"""
217 return _highgui.cvSaveImage(*args)
219 def cvDecodeImage(*args):
220 """cvDecodeImage(CvMat buf, int iscolor = 1)"""
221 return _highgui.cvDecodeImage(*args)
223 def cvDecodeImageM(*args):
224 """cvDecodeImageM(CvMat buf, int iscolor = 1) -> CvMat"""
225 return _highgui.cvDecodeImageM(*args)
227 def cvEncodeImage(*args):
228 """cvEncodeImage(char ext, CvArr image, int params = None) -> CvMat"""
229 return _highgui.cvEncodeImage(*args)
230 CV_CVTIMG_FLIP = _highgui.CV_CVTIMG_FLIP
231 CV_CVTIMG_SWAP_RB = _highgui.CV_CVTIMG_SWAP_RB
233 def cvConvertImage(*args):
234 """cvConvertImage(CvArr src, CvArr dst, int flags = 0)"""
235 return _highgui.cvConvertImage(*args)
237 def cvWaitKeyC(delay = 0):
238 """cvWaitKeyC(int delay = 0) -> int"""
239 return _highgui.cvWaitKeyC(delay)
241 def cvCreateFileCapture(*args):
242 """cvCreateFileCapture(char filename) -> CvCapture"""
243 return _highgui.cvCreateFileCapture(*args)
244 CV_CAP_ANY = _highgui.CV_CAP_ANY
245 CV_CAP_MIL = _highgui.CV_CAP_MIL
246 CV_CAP_VFW = _highgui.CV_CAP_VFW
247 CV_CAP_V4L = _highgui.CV_CAP_V4L
248 CV_CAP_V4L2 = _highgui.CV_CAP_V4L2
249 CV_CAP_FIREWARE = _highgui.CV_CAP_FIREWARE
250 CV_CAP_FIREWIRE = _highgui.CV_CAP_FIREWIRE
251 CV_CAP_IEEE1394 = _highgui.CV_CAP_IEEE1394
252 CV_CAP_DC1394 = _highgui.CV_CAP_DC1394
253 CV_CAP_CMU1394 = _highgui.CV_CAP_CMU1394
254 CV_CAP_STEREO = _highgui.CV_CAP_STEREO
255 CV_CAP_TYZX = _highgui.CV_CAP_TYZX
256 CV_TYZX_LEFT = _highgui.CV_TYZX_LEFT
257 CV_TYZX_RIGHT = _highgui.CV_TYZX_RIGHT
258 CV_TYZX_COLOR = _highgui.CV_TYZX_COLOR
259 CV_TYZX_Z = _highgui.CV_TYZX_Z
260 CV_CAP_QT = _highgui.CV_CAP_QT
261 CV_CAP_UNICAP = _highgui.CV_CAP_UNICAP
262 CV_CAP_DSHOW = _highgui.CV_CAP_DSHOW
264 def cvCreateCameraCapture(*args):
265 """cvCreateCameraCapture(int index) -> CvCapture"""
266 return _highgui.cvCreateCameraCapture(*args)
268 def cvGrabFrame(*args):
269 """cvGrabFrame(CvCapture capture) -> int"""
270 return _highgui.cvGrabFrame(*args)
272 def cvRetrieveFrame__Deprecated(*args):
273 """cvRetrieveFrame__Deprecated(CvCapture capture, int streamIdx = 0)"""
274 return _highgui.cvRetrieveFrame__Deprecated(*args)
276 def cvQueryFrame__Deprecated(*args):
277 """cvQueryFrame__Deprecated(CvCapture capture)"""
278 return _highgui.cvQueryFrame__Deprecated(*args)
279 CV_CAP_PROP_POS_MSEC = _highgui.CV_CAP_PROP_POS_MSEC
280 CV_CAP_PROP_POS_FRAMES = _highgui.CV_CAP_PROP_POS_FRAMES
281 CV_CAP_PROP_POS_AVI_RATIO = _highgui.CV_CAP_PROP_POS_AVI_RATIO
282 CV_CAP_PROP_FRAME_WIDTH = _highgui.CV_CAP_PROP_FRAME_WIDTH
283 CV_CAP_PROP_FRAME_HEIGHT = _highgui.CV_CAP_PROP_FRAME_HEIGHT
284 CV_CAP_PROP_FPS = _highgui.CV_CAP_PROP_FPS
285 CV_CAP_PROP_FOURCC = _highgui.CV_CAP_PROP_FOURCC
286 CV_CAP_PROP_FRAME_COUNT = _highgui.CV_CAP_PROP_FRAME_COUNT
287 CV_CAP_PROP_FORMAT = _highgui.CV_CAP_PROP_FORMAT
288 CV_CAP_PROP_MODE = _highgui.CV_CAP_PROP_MODE
289 CV_CAP_PROP_BRIGHTNESS = _highgui.CV_CAP_PROP_BRIGHTNESS
290 CV_CAP_PROP_CONTRAST = _highgui.CV_CAP_PROP_CONTRAST
291 CV_CAP_PROP_SATURATION = _highgui.CV_CAP_PROP_SATURATION
292 CV_CAP_PROP_HUE = _highgui.CV_CAP_PROP_HUE
293 CV_CAP_PROP_GAIN = _highgui.CV_CAP_PROP_GAIN
294 CV_CAP_PROP_EXPOSURE = _highgui.CV_CAP_PROP_EXPOSURE
295 CV_CAP_PROP_CONVERT_RGB = _highgui.CV_CAP_PROP_CONVERT_RGB
296 CV_CAP_PROP_WHITE_BALANCE = _highgui.CV_CAP_PROP_WHITE_BALANCE
297 CV_CAP_PROP_RECTIFICATION = _highgui.CV_CAP_PROP_RECTIFICATION
299 def cvGetCaptureProperty(*args):
300 """cvGetCaptureProperty(CvCapture capture, int property_id) -> double"""
301 return _highgui.cvGetCaptureProperty(*args)
303 def cvSetCaptureProperty(*args):
304 """cvSetCaptureProperty(CvCapture capture, int property_id, double value) -> int"""
305 return _highgui.cvSetCaptureProperty(*args)
307 def cvGetCaptureDomain(*args):
308 """cvGetCaptureDomain(CvCapture capture) -> int"""
309 return _highgui.cvGetCaptureDomain(*args)
311 def CV_FOURCC(*args):
312 """CV_FOURCC(char c1, char c2, char c3, char c4) -> int"""
313 return _highgui.CV_FOURCC(*args)
314 CV_FOURCC_PROMPT = _highgui.CV_FOURCC_PROMPT
316 def cvCreateVideoWriter(*args):
318 cvCreateVideoWriter(char filename, int fourcc, double fps, CvSize frame_size,
319 int is_color = 1) -> CvVideoWriter
321 return _highgui.cvCreateVideoWriter(*args)
323 def cvWriteFrame(*args):
324 """cvWriteFrame(CvVideoWriter writer, image) -> int"""
325 return _highgui.cvWriteFrame(*args)
326 HG_AUTOSIZE = _highgui.HG_AUTOSIZE
327 class CvvImage(_object):
328 """Proxy of C++ CvvImage class"""
329 __swig_setmethods__ = {}
330 __setattr__ = lambda self, name, value: _swig_setattr(self, CvvImage, name, value)
331 __swig_getmethods__ = {}
332 __getattr__ = lambda self, name: _swig_getattr(self, CvvImage, name)
333 __repr__ = _swig_repr
335 """__init__(self) -> CvvImage"""
336 this = _highgui.new_CvvImage()
337 try: self.this.append(this)
338 except: self.this = this
339 __swig_destroy__ = _highgui.delete_CvvImage
340 __del__ = lambda self : None;
341 def Create(self, *args):
343 Create(self, int width, int height, int bits_per_pixel, int image_origin = 0) -> bool
344 Create(self, int width, int height, int bits_per_pixel) -> bool
346 return _highgui.CvvImage_Create(self, *args)
348 def Load(self, *args):
350 Load(self, char filename, int desired_color = 1) -> bool
351 Load(self, char filename) -> bool
353 return _highgui.CvvImage_Load(self, *args)
355 def LoadRect(self, *args):
356 """LoadRect(self, char filename, int desired_color, CvRect r) -> bool"""
357 return _highgui.CvvImage_LoadRect(self, *args)
359 def Save(self, *args):
360 """Save(self, char filename) -> bool"""
361 return _highgui.CvvImage_Save(self, *args)
363 def CopyOf(self, *args):
365 CopyOf(self, CvvImage image, int desired_color = -1)
366 CopyOf(self, CvvImage image)
367 CopyOf(self, img, int desired_color = -1)
370 return _highgui.CvvImage_CopyOf(self, *args)
374 return _highgui.CvvImage_GetImage(self)
378 return _highgui.CvvImage_Destroy(self)
381 """Width(self) -> int"""
382 return _highgui.CvvImage_Width(self)
385 """Height(self) -> int"""
386 return _highgui.CvvImage_Height(self)
389 """Bpp(self) -> int"""
390 return _highgui.CvvImage_Bpp(self)
392 def Fill(self, *args):
393 """Fill(self, int color)"""
394 return _highgui.CvvImage_Fill(self, *args)
396 def Show(self, *args):
397 """Show(self, char window)"""
398 return _highgui.CvvImage_Show(self, *args)
400 CvvImage_swigregister = _highgui.CvvImage_swigregister
401 CvvImage_swigregister(CvvImage)
403 def cvSetMouseCallback(*args):
404 return _highgui.cvSetMouseCallback(*args)
405 cvSetMouseCallback = _highgui.cvSetMouseCallback
407 def cvWaitKey(delay = 0):
408 return _highgui.cvWaitKey(delay)
409 cvWaitKey = _highgui.cvWaitKey
411 def cvLoadImage(*args):
413 cvLoadImage(char filename, int iscolor = 1) -> CvMat
414 cvLoadImage(char filename) -> CvMat
416 return _highgui.cvLoadImage(*args)
418 class CvCapture(_object):
419 """Proxy of C++ CvCapture class"""
420 __swig_setmethods__ = {}
421 __setattr__ = lambda self, name, value: _swig_setattr(self, CvCapture, name, value)
422 __swig_getmethods__ = {}
423 __getattr__ = lambda self, name: _swig_getattr(self, CvCapture, name)
424 def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
425 __repr__ = _swig_repr
426 __swig_destroy__ = _highgui.delete_CvCapture
427 __del__ = lambda self : None;
428 CvCapture_swigregister = _highgui.CvCapture_swigregister
429 CvCapture_swigregister(CvCapture)
431 class CvVideoWriter(_object):
432 """Proxy of C++ CvVideoWriter class"""
433 __swig_setmethods__ = {}
434 __setattr__ = lambda self, name, value: _swig_setattr(self, CvVideoWriter, name, value)
435 __swig_getmethods__ = {}
436 __getattr__ = lambda self, name: _swig_getattr(self, CvVideoWriter, name)
437 def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
438 __repr__ = _swig_repr
439 __swig_destroy__ = _highgui.delete_CvVideoWriter
440 __del__ = lambda self : None;
441 CvVideoWriter_swigregister = _highgui.CvVideoWriter_swigregister
442 CvVideoWriter_swigregister(CvVideoWriter)
444 __doc__ = """HighGUI provides minimalistic user interface parts and video input/output.
446 Dependent on the platform it was compiled on, this library provides methods
447 to draw a window for image display, capture video from a camera or framegrabber
448 or read/write video streams from/to the file system.
450 This wrapper was semi-automatically created from the C/C++ headers and therefore
451 contains no Python documentation. Because all identifiers are identical to their
452 C/C++ counterparts, you can consult the standard manuals that come with OpenCV.