Update the trunk to the OpenCV's CVS (2008-07-14)
[opencv] / interfaces / swig / python / highgui.py
1 # This file was automatically generated by SWIG (http://www.swig.org).
2 # Version 1.3.35
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_FIREWIRE = _highgui.CV_CAP_FIREWIRE
211 CV_CAP_IEEE1394 = _highgui.CV_CAP_IEEE1394
212 CV_CAP_DC1394 = _highgui.CV_CAP_DC1394
213 CV_CAP_CMU1394 = _highgui.CV_CAP_CMU1394
214 CV_CAP_STEREO = _highgui.CV_CAP_STEREO
215 CV_CAP_TYZX = _highgui.CV_CAP_TYZX
216 CV_TYZX_LEFT = _highgui.CV_TYZX_LEFT
217 CV_TYZX_RIGHT = _highgui.CV_TYZX_RIGHT
218 CV_TYZX_COLOR = _highgui.CV_TYZX_COLOR
219 CV_TYZX_Z = _highgui.CV_TYZX_Z
220 CV_CAP_QT = _highgui.CV_CAP_QT
221 CV_CAP_UNICAP = _highgui.CV_CAP_UNICAP
222
223 def cvCreateCameraCapture(*args):
224   """cvCreateCameraCapture(int index) -> CvCapture"""
225   return _highgui.cvCreateCameraCapture(*args)
226
227 def cvGrabFrame(*args):
228   """cvGrabFrame(CvCapture capture) -> int"""
229   return _highgui.cvGrabFrame(*args)
230
231 def cvRetrieveFrame__Deprecated(*args):
232   """cvRetrieveFrame__Deprecated(CvCapture capture)"""
233   return _highgui.cvRetrieveFrame__Deprecated(*args)
234
235 def cvQueryFrame__Deprecated(*args):
236   """cvQueryFrame__Deprecated(CvCapture capture)"""
237   return _highgui.cvQueryFrame__Deprecated(*args)
238 CV_CAP_PROP_POS_MSEC = _highgui.CV_CAP_PROP_POS_MSEC
239 CV_CAP_PROP_POS_FRAMES = _highgui.CV_CAP_PROP_POS_FRAMES
240 CV_CAP_PROP_POS_AVI_RATIO = _highgui.CV_CAP_PROP_POS_AVI_RATIO
241 CV_CAP_PROP_FRAME_WIDTH = _highgui.CV_CAP_PROP_FRAME_WIDTH
242 CV_CAP_PROP_FRAME_HEIGHT = _highgui.CV_CAP_PROP_FRAME_HEIGHT
243 CV_CAP_PROP_FPS = _highgui.CV_CAP_PROP_FPS
244 CV_CAP_PROP_FOURCC = _highgui.CV_CAP_PROP_FOURCC
245 CV_CAP_PROP_FRAME_COUNT = _highgui.CV_CAP_PROP_FRAME_COUNT
246 CV_CAP_PROP_FORMAT = _highgui.CV_CAP_PROP_FORMAT
247 CV_CAP_PROP_MODE = _highgui.CV_CAP_PROP_MODE
248 CV_CAP_PROP_BRIGHTNESS = _highgui.CV_CAP_PROP_BRIGHTNESS
249 CV_CAP_PROP_CONTRAST = _highgui.CV_CAP_PROP_CONTRAST
250 CV_CAP_PROP_SATURATION = _highgui.CV_CAP_PROP_SATURATION
251 CV_CAP_PROP_HUE = _highgui.CV_CAP_PROP_HUE
252 CV_CAP_PROP_GAIN = _highgui.CV_CAP_PROP_GAIN
253 CV_CAP_PROP_CONVERT_RGB = _highgui.CV_CAP_PROP_CONVERT_RGB
254
255 def cvGetCaptureProperty(*args):
256   """cvGetCaptureProperty(CvCapture capture, int property_id) -> double"""
257   return _highgui.cvGetCaptureProperty(*args)
258
259 def cvSetCaptureProperty(*args):
260   """cvSetCaptureProperty(CvCapture capture, int property_id, double value) -> int"""
261   return _highgui.cvSetCaptureProperty(*args)
262 CV_FOURCC_PROMPT = _highgui.CV_FOURCC_PROMPT
263 CV_FOURCC_DEFAULT = _highgui.CV_FOURCC_DEFAULT
264
265 def cvCreateVideoWriter(*args):
266   """
267     cvCreateVideoWriter(char filename, int fourcc, double fps, CvSize frame_size, 
268         int is_color=1) -> CvVideoWriter
269     """
270   return _highgui.cvCreateVideoWriter(*args)
271
272 def cvWriteFrame(*args):
273   """cvWriteFrame(CvVideoWriter writer,  image) -> int"""
274   return _highgui.cvWriteFrame(*args)
275 HG_AUTOSIZE = _highgui.HG_AUTOSIZE
276 class CvvImage(_object):
277     """Proxy of C++ CvvImage class"""
278     __swig_setmethods__ = {}
279     __setattr__ = lambda self, name, value: _swig_setattr(self, CvvImage, name, value)
280     __swig_getmethods__ = {}
281     __getattr__ = lambda self, name: _swig_getattr(self, CvvImage, name)
282     __repr__ = _swig_repr
283     def __init__(self, *args): 
284         """__init__(self) -> CvvImage"""
285         this = _highgui.new_CvvImage(*args)
286         try: self.this.append(this)
287         except: self.this = this
288     __swig_destroy__ = _highgui.delete_CvvImage
289     __del__ = lambda self : None;
290     def Create(*args):
291         """
292         Create(self, int width, int height, int bits_per_pixel, int image_origin=0) -> bool
293         Create(self, int width, int height, int bits_per_pixel) -> bool
294         """
295         return _highgui.CvvImage_Create(*args)
296
297     def Load(*args):
298         """
299         Load(self, char filename, int desired_color=1) -> bool
300         Load(self, char filename) -> bool
301         """
302         return _highgui.CvvImage_Load(*args)
303
304     def LoadRect(*args):
305         """LoadRect(self, char filename, int desired_color, CvRect r) -> bool"""
306         return _highgui.CvvImage_LoadRect(*args)
307
308     def Save(*args):
309         """Save(self, char filename) -> bool"""
310         return _highgui.CvvImage_Save(*args)
311
312     def CopyOf(*args):
313         """
314         CopyOf(self, CvvImage image, int desired_color=-1)
315         CopyOf(self, CvvImage image)
316         CopyOf(self,  img, int desired_color=-1)
317         CopyOf(self,  img)
318         """
319         return _highgui.CvvImage_CopyOf(*args)
320
321     def GetImage(*args):
322         """GetImage(self)"""
323         return _highgui.CvvImage_GetImage(*args)
324
325     def Destroy(*args):
326         """Destroy(self)"""
327         return _highgui.CvvImage_Destroy(*args)
328
329     def Width(*args):
330         """Width(self) -> int"""
331         return _highgui.CvvImage_Width(*args)
332
333     def Height(*args):
334         """Height(self) -> int"""
335         return _highgui.CvvImage_Height(*args)
336
337     def Bpp(*args):
338         """Bpp(self) -> int"""
339         return _highgui.CvvImage_Bpp(*args)
340
341     def Fill(*args):
342         """Fill(self, int color)"""
343         return _highgui.CvvImage_Fill(*args)
344
345     def Show(*args):
346         """Show(self, char window)"""
347         return _highgui.CvvImage_Show(*args)
348
349 CvvImage_swigregister = _highgui.CvvImage_swigregister
350 CvvImage_swigregister(CvvImage)
351 cvSetMouseCallback = _highgui.cvSetMouseCallback
352 cvWaitKey = _highgui.cvWaitKey
353
354 def cvLoadImage(*args):
355   """
356     cvLoadImage(char filename, int iscolor=1) -> CvMat
357     cvLoadImage(char filename) -> CvMat
358     """
359   return _highgui.cvLoadImage(*args)
360
361 __doc__ = """HighGUI provides minimalistic user interface parts and video input/output.
362
363 Dependent on the platform it was compiled on, this library provides methods
364 to draw a window for image display, capture video from a camera or framegrabber
365 or read/write video streams from/to the file system.
366
367 This wrapper was semi-automatically created from the C/C++ headers and therefore
368 contains no Python documentation. Because all identifiers are identical to their
369 C/C++ counterparts, you can consult the standard manuals that come with OpenCV.
370 """
371
372
373
374