1 /*M///////////////////////////////////////////////////////////////////////////////////////
3 // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
5 // By downloading, copying, installing or using the software you agree to this license.
6 // If you do not agree to this license, do not download, install,
7 // copy or use the software.
11 // For Open Source Computer Vision Library
13 // Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
14 // Copyright (C) 2009, Willow Garage Inc., all rights reserved.
15 // Third party copyrights are property of their respective owners.
17 // Redistribution and use in source and binary forms, with or without modification,
18 // are permitted provided that the following conditions are met:
20 // * Redistribution's of source code must retain the above copyright notice,
21 // this list of conditions and the following disclaimer.
23 // * Redistribution's in binary form must reproduce the above copyright notice,
24 // this list of conditions and the following disclaimer in the documentation
25 // and/or other materials provided with the distribution.
27 // * The name of the copyright holders may not be used to endorse or promote products
28 // derived from this software without specific prior written permission.
30 // This software is provided by the copyright holders and contributors "as is" and
31 // any express or implied warranties, including, but not limited to, the implied
32 // warranties of merchantability and fitness for a particular purpose are disclaimed.
33 // In no event shall the Intel Corporation or contributors be liable for any direct,
34 // indirect, incidental, special, exemplary, or consequential damages
35 // (including, but not limited to, procurement of substitute goods or services;
36 // loss of use, data, or profits; or business interruption) however caused
37 // and on any theory of liability, whether in contract, strict liability,
38 // or tort (including negligence or otherwise) arising in any way out of
39 // the use of this software, even if advised of the possibility of such damage.
43 #ifndef __OPENCV_HIGHGUI_HPP__
44 #define __OPENCV_HIGHGUI_HPP__
46 #include "opencv2/core.hpp"
49 ///////////////////////// graphical user interface //////////////////////////
53 // Flags for namedWindow
54 enum { WINDOW_NORMAL = 0x00000000, // the user can resize the window (no constraint) / also use to switch a fullscreen window to a normal size
55 WINDOW_AUTOSIZE = 0x00000001, // the user cannot resize the window, the size is constrainted by the image displayed
56 WINDOW_OPENGL = 0x00001000, // window with opengl support
58 WINDOW_FULLSCREEN = 1, // change the window to fullscreen
59 WINDOW_FREERATIO = 0x00000100, // the image expends as much as it can (no ratio constraint)
60 WINDOW_KEEPRATIO = 0x00000000 // the ratio of the image is respected
63 // Flags for set / getWindowProperty
64 enum { WND_PROP_FULLSCREEN = 0, // fullscreen property (can be WINDOW_NORMAL or WINDOW_FULLSCREEN)
65 WND_PROP_AUTOSIZE = 1, // autosize property (can be WINDOW_NORMAL or WINDOW_AUTOSIZE)
66 WND_PROP_ASPECT_RATIO = 2, // window's aspect ration (can be set to WINDOW_FREERATIO or WINDOW_KEEPRATIO);
67 WND_PROP_OPENGL = 3 // opengl support
70 enum { EVENT_MOUSEMOVE = 0,
71 EVENT_LBUTTONDOWN = 1,
72 EVENT_RBUTTONDOWN = 2,
73 EVENT_MBUTTONDOWN = 3,
77 EVENT_LBUTTONDBLCLK = 7,
78 EVENT_RBUTTONDBLCLK = 8,
79 EVENT_MBUTTONDBLCLK = 9,
80 EVENT_MOUSEWHEEL = 10,
81 EVENT_MOUSEHWHEEL = 11
84 enum { EVENT_FLAG_LBUTTON = 1,
85 EVENT_FLAG_RBUTTON = 2,
86 EVENT_FLAG_MBUTTON = 4,
87 EVENT_FLAG_CTRLKEY = 8,
88 EVENT_FLAG_SHIFTKEY = 16,
89 EVENT_FLAG_ALTKEY = 32
93 enum { QT_FONT_LIGHT = 25, //QFont::Light,
94 QT_FONT_NORMAL = 50, //QFont::Normal,
95 QT_FONT_DEMIBOLD = 63, //QFont::DemiBold,
96 QT_FONT_BOLD = 75, //QFont::Bold,
97 QT_FONT_BLACK = 87 //QFont::Black
101 enum { QT_STYLE_NORMAL = 0, //QFont::StyleNormal,
102 QT_STYLE_ITALIC = 1, //QFont::StyleItalic,
103 QT_STYLE_OBLIQUE = 2 //QFont::StyleOblique
107 enum { QT_PUSH_BUTTON = 0,
113 typedef void (*MouseCallback)(int event, int x, int y, int flags, void* userdata);
114 typedef void (*TrackbarCallback)(int pos, void* userdata);
115 typedef void (*OpenGlDrawCallback)(void* userdata);
116 typedef void (*ButtonCallback)(int state, void* userdata);
119 CV_EXPORTS_W void namedWindow(const String& winname, int flags = WINDOW_AUTOSIZE);
121 CV_EXPORTS_W void destroyWindow(const String& winname);
123 CV_EXPORTS_W void destroyAllWindows();
125 CV_EXPORTS_W int startWindowThread();
127 CV_EXPORTS_W int waitKey(int delay = 0);
129 CV_EXPORTS_W void imshow(const String& winname, InputArray mat);
131 CV_EXPORTS_W void resizeWindow(const String& winname, int width, int height);
133 CV_EXPORTS_W void moveWindow(const String& winname, int x, int y);
135 CV_EXPORTS_W void setWindowProperty(const String& winname, int prop_id, double prop_value);
137 CV_EXPORTS_W double getWindowProperty(const String& winname, int prop_id);
139 //! assigns callback for mouse events
140 CV_EXPORTS void setMouseCallback(const String& winname, MouseCallback onMouse, void* userdata = 0);
142 CV_EXPORTS int getMouseWheelDelta(int flags);
144 CV_EXPORTS int createTrackbar(const String& trackbarname, const String& winname,
145 int* value, int count,
146 TrackbarCallback onChange = 0,
149 CV_EXPORTS_W int getTrackbarPos(const String& trackbarname, const String& winname);
151 CV_EXPORTS_W void setTrackbarPos(const String& trackbarname, const String& winname, int pos);
155 CV_EXPORTS void imshow(const String& winname, const ogl::Texture2D& tex);
157 CV_EXPORTS void setOpenGlDrawCallback(const String& winname, OpenGlDrawCallback onOpenGlDraw, void* userdata = 0);
159 CV_EXPORTS void setOpenGlContext(const String& winname);
161 CV_EXPORTS void updateWindow(const String& winname);
168 const char* nameFont; // Qt: nameFont
169 Scalar color; // Qt: ColorFont -> cvScalar(blue_component, green_component, red\_component[, alpha_component])
170 int font_face; // Qt: bool italic
171 const int* ascii; // font data and metrics
174 float hscale, vscale;
175 float shear; // slope coefficient: 0 - normal, >0 - italic
176 int thickness; // Qt: weight
177 float dx; // horizontal interval between letters
178 int line_type; // Qt: PointSize
181 CV_EXPORTS QtFont fontQt(const String& nameFont, int pointSize = -1,
182 Scalar color = Scalar::all(0), int weight = QT_FONT_NORMAL,
183 int style = QT_STYLE_NORMAL, int spacing = 0);
185 CV_EXPORTS void addText( const Mat& img, const String& text, Point org, const QtFont& font);
187 CV_EXPORTS void displayOverlay(const String& winname, const String& text, int delayms = 0);
189 CV_EXPORTS void displayStatusBar(const String& winname, const String& text, int delayms = 0);
191 CV_EXPORTS void saveWindowParameters(const String& windowName);
193 CV_EXPORTS void loadWindowParameters(const String& windowName);
195 CV_EXPORTS int startLoop(int (*pt2Func)(int argc, char *argv[]), int argc, char* argv[]);
197 CV_EXPORTS void stopLoop();
199 CV_EXPORTS int createButton( const String& bar_name, ButtonCallback on_change,
200 void* userdata = 0, int type = QT_PUSH_BUTTON,
201 bool initial_button_state = false);
205 ////////////////////////////////// video io /////////////////////////////////
207 typedef struct CvCapture CvCapture;
208 typedef struct CvVideoWriter CvVideoWriter;
214 enum { CAP_ANY = 0, // autodetect
215 CAP_VFW = 200, // platform native
218 CAP_FIREWARE = 300, // IEEE 1394 drivers
219 CAP_FIREWIRE = CAP_FIREWARE,
220 CAP_IEEE1394 = CAP_FIREWARE,
221 CAP_DC1394 = CAP_FIREWARE,
222 CAP_CMU1394 = CAP_FIREWARE,
223 CAP_QT = 500, // QuickTime
224 CAP_UNICAP = 600, // Unicap drivers
225 CAP_DSHOW = 700, // DirectShow (via videoInput)
226 CAP_PVAPI = 800, // PvAPI, Prosilica GigE SDK
227 CAP_OPENNI = 900, // OpenNI (for Kinect)
228 CAP_OPENNI_ASUS = 910, // OpenNI (for Asus Xtion)
229 CAP_ANDROID = 1000, // Android
230 CAP_XIAPI = 1100, // XIMEA Camera API
231 CAP_AVFOUNDATION = 1200, // AVFoundation framework for iOS (OS X Lion will have the same API)
232 CAP_GIGANETIX = 1300, // Smartek Giganetix GigEVisionSDK
233 CAP_MSMF = 1400, // Microsoft Media Foundation (via videoInput)
234 CAP_INTELPERC = 1500, // Intel Perceptual Computing SDK
235 CAP_OPENNI2 = 1600 // OpenNI2 (for Kinect)
238 // generic properties (based on DC1394 properties)
239 enum { CAP_PROP_POS_MSEC =0,
240 CAP_PROP_POS_FRAMES =1,
241 CAP_PROP_POS_AVI_RATIO =2,
242 CAP_PROP_FRAME_WIDTH =3,
243 CAP_PROP_FRAME_HEIGHT =4,
246 CAP_PROP_FRAME_COUNT =7,
249 CAP_PROP_BRIGHTNESS =10,
250 CAP_PROP_CONTRAST =11,
251 CAP_PROP_SATURATION =12,
254 CAP_PROP_EXPOSURE =15,
255 CAP_PROP_CONVERT_RGB =16,
256 CAP_PROP_WHITE_BALANCE_BLUE_U =17,
257 CAP_PROP_RECTIFICATION =18,
258 CAP_PROP_MONOCROME =19,
259 CAP_PROP_SHARPNESS =20,
260 CAP_PROP_AUTO_EXPOSURE =21, // DC1394: exposure control done by camera, user can adjust refernce level using this feature
262 CAP_PROP_TEMPERATURE =23,
263 CAP_PROP_TRIGGER =24,
264 CAP_PROP_TRIGGER_DELAY =25,
265 CAP_PROP_WHITE_BALANCE_RED_V =26,
269 CAP_PROP_ISO_SPEED =30,
270 CAP_PROP_BACKLIGHT =32,
275 CAP_PROP_SETTINGS =37
280 // modes of the controlling registers (can be: auto, manual, auto single push, absolute Latter allowed with any other mode)
281 // every feature can have only one mode turned on at a time
282 enum { CAP_PROP_DC1394_OFF = -4, //turn the feature off (not controlled manually nor automatically)
283 CAP_PROP_DC1394_MODE_MANUAL = -3, //set automatically when a value of the feature is set by the user
284 CAP_PROP_DC1394_MODE_AUTO = -2,
285 CAP_PROP_DC1394_MODE_ONE_PUSH_AUTO = -1,
286 CAP_PROP_DC1394_MAX = 31
290 // OpenNI map generators
291 enum { CAP_OPENNI_DEPTH_GENERATOR = 1 << 31,
292 CAP_OPENNI_IMAGE_GENERATOR = 1 << 30,
293 CAP_OPENNI_GENERATORS_MASK = CAP_OPENNI_DEPTH_GENERATOR + CAP_OPENNI_IMAGE_GENERATOR
296 // Properties of cameras available through OpenNI interfaces
298 CAP_PROP_OPENNI_OUTPUT_MODE = 100,
299 CAP_PROP_OPENNI_FRAME_MAX_DEPTH = 101, // in mm
300 CAP_PROP_OPENNI_BASELINE = 102, // in mm
301 CAP_PROP_OPENNI_FOCAL_LENGTH = 103, // in pixels
302 CAP_PROP_OPENNI_REGISTRATION = 104, // flag that synchronizes the remapping depth map to image map
303 // by changing depth generator's view point (if the flag is "on") or
304 // sets this view point to its normal one (if the flag is "off").
305 CAP_PROP_OPENNI_REGISTRATION_ON = CAP_PROP_OPENNI_REGISTRATION,
306 CAP_PROP_OPENNI_APPROX_FRAME_SYNC = 105,
307 CAP_PROP_OPENNI_MAX_BUFFER_SIZE = 106,
308 CAP_PROP_OPENNI_CIRCLE_BUFFER = 107,
309 CAP_PROP_OPENNI_MAX_TIME_DURATION = 108,
310 CAP_PROP_OPENNI_GENERATOR_PRESENT = 109,
311 CAP_PROP_OPENNI2_SYNC = 110,
312 CAP_PROP_OPENNI2_MIRROR = 111
316 enum { CAP_OPENNI_IMAGE_GENERATOR_PRESENT = CAP_OPENNI_IMAGE_GENERATOR + CAP_PROP_OPENNI_GENERATOR_PRESENT,
317 CAP_OPENNI_IMAGE_GENERATOR_OUTPUT_MODE = CAP_OPENNI_IMAGE_GENERATOR + CAP_PROP_OPENNI_OUTPUT_MODE,
318 CAP_OPENNI_DEPTH_GENERATOR_BASELINE = CAP_OPENNI_DEPTH_GENERATOR + CAP_PROP_OPENNI_BASELINE,
319 CAP_OPENNI_DEPTH_GENERATOR_FOCAL_LENGTH = CAP_OPENNI_DEPTH_GENERATOR + CAP_PROP_OPENNI_FOCAL_LENGTH,
320 CAP_OPENNI_DEPTH_GENERATOR_REGISTRATION = CAP_OPENNI_DEPTH_GENERATOR + CAP_PROP_OPENNI_REGISTRATION,
321 CAP_OPENNI_DEPTH_GENERATOR_REGISTRATION_ON = CAP_OPENNI_DEPTH_GENERATOR_REGISTRATION
324 // OpenNI data given from depth generator
325 enum { CAP_OPENNI_DEPTH_MAP = 0, // Depth values in mm (CV_16UC1)
326 CAP_OPENNI_POINT_CLOUD_MAP = 1, // XYZ in meters (CV_32FC3)
327 CAP_OPENNI_DISPARITY_MAP = 2, // Disparity in pixels (CV_8UC1)
328 CAP_OPENNI_DISPARITY_MAP_32F = 3, // Disparity in pixels (CV_32FC1)
329 CAP_OPENNI_VALID_DEPTH_MASK = 4, // CV_8UC1
331 // Data given from RGB image generator
332 CAP_OPENNI_BGR_IMAGE = 5,
333 CAP_OPENNI_GRAY_IMAGE = 6
336 // Supported output modes of OpenNI image generator
337 enum { CAP_OPENNI_VGA_30HZ = 0,
338 CAP_OPENNI_SXGA_15HZ = 1,
339 CAP_OPENNI_SXGA_30HZ = 2,
340 CAP_OPENNI_QVGA_30HZ = 3,
341 CAP_OPENNI_QVGA_60HZ = 4
346 enum { CAP_PROP_GSTREAMER_QUEUE_LENGTH = 200 // default is 1
351 enum { CAP_PROP_PVAPI_MULTICASTIP = 300, // ip for anable multicast master mode. 0 for disable multicast
352 CAP_PROP_PVAPI_FRAMESTARTTRIGGERMODE = 301 // FrameStartTriggerMode: Determines how a frame is initiated
355 // PVAPI: FrameStartTriggerMode
356 enum { CAP_PVAPI_FSTRIGMODE_FREERUN = 0, // Freerun
357 CAP_PVAPI_FSTRIGMODE_SYNCIN1 = 1, // SyncIn1
358 CAP_PVAPI_FSTRIGMODE_SYNCIN2 = 2, // SyncIn2
359 CAP_PVAPI_FSTRIGMODE_FIXEDRATE = 3, // FixedRate
360 CAP_PVAPI_FSTRIGMODE_SOFTWARE = 4 // Software
363 // Properties of cameras available through XIMEA SDK interface
364 enum { CAP_PROP_XI_DOWNSAMPLING = 400, // Change image resolution by binning or skipping.
365 CAP_PROP_XI_DATA_FORMAT = 401, // Output data format.
366 CAP_PROP_XI_OFFSET_X = 402, // Horizontal offset from the origin to the area of interest (in pixels).
367 CAP_PROP_XI_OFFSET_Y = 403, // Vertical offset from the origin to the area of interest (in pixels).
368 CAP_PROP_XI_TRG_SOURCE = 404, // Defines source of trigger.
369 CAP_PROP_XI_TRG_SOFTWARE = 405, // Generates an internal trigger. PRM_TRG_SOURCE must be set to TRG_SOFTWARE.
370 CAP_PROP_XI_GPI_SELECTOR = 406, // Selects general purpose input
371 CAP_PROP_XI_GPI_MODE = 407, // Set general purpose input mode
372 CAP_PROP_XI_GPI_LEVEL = 408, // Get general purpose level
373 CAP_PROP_XI_GPO_SELECTOR = 409, // Selects general purpose output
374 CAP_PROP_XI_GPO_MODE = 410, // Set general purpose output mode
375 CAP_PROP_XI_LED_SELECTOR = 411, // Selects camera signalling LED
376 CAP_PROP_XI_LED_MODE = 412, // Define camera signalling LED functionality
377 CAP_PROP_XI_MANUAL_WB = 413, // Calculates White Balance(must be called during acquisition)
378 CAP_PROP_XI_AUTO_WB = 414, // Automatic white balance
379 CAP_PROP_XI_AEAG = 415, // Automatic exposure/gain
380 CAP_PROP_XI_EXP_PRIORITY = 416, // Exposure priority (0.5 - exposure 50%, gain 50%).
381 CAP_PROP_XI_AE_MAX_LIMIT = 417, // Maximum limit of exposure in AEAG procedure
382 CAP_PROP_XI_AG_MAX_LIMIT = 418, // Maximum limit of gain in AEAG procedure
383 CAP_PROP_XI_AEAG_LEVEL = 419, // Average intensity of output signal AEAG should achieve(in %)
384 CAP_PROP_XI_TIMEOUT = 420 // Image capture timeout in milliseconds
388 // Properties for Android cameras
389 enum { CAP_PROP_ANDROID_AUTOGRAB = 1024,
390 CAP_PROP_ANDROID_PREVIEW_SIZES_STRING = 1025, // readonly, tricky property, returns const char* indeed
391 CAP_PROP_ANDROID_PREVIEW_FORMAT = 1026, // readonly, tricky property, returns const char* indeed
392 CAP_PROP_ANDROID_FLASH_MODE = 8001,
393 CAP_PROP_ANDROID_FOCUS_MODE = 8002,
394 CAP_PROP_ANDROID_WHITE_BALANCE = 8003,
395 CAP_PROP_ANDROID_ANTIBANDING = 8004,
396 CAP_PROP_ANDROID_FOCAL_LENGTH = 8005,
397 CAP_PROP_ANDROID_FOCUS_DISTANCE_NEAR = 8006,
398 CAP_PROP_ANDROID_FOCUS_DISTANCE_OPTIMAL = 8007,
399 CAP_PROP_ANDROID_FOCUS_DISTANCE_FAR = 8008
403 // Android camera output formats
404 enum { CAP_ANDROID_COLOR_FRAME_BGR = 0, //BGR
405 CAP_ANDROID_COLOR_FRAME = CAP_ANDROID_COLOR_FRAME_BGR,
406 CAP_ANDROID_GREY_FRAME = 1, //Y
407 CAP_ANDROID_COLOR_FRAME_RGB = 2,
408 CAP_ANDROID_COLOR_FRAME_BGRA = 3,
409 CAP_ANDROID_COLOR_FRAME_RGBA = 4
413 // Android camera flash modes
414 enum { CAP_ANDROID_FLASH_MODE_AUTO = 0,
415 CAP_ANDROID_FLASH_MODE_OFF = 1,
416 CAP_ANDROID_FLASH_MODE_ON = 2,
417 CAP_ANDROID_FLASH_MODE_RED_EYE = 3,
418 CAP_ANDROID_FLASH_MODE_TORCH = 4
422 // Android camera focus modes
423 enum { CAP_ANDROID_FOCUS_MODE_AUTO = 0,
424 CAP_ANDROID_FOCUS_MODE_CONTINUOUS_VIDEO = 1,
425 CAP_ANDROID_FOCUS_MODE_EDOF = 2,
426 CAP_ANDROID_FOCUS_MODE_FIXED = 3,
427 CAP_ANDROID_FOCUS_MODE_INFINITY = 4,
428 CAP_ANDROID_FOCUS_MODE_MACRO = 5
432 // Android camera white balance modes
433 enum { CAP_ANDROID_WHITE_BALANCE_AUTO = 0,
434 CAP_ANDROID_WHITE_BALANCE_CLOUDY_DAYLIGHT = 1,
435 CAP_ANDROID_WHITE_BALANCE_DAYLIGHT = 2,
436 CAP_ANDROID_WHITE_BALANCE_FLUORESCENT = 3,
437 CAP_ANDROID_WHITE_BALANCE_INCANDESCENT = 4,
438 CAP_ANDROID_WHITE_BALANCE_SHADE = 5,
439 CAP_ANDROID_WHITE_BALANCE_TWILIGHT = 6,
440 CAP_ANDROID_WHITE_BALANCE_WARM_FLUORESCENT = 7
444 // Android camera antibanding modes
445 enum { CAP_ANDROID_ANTIBANDING_50HZ = 0,
446 CAP_ANDROID_ANTIBANDING_60HZ = 1,
447 CAP_ANDROID_ANTIBANDING_AUTO = 2,
448 CAP_ANDROID_ANTIBANDING_OFF = 3
452 // Properties of cameras available through AVFOUNDATION interface
453 enum { CAP_PROP_IOS_DEVICE_FOCUS = 9001,
454 CAP_PROP_IOS_DEVICE_EXPOSURE = 9002,
455 CAP_PROP_IOS_DEVICE_FLASH = 9003,
456 CAP_PROP_IOS_DEVICE_WHITEBALANCE = 9004,
457 CAP_PROP_IOS_DEVICE_TORCH = 9005
461 // Properties of cameras available through Smartek Giganetix Ethernet Vision interface
462 /* --- Vladimir Litvinenko (litvinenko.vladimir@gmail.com) --- */
463 enum { CAP_PROP_GIGA_FRAME_OFFSET_X = 10001,
464 CAP_PROP_GIGA_FRAME_OFFSET_Y = 10002,
465 CAP_PROP_GIGA_FRAME_WIDTH_MAX = 10003,
466 CAP_PROP_GIGA_FRAME_HEIGH_MAX = 10004,
467 CAP_PROP_GIGA_FRAME_SENS_WIDTH = 10005,
468 CAP_PROP_GIGA_FRAME_SENS_HEIGH = 10006
471 enum { CAP_PROP_INTELPERC_PROFILE_COUNT = 11001,
472 CAP_PROP_INTELPERC_PROFILE_IDX = 11002,
473 CAP_PROP_INTELPERC_DEPTH_LOW_CONFIDENCE_VALUE = 11003,
474 CAP_PROP_INTELPERC_DEPTH_SATURATION_VALUE = 11004,
475 CAP_PROP_INTELPERC_DEPTH_CONFIDENCE_THRESHOLD = 11005,
476 CAP_PROP_INTELPERC_DEPTH_FOCAL_LENGTH_HORZ = 11006,
477 CAP_PROP_INTELPERC_DEPTH_FOCAL_LENGTH_VERT = 11007
480 // Intel PerC streams
481 enum { CAP_INTELPERC_DEPTH_GENERATOR = 1 << 29,
482 CAP_INTELPERC_IMAGE_GENERATOR = 1 << 28,
483 CAP_INTELPERC_GENERATORS_MASK = CAP_INTELPERC_DEPTH_GENERATOR + CAP_INTELPERC_IMAGE_GENERATOR
486 enum { CAP_INTELPERC_DEPTH_MAP = 0, // Each pixel is a 16-bit integer. The value indicates the distance from an object to the camera's XY plane or the Cartesian depth.
487 CAP_INTELPERC_UVDEPTH_MAP = 1, // Each pixel contains two 32-bit floating point values in the range of 0-1, representing the mapping of depth coordinates to the color coordinates.
488 CAP_INTELPERC_IR_MAP = 2, // Each pixel is a 16-bit integer. The value indicates the intensity of the reflected laser beam.
489 CAP_INTELPERC_IMAGE = 3
494 class CV_EXPORTS_W VideoCapture
497 CV_WRAP VideoCapture();
498 CV_WRAP VideoCapture(const String& filename);
499 CV_WRAP VideoCapture(int device);
501 virtual ~VideoCapture();
502 CV_WRAP virtual bool open(const String& filename);
503 CV_WRAP virtual bool open(int device);
504 CV_WRAP virtual bool isOpened() const;
505 CV_WRAP virtual void release();
507 CV_WRAP virtual bool grab();
508 CV_WRAP virtual bool retrieve(OutputArray image, int flag = 0);
509 virtual VideoCapture& operator >> (CV_OUT Mat& image);
510 virtual VideoCapture& operator >> (CV_OUT UMat& image);
511 CV_WRAP virtual bool read(OutputArray image);
513 CV_WRAP virtual bool set(int propId, double value);
514 CV_WRAP virtual double get(int propId);
518 Ptr<IVideoCapture> icap;
520 static Ptr<IVideoCapture> createCameraCapture(int index);
523 class CV_EXPORTS_W VideoWriter
526 CV_WRAP VideoWriter();
527 CV_WRAP VideoWriter(const String& filename, int fourcc, double fps,
528 Size frameSize, bool isColor = true);
530 virtual ~VideoWriter();
531 CV_WRAP virtual bool open(const String& filename, int fourcc, double fps,
532 Size frameSize, bool isColor = true);
533 CV_WRAP virtual bool isOpened() const;
534 CV_WRAP virtual void release();
535 virtual VideoWriter& operator << (const Mat& image);
536 CV_WRAP virtual void write(const Mat& image);
538 CV_WRAP static int fourcc(char c1, char c2, char c3, char c4);
541 Ptr<CvVideoWriter> writer;
544 template<> CV_EXPORTS void DefaultDeleter<CvCapture>::operator ()(CvCapture* obj) const;
545 template<> CV_EXPORTS void DefaultDeleter<CvVideoWriter>::operator ()(CvVideoWriter* obj) const;