Move the sources to trunk
[opencv] / interfaces / swig / python / highgui.py
1 # This file was automatically generated by SWIG (http://www.swig.org).
2 # Version 1.3.31
3 #
4 # Don't modify this file, modify the SWIG interface instead.
5 # This file is compatible with both classic and new-style classes.
6
7 import _highgui
8 import new
9 new_instancemethod = new.instancemethod
10 try:
11     _swig_property = property
12 except NameError:
13     pass # Python < 2.2 doesn't have 'property'.
14 def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
15     if (name == "thisown"): return self.this.own(value)
16     if (name == "this"):
17         if type(value).__name__ == 'PySwigObject':
18             self.__dict__[name] = value
19             return
20     method = class_type.__swig_setmethods__.get(name,None)
21     if method: return method(self,value)
22     if (not static) or hasattr(self,name):
23         self.__dict__[name] = value
24     else:
25         raise AttributeError("You cannot add attributes to %s" % self)
26
27 def _swig_setattr(self,class_type,name,value):
28     return _swig_setattr_nondynamic(self,class_type,name,value,0)
29
30 def _swig_getattr(self,class_type,name):
31     if (name == "thisown"): return self.this.own()
32     method = class_type.__swig_getmethods__.get(name,None)
33     if method: return method(self)
34     raise AttributeError,name
35
36 def _swig_repr(self):
37     try: strthis = "proxy of " + self.this.__repr__()
38     except: strthis = ""
39     return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
40
41 import types
42 try:
43     _object = types.ObjectType
44     _newclass = 1
45 except AttributeError:
46     class _object : pass
47     _newclass = 0
48 del types
49
50
51 class CvRNG_Wrapper(_object):
52     __swig_setmethods__ = {}
53     __setattr__ = lambda self, name, value: _swig_setattr(self, CvRNG_Wrapper, name, value)
54     __swig_getmethods__ = {}
55     __getattr__ = lambda self, name: _swig_getattr(self, CvRNG_Wrapper, name)
56     __repr__ = _swig_repr
57     def __init__(self, *args): 
58         this = _highgui.new_CvRNG_Wrapper(*args)
59         try: self.this.append(this)
60         except: self.this = this
61     def ptr(*args): return _highgui.CvRNG_Wrapper_ptr(*args)
62     def ref(*args): return _highgui.CvRNG_Wrapper_ref(*args)
63     def __eq__(*args): return _highgui.CvRNG_Wrapper___eq__(*args)
64     def __ne__(*args): return _highgui.CvRNG_Wrapper___ne__(*args)
65     __swig_destroy__ = _highgui.delete_CvRNG_Wrapper
66     __del__ = lambda self : None;
67 CvRNG_Wrapper_swigregister = _highgui.CvRNG_Wrapper_swigregister
68 CvRNG_Wrapper_swigregister(CvRNG_Wrapper)
69
70 class CvSubdiv2DEdge_Wrapper(_object):
71     __swig_setmethods__ = {}
72     __setattr__ = lambda self, name, value: _swig_setattr(self, CvSubdiv2DEdge_Wrapper, name, value)
73     __swig_getmethods__ = {}
74     __getattr__ = lambda self, name: _swig_getattr(self, CvSubdiv2DEdge_Wrapper, name)
75     __repr__ = _swig_repr
76     def __init__(self, *args): 
77         this = _highgui.new_CvSubdiv2DEdge_Wrapper(*args)
78         try: self.this.append(this)
79         except: self.this = this
80     def ptr(*args): return _highgui.CvSubdiv2DEdge_Wrapper_ptr(*args)
81     def ref(*args): return _highgui.CvSubdiv2DEdge_Wrapper_ref(*args)
82     def __eq__(*args): return _highgui.CvSubdiv2DEdge_Wrapper___eq__(*args)
83     def __ne__(*args): return _highgui.CvSubdiv2DEdge_Wrapper___ne__(*args)
84     __swig_destroy__ = _highgui.delete_CvSubdiv2DEdge_Wrapper
85     __del__ = lambda self : None;
86 CvSubdiv2DEdge_Wrapper_swigregister = _highgui.CvSubdiv2DEdge_Wrapper_swigregister
87 CvSubdiv2DEdge_Wrapper_swigregister(CvSubdiv2DEdge_Wrapper)
88
89
90 def cvRetrieveFrame(*args):
91   """cvRetrieveFrame(CvCapture capture) -> CvMat"""
92   return _highgui.cvRetrieveFrame(*args)
93
94 def cvQueryFrame(*args):
95   """cvQueryFrame(CvCapture capture) -> CvMat"""
96   return _highgui.cvQueryFrame(*args)
97
98 def CV_FOURCC(*args):
99   """CV_FOURCC(char c1, char c2, char c3, char c4) -> int"""
100   return _highgui.CV_FOURCC(*args)
101
102 def cvInitSystem(*args):
103   """cvInitSystem(int argc, char argv) -> int"""
104   return _highgui.cvInitSystem(*args)
105
106 def cvStartWindowThread(*args):
107   """cvStartWindowThread() -> int"""
108   return _highgui.cvStartWindowThread(*args)
109 CV_WINDOW_AUTOSIZE = _highgui.CV_WINDOW_AUTOSIZE
110
111 def cvNamedWindow(*args):
112   """cvNamedWindow(char name, int flags=1) -> int"""
113   return _highgui.cvNamedWindow(*args)
114
115 def cvShowImage(*args):
116   """cvShowImage(char name, CvArr image)"""
117   return _highgui.cvShowImage(*args)
118
119 def cvResizeWindow(*args):
120   """cvResizeWindow(char name, int width, int height)"""
121   return _highgui.cvResizeWindow(*args)
122
123 def cvMoveWindow(*args):
124   """cvMoveWindow(char name, int x, int y)"""
125   return _highgui.cvMoveWindow(*args)
126
127 def cvDestroyWindow(*args):
128   """cvDestroyWindow(char name)"""
129   return _highgui.cvDestroyWindow(*args)
130
131 def cvDestroyAllWindows(*args):
132   """cvDestroyAllWindows()"""
133   return _highgui.cvDestroyAllWindows(*args)
134
135 def cvGetWindowHandle(*args):
136   """cvGetWindowHandle(char name) -> void"""
137   return _highgui.cvGetWindowHandle(*args)
138
139 def cvGetWindowName(*args):
140   """cvGetWindowName(void window_handle) -> char"""
141   return _highgui.cvGetWindowName(*args)
142
143 def cvCreateTrackbar(*args):
144   """
145     cvCreateTrackbar(char trackbar_name, char window_name, int value, int count, 
146         CvTrackbarCallback on_change) -> int
147     """
148   return _highgui.cvCreateTrackbar(*args)
149
150 def cvGetTrackbarPos(*args):
151   """cvGetTrackbarPos(char trackbar_name, char window_name) -> int"""
152   return _highgui.cvGetTrackbarPos(*args)
153
154 def cvSetTrackbarPos(*args):
155   """cvSetTrackbarPos(char trackbar_name, char window_name, int pos)"""
156   return _highgui.cvSetTrackbarPos(*args)
157 CV_EVENT_MOUSEMOVE = _highgui.CV_EVENT_MOUSEMOVE
158 CV_EVENT_LBUTTONDOWN = _highgui.CV_EVENT_LBUTTONDOWN
159 CV_EVENT_RBUTTONDOWN = _highgui.CV_EVENT_RBUTTONDOWN
160 CV_EVENT_MBUTTONDOWN = _highgui.CV_EVENT_MBUTTONDOWN
161 CV_EVENT_LBUTTONUP = _highgui.CV_EVENT_LBUTTONUP
162 CV_EVENT_RBUTTONUP = _highgui.CV_EVENT_RBUTTONUP
163 CV_EVENT_MBUTTONUP = _highgui.CV_EVENT_MBUTTONUP
164 CV_EVENT_LBUTTONDBLCLK = _highgui.CV_EVENT_LBUTTONDBLCLK
165 CV_EVENT_RBUTTONDBLCLK = _highgui.CV_EVENT_RBUTTONDBLCLK
166 CV_EVENT_MBUTTONDBLCLK = _highgui.CV_EVENT_MBUTTONDBLCLK
167 CV_EVENT_FLAG_LBUTTON = _highgui.CV_EVENT_FLAG_LBUTTON
168 CV_EVENT_FLAG_RBUTTON = _highgui.CV_EVENT_FLAG_RBUTTON
169 CV_EVENT_FLAG_MBUTTON = _highgui.CV_EVENT_FLAG_MBUTTON
170 CV_EVENT_FLAG_CTRLKEY = _highgui.CV_EVENT_FLAG_CTRLKEY
171 CV_EVENT_FLAG_SHIFTKEY = _highgui.CV_EVENT_FLAG_SHIFTKEY
172 CV_EVENT_FLAG_ALTKEY = _highgui.CV_EVENT_FLAG_ALTKEY
173
174 def cvSetMouseCallbackOld(*args):
175   """cvSetMouseCallbackOld(char window_name, CvMouseCallback on_mouse, void param=None)"""
176   return _highgui.cvSetMouseCallbackOld(*args)
177 CV_LOAD_IMAGE_UNCHANGED = _highgui.CV_LOAD_IMAGE_UNCHANGED
178 CV_LOAD_IMAGE_GRAYSCALE = _highgui.CV_LOAD_IMAGE_GRAYSCALE
179 CV_LOAD_IMAGE_COLOR = _highgui.CV_LOAD_IMAGE_COLOR
180 CV_LOAD_IMAGE_ANYDEPTH = _highgui.CV_LOAD_IMAGE_ANYDEPTH
181 CV_LOAD_IMAGE_ANYCOLOR = _highgui.CV_LOAD_IMAGE_ANYCOLOR
182
183 def cvLoadImageM(*args):
184   """cvLoadImageM(char filename, int iscolor=1) -> CvMat"""
185   return _highgui.cvLoadImageM(*args)
186
187 def cvSaveImage(*args):
188   """cvSaveImage(char filename, CvArr image) -> int"""
189   return _highgui.cvSaveImage(*args)
190 CV_CVTIMG_FLIP = _highgui.CV_CVTIMG_FLIP
191 CV_CVTIMG_SWAP_RB = _highgui.CV_CVTIMG_SWAP_RB
192
193 def cvConvertImage(*args):
194   """cvConvertImage(CvArr src, CvArr dst, int flags=0)"""
195   return _highgui.cvConvertImage(*args)
196
197 def cvWaitKeyC(*args):
198   """cvWaitKeyC(int delay=0) -> int"""
199   return _highgui.cvWaitKeyC(*args)
200
201 def cvCreateFileCapture(*args):
202   """cvCreateFileCapture(char filename) -> CvCapture"""
203   return _highgui.cvCreateFileCapture(*args)
204 CV_CAP_ANY = _highgui.CV_CAP_ANY
205 CV_CAP_MIL = _highgui.CV_CAP_MIL
206 CV_CAP_VFW = _highgui.CV_CAP_VFW
207 CV_CAP_V4L = _highgui.CV_CAP_V4L
208 CV_CAP_V4L2 = _highgui.CV_CAP_V4L2
209 CV_CAP_FIREWARE = _highgui.CV_CAP_FIREWARE
210 CV_CAP_IEEE1394 = _highgui.CV_CAP_IEEE1394
211 CV_CAP_DC1394 = _highgui.CV_CAP_DC1394
212 CV_CAP_CMU1394 = _highgui.CV_CAP_CMU1394
213 CV_CAP_STEREO = _highgui.CV_CAP_STEREO
214 CV_CAP_TYZX = _highgui.CV_CAP_TYZX
215 CV_TYZX_LEFT = _highgui.CV_TYZX_LEFT
216 CV_TYZX_RIGHT = _highgui.CV_TYZX_RIGHT
217 CV_TYZX_COLOR = _highgui.CV_TYZX_COLOR
218 CV_TYZX_Z = _highgui.CV_TYZX_Z
219 CV_CAP_QT = _highgui.CV_CAP_QT
220
221 def cvCreateCameraCapture(*args):
222   """cvCreateCameraCapture(int index) -> CvCapture"""
223   return _highgui.cvCreateCameraCapture(*args)
224
225 def cvGrabFrame(*args):
226   """cvGrabFrame(CvCapture capture) -> int"""
227   return _highgui.cvGrabFrame(*args)
228
229 def cvRetrieveFrame__Deprecated(*args):
230   """cvRetrieveFrame__Deprecated(CvCapture capture)"""
231   return _highgui.cvRetrieveFrame__Deprecated(*args)
232
233 def cvQueryFrame__Deprecated(*args):
234   """cvQueryFrame__Deprecated(CvCapture capture)"""
235   return _highgui.cvQueryFrame__Deprecated(*args)
236 CV_CAP_PROP_POS_MSEC = _highgui.CV_CAP_PROP_POS_MSEC
237 CV_CAP_PROP_POS_FRAMES = _highgui.CV_CAP_PROP_POS_FRAMES
238 CV_CAP_PROP_POS_AVI_RATIO = _highgui.CV_CAP_PROP_POS_AVI_RATIO
239 CV_CAP_PROP_FRAME_WIDTH = _highgui.CV_CAP_PROP_FRAME_WIDTH
240 CV_CAP_PROP_FRAME_HEIGHT = _highgui.CV_CAP_PROP_FRAME_HEIGHT
241 CV_CAP_PROP_FPS = _highgui.CV_CAP_PROP_FPS
242 CV_CAP_PROP_FOURCC = _highgui.CV_CAP_PROP_FOURCC
243 CV_CAP_PROP_FRAME_COUNT = _highgui.CV_CAP_PROP_FRAME_COUNT
244 CV_CAP_PROP_FORMAT = _highgui.CV_CAP_PROP_FORMAT
245 CV_CAP_PROP_MODE = _highgui.CV_CAP_PROP_MODE
246 CV_CAP_PROP_BRIGHTNESS = _highgui.CV_CAP_PROP_BRIGHTNESS
247 CV_CAP_PROP_CONTRAST = _highgui.CV_CAP_PROP_CONTRAST
248 CV_CAP_PROP_SATURATION = _highgui.CV_CAP_PROP_SATURATION
249 CV_CAP_PROP_HUE = _highgui.CV_CAP_PROP_HUE
250 CV_CAP_PROP_GAIN = _highgui.CV_CAP_PROP_GAIN
251 CV_CAP_PROP_CONVERT_RGB = _highgui.CV_CAP_PROP_CONVERT_RGB
252
253 def cvGetCaptureProperty(*args):
254   """cvGetCaptureProperty(CvCapture capture, int property_id) -> double"""
255   return _highgui.cvGetCaptureProperty(*args)
256
257 def cvSetCaptureProperty(*args):
258   """cvSetCaptureProperty(CvCapture capture, int property_id, double value) -> int"""
259   return _highgui.cvSetCaptureProperty(*args)
260 CV_FOURCC_PROMPT = _highgui.CV_FOURCC_PROMPT
261 CV_FOURCC_DEFAULT = _highgui.CV_FOURCC_DEFAULT
262
263 def cvCreateVideoWriter(*args):
264   """
265     cvCreateVideoWriter(char filename, int fourcc, double fps, CvSize frame_size, 
266         int is_color=1) -> CvVideoWriter
267     """
268   return _highgui.cvCreateVideoWriter(*args)
269
270 def cvWriteFrame(*args):
271   """cvWriteFrame(CvVideoWriter writer,  image) -> int"""
272   return _highgui.cvWriteFrame(*args)
273 HG_AUTOSIZE = _highgui.HG_AUTOSIZE
274 class CvvImage(_object):
275     """Proxy of C++ CvvImage class"""
276     __swig_setmethods__ = {}
277     __setattr__ = lambda self, name, value: _swig_setattr(self, CvvImage, name, value)
278     __swig_getmethods__ = {}
279     __getattr__ = lambda self, name: _swig_getattr(self, CvvImage, name)
280     __repr__ = _swig_repr
281     def __init__(self, *args): 
282         """__init__(self) -> CvvImage"""
283         this = _highgui.new_CvvImage(*args)
284         try: self.this.append(this)
285         except: self.this = this
286     __swig_destroy__ = _highgui.delete_CvvImage
287     __del__ = lambda self : None;
288     def Create(*args):
289         """
290         Create(self, int width, int height, int bits_per_pixel, int image_origin=0) -> bool
291         Create(self, int width, int height, int bits_per_pixel) -> bool
292         """
293         return _highgui.CvvImage_Create(*args)
294
295     def Load(*args):
296         """
297         Load(self, char filename, int desired_color=1) -> bool
298         Load(self, char filename) -> bool
299         """
300         return _highgui.CvvImage_Load(*args)
301
302     def LoadRect(*args):
303         """LoadRect(self, char filename, int desired_color, CvRect r) -> bool"""
304         return _highgui.CvvImage_LoadRect(*args)
305
306     def Save(*args):
307         """Save(self, char filename) -> bool"""
308         return _highgui.CvvImage_Save(*args)
309
310     def CopyOf(*args):
311         """
312         CopyOf(self, CvvImage image, int desired_color=-1)
313         CopyOf(self, CvvImage image)
314         CopyOf(self,  img, int desired_color=-1)
315         CopyOf(self,  img)
316         """
317         return _highgui.CvvImage_CopyOf(*args)
318
319     def GetImage(*args):
320         """GetImage(self)"""
321         return _highgui.CvvImage_GetImage(*args)
322
323     def Destroy(*args):
324         """Destroy(self)"""
325         return _highgui.CvvImage_Destroy(*args)
326
327     def Width(*args):
328         """Width(self) -> int"""
329         return _highgui.CvvImage_Width(*args)
330
331     def Height(*args):
332         """Height(self) -> int"""
333         return _highgui.CvvImage_Height(*args)
334
335     def Bpp(*args):
336         """Bpp(self) -> int"""
337         return _highgui.CvvImage_Bpp(*args)
338
339     def Fill(*args):
340         """Fill(self, int color)"""
341         return _highgui.CvvImage_Fill(*args)
342
343     def Show(*args):
344         """Show(self, char window)"""
345         return _highgui.CvvImage_Show(*args)
346
347 CvvImage_swigregister = _highgui.CvvImage_swigregister
348 CvvImage_swigregister(CvvImage)
349 cvSetMouseCallback = _highgui.cvSetMouseCallback
350 cvWaitKey = _highgui.cvWaitKey
351
352 def cvLoadImage(*args):
353   """
354     cvLoadImage(char filename, int iscolor=1) -> CvMat
355     cvLoadImage(char filename) -> CvMat
356     """
357   return _highgui.cvLoadImage(*args)
358
359 __doc__ = """HighGUI provides minimalistic user interface parts and video input/output.
360
361 Dependent on the platform it was compiled on, this library provides methods
362 to draw a window for image display, capture video from a camera or framegrabber
363 or read/write video streams from/to the file system.
364
365 This wrapper was semi-automatically created from the C/C++ headers and therefore
366 contains no Python documentation. Because all identifiers are identical to their
367 C/C++ counterparts, you can consult the standard manuals that come with OpenCV.
368 """
369
370
371
372