Update to 2.0.0 tree from current Fremantle build
[opencv] / interfaces / swig / python / highgui.py
1 # This file was automatically generated by SWIG (http://www.swig.org).
2 # Version 1.3.40
3 #
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.
7
8 from sys import version_info
9 if version_info >= (2,6,0):
10     def swig_import_helper():
11         from os.path import dirname
12         import imp
13         fp = None
14         try:
15             fp, pathname, description = imp.find_module('_highgui', [dirname(__file__)])
16         except ImportError:
17             import _highgui
18             return _highgui
19         if fp is not None:
20             try:
21                 _mod = imp.load_module('_highgui', fp, pathname, description)
22             finally:
23                 fp.close()
24             return _mod
25     _highgui = swig_import_helper()
26     del swig_import_helper
27 else:
28     import _highgui
29 del version_info
30 try:
31     _swig_property = property
32 except NameError:
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)
36     if (name == "this"):
37         if type(value).__name__ == 'SwigPyObject':
38             self.__dict__[name] = value
39             return
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
44     else:
45         raise AttributeError("You cannot add attributes to %s" % self)
46
47 def _swig_setattr(self,class_type,name,value):
48     return _swig_setattr_nondynamic(self,class_type,name,value,0)
49
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)
55
56 def _swig_repr(self):
57     try: strthis = "proxy of " + self.this.__repr__()
58     except: strthis = ""
59     return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
60
61 try:
62     _object = object
63     _newclass = 1
64 except AttributeError:
65     class _object : pass
66     _newclass = 0
67
68
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)
74     __repr__ = _swig_repr
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)
87
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)
93     __repr__ = _swig_repr
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)
106
107 cvReleaseCapture = _highgui.delete_CvCapture
108
109 cvReleaseVideoWriter = _highgui.delete_CvVideoWriter
110
111
112 def cvRetrieveFrame(*args):
113   """cvRetrieveFrame(CvCapture capture) -> CvMat"""
114   return _highgui.cvRetrieveFrame(*args)
115
116 def cvQueryFrame(*args):
117   """cvQueryFrame(CvCapture capture) -> CvMat"""
118   return _highgui.cvQueryFrame(*args)
119
120 def cvInitSystem(*args):
121   """cvInitSystem(int argc, char argv) -> int"""
122   return _highgui.cvInitSystem(*args)
123
124 def cvStartWindowThread():
125   """cvStartWindowThread() -> int"""
126   return _highgui.cvStartWindowThread()
127 CV_WINDOW_AUTOSIZE = _highgui.CV_WINDOW_AUTOSIZE
128
129 def cvNamedWindow(*args):
130   """cvNamedWindow(char name, int flags = 1) -> int"""
131   return _highgui.cvNamedWindow(*args)
132
133 def cvShowImage(*args):
134   """cvShowImage(char name, CvArr image)"""
135   return _highgui.cvShowImage(*args)
136
137 def cvResizeWindow(*args):
138   """cvResizeWindow(char name, int width, int height)"""
139   return _highgui.cvResizeWindow(*args)
140
141 def cvMoveWindow(*args):
142   """cvMoveWindow(char name, int x, int y)"""
143   return _highgui.cvMoveWindow(*args)
144
145 def cvDestroyWindow(*args):
146   """cvDestroyWindow(char name)"""
147   return _highgui.cvDestroyWindow(*args)
148
149 def cvDestroyAllWindows():
150   """cvDestroyAllWindows()"""
151   return _highgui.cvDestroyAllWindows()
152
153 def cvGetWindowHandle(*args):
154   """cvGetWindowHandle(char name) -> void"""
155   return _highgui.cvGetWindowHandle(*args)
156
157 def cvGetWindowName(*args):
158   """cvGetWindowName(void window_handle) -> char"""
159   return _highgui.cvGetWindowName(*args)
160
161 def cvCreateTrackbar(*args):
162   """
163     cvCreateTrackbar(char trackbar_name, char window_name, int value, int count, 
164         CvTrackbarCallback on_change) -> int
165     """
166   return _highgui.cvCreateTrackbar(*args)
167
168 def cvCreateTrackbar2(*args):
169   """
170     cvCreateTrackbar2(char trackbar_name, char window_name, int value, int count, 
171         CvTrackbarCallback2 on_change, void userdata = None) -> int
172     """
173   return _highgui.cvCreateTrackbar2(*args)
174
175 def cvGetTrackbarPos(*args):
176   """cvGetTrackbarPos(char trackbar_name, char window_name) -> int"""
177   return _highgui.cvGetTrackbarPos(*args)
178
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
198
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
207
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
214
215 def cvSaveImage(*args):
216   """cvSaveImage(char filename, CvArr image, int params = None) -> int"""
217   return _highgui.cvSaveImage(*args)
218
219 def cvDecodeImage(*args):
220   """cvDecodeImage(CvMat buf, int iscolor = 1)"""
221   return _highgui.cvDecodeImage(*args)
222
223 def cvDecodeImageM(*args):
224   """cvDecodeImageM(CvMat buf, int iscolor = 1) -> CvMat"""
225   return _highgui.cvDecodeImageM(*args)
226
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
232
233 def cvConvertImage(*args):
234   """cvConvertImage(CvArr src, CvArr dst, int flags = 0)"""
235   return _highgui.cvConvertImage(*args)
236
237 def cvWaitKeyC(delay = 0):
238   """cvWaitKeyC(int delay = 0) -> int"""
239   return _highgui.cvWaitKeyC(delay)
240
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
263
264 def cvCreateCameraCapture(*args):
265   """cvCreateCameraCapture(int index) -> CvCapture"""
266   return _highgui.cvCreateCameraCapture(*args)
267
268 def cvGrabFrame(*args):
269   """cvGrabFrame(CvCapture capture) -> int"""
270   return _highgui.cvGrabFrame(*args)
271
272 def cvRetrieveFrame__Deprecated(*args):
273   """cvRetrieveFrame__Deprecated(CvCapture capture, int streamIdx = 0)"""
274   return _highgui.cvRetrieveFrame__Deprecated(*args)
275
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
298
299 def cvGetCaptureProperty(*args):
300   """cvGetCaptureProperty(CvCapture capture, int property_id) -> double"""
301   return _highgui.cvGetCaptureProperty(*args)
302
303 def cvSetCaptureProperty(*args):
304   """cvSetCaptureProperty(CvCapture capture, int property_id, double value) -> int"""
305   return _highgui.cvSetCaptureProperty(*args)
306
307 def cvGetCaptureDomain(*args):
308   """cvGetCaptureDomain(CvCapture capture) -> int"""
309   return _highgui.cvGetCaptureDomain(*args)
310
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
315
316 def cvCreateVideoWriter(*args):
317   """
318     cvCreateVideoWriter(char filename, int fourcc, double fps, CvSize frame_size, 
319         int is_color = 1) -> CvVideoWriter
320     """
321   return _highgui.cvCreateVideoWriter(*args)
322
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
334     def __init__(self): 
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):
342         """
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
345         """
346         return _highgui.CvvImage_Create(self, *args)
347
348     def Load(self, *args):
349         """
350         Load(self, char filename, int desired_color = 1) -> bool
351         Load(self, char filename) -> bool
352         """
353         return _highgui.CvvImage_Load(self, *args)
354
355     def LoadRect(self, *args):
356         """LoadRect(self, char filename, int desired_color, CvRect r) -> bool"""
357         return _highgui.CvvImage_LoadRect(self, *args)
358
359     def Save(self, *args):
360         """Save(self, char filename) -> bool"""
361         return _highgui.CvvImage_Save(self, *args)
362
363     def CopyOf(self, *args):
364         """
365         CopyOf(self, CvvImage image, int desired_color = -1)
366         CopyOf(self, CvvImage image)
367         CopyOf(self,  img, int desired_color = -1)
368         CopyOf(self,  img)
369         """
370         return _highgui.CvvImage_CopyOf(self, *args)
371
372     def GetImage(self):
373         """GetImage(self)"""
374         return _highgui.CvvImage_GetImage(self)
375
376     def Destroy(self):
377         """Destroy(self)"""
378         return _highgui.CvvImage_Destroy(self)
379
380     def Width(self):
381         """Width(self) -> int"""
382         return _highgui.CvvImage_Width(self)
383
384     def Height(self):
385         """Height(self) -> int"""
386         return _highgui.CvvImage_Height(self)
387
388     def Bpp(self):
389         """Bpp(self) -> int"""
390         return _highgui.CvvImage_Bpp(self)
391
392     def Fill(self, *args):
393         """Fill(self, int color)"""
394         return _highgui.CvvImage_Fill(self, *args)
395
396     def Show(self, *args):
397         """Show(self, char window)"""
398         return _highgui.CvvImage_Show(self, *args)
399
400 CvvImage_swigregister = _highgui.CvvImage_swigregister
401 CvvImage_swigregister(CvvImage)
402
403 def cvSetMouseCallback(*args):
404   return _highgui.cvSetMouseCallback(*args)
405 cvSetMouseCallback = _highgui.cvSetMouseCallback
406
407 def cvWaitKey(delay = 0):
408   return _highgui.cvWaitKey(delay)
409 cvWaitKey = _highgui.cvWaitKey
410
411 def cvLoadImage(*args):
412   """
413     cvLoadImage(char filename, int iscolor = 1) -> CvMat
414     cvLoadImage(char filename) -> CvMat
415     """
416   return _highgui.cvLoadImage(*args)
417
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)
430
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)
443
444 __doc__ = """HighGUI provides minimalistic user interface parts and video input/output.
445
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.
449
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.
453 """
454
455
456
457