OpenCV  4.5.2
Open Source Computer Vision
Enumerations
Flags related creating and manipulating HighGUI windows and mouse events

Enumerations

enum  cv::MouseEventFlags {
  cv::EVENT_FLAG_LBUTTON = 1,
  cv::EVENT_FLAG_RBUTTON = 2,
  cv::EVENT_FLAG_MBUTTON = 4,
  cv::EVENT_FLAG_CTRLKEY = 8,
  cv::EVENT_FLAG_SHIFTKEY = 16,
  cv::EVENT_FLAG_ALTKEY = 32
}
 Mouse Event Flags see cv::MouseCallback. More...
 
enum  cv::MouseEventTypes {
  cv::EVENT_MOUSEMOVE = 0,
  cv::EVENT_LBUTTONDOWN = 1,
  cv::EVENT_RBUTTONDOWN = 2,
  cv::EVENT_MBUTTONDOWN = 3,
  cv::EVENT_LBUTTONUP = 4,
  cv::EVENT_RBUTTONUP = 5,
  cv::EVENT_MBUTTONUP = 6,
  cv::EVENT_LBUTTONDBLCLK = 7,
  cv::EVENT_RBUTTONDBLCLK = 8,
  cv::EVENT_MBUTTONDBLCLK = 9,
  cv::EVENT_MOUSEWHEEL = 10,
  cv::EVENT_MOUSEHWHEEL = 11
}
 Mouse Events see cv::MouseCallback. More...
 
enum  cv::WindowFlags {
  cv::WINDOW_NORMAL = 0x00000000,
  cv::WINDOW_AUTOSIZE = 0x00000001,
  cv::WINDOW_OPENGL = 0x00001000,
  cv::WINDOW_FULLSCREEN = 1,
  cv::WINDOW_FREERATIO = 0x00000100,
  cv::WINDOW_KEEPRATIO = 0x00000000,
  cv::WINDOW_GUI_EXPANDED =0x00000000,
  cv::WINDOW_GUI_NORMAL = 0x00000010
}
 Flags for cv::namedWindow. More...
 
enum  cv::WindowPropertyFlags {
  cv::WND_PROP_FULLSCREEN = 0,
  cv::WND_PROP_AUTOSIZE = 1,
  cv::WND_PROP_ASPECT_RATIO = 2,
  cv::WND_PROP_OPENGL = 3,
  cv::WND_PROP_VISIBLE = 4,
  cv::WND_PROP_TOPMOST = 5,
  cv::WND_PROP_VSYNC = 6
}
 Flags for cv::setWindowProperty / cv::getWindowProperty. More...
 

Detailed Description

Enumeration Type Documentation

◆ MouseEventFlags

#include <opencv2/highgui.hpp>

Mouse Event Flags see cv::MouseCallback.

Enumerator
EVENT_FLAG_LBUTTON 
Python: cv.EVENT_FLAG_LBUTTON

indicates that the left mouse button is down.

EVENT_FLAG_RBUTTON 
Python: cv.EVENT_FLAG_RBUTTON

indicates that the right mouse button is down.

EVENT_FLAG_MBUTTON 
Python: cv.EVENT_FLAG_MBUTTON

indicates that the middle mouse button is down.

EVENT_FLAG_CTRLKEY 
Python: cv.EVENT_FLAG_CTRLKEY

indicates that CTRL Key is pressed.

EVENT_FLAG_SHIFTKEY 
Python: cv.EVENT_FLAG_SHIFTKEY

indicates that SHIFT Key is pressed.

EVENT_FLAG_ALTKEY 
Python: cv.EVENT_FLAG_ALTKEY

indicates that ALT Key is pressed.

◆ MouseEventTypes

#include <opencv2/highgui.hpp>

Mouse Events see cv::MouseCallback.

Enumerator
EVENT_MOUSEMOVE 
Python: cv.EVENT_MOUSEMOVE

indicates that the mouse pointer has moved over the window.

EVENT_LBUTTONDOWN 
Python: cv.EVENT_LBUTTONDOWN

indicates that the left mouse button is pressed.

EVENT_RBUTTONDOWN 
Python: cv.EVENT_RBUTTONDOWN

indicates that the right mouse button is pressed.

EVENT_MBUTTONDOWN 
Python: cv.EVENT_MBUTTONDOWN

indicates that the middle mouse button is pressed.

EVENT_LBUTTONUP 
Python: cv.EVENT_LBUTTONUP

indicates that left mouse button is released.

EVENT_RBUTTONUP 
Python: cv.EVENT_RBUTTONUP

indicates that right mouse button is released.

EVENT_MBUTTONUP 
Python: cv.EVENT_MBUTTONUP

indicates that middle mouse button is released.

EVENT_LBUTTONDBLCLK 
Python: cv.EVENT_LBUTTONDBLCLK

indicates that left mouse button is double clicked.

EVENT_RBUTTONDBLCLK 
Python: cv.EVENT_RBUTTONDBLCLK

indicates that right mouse button is double clicked.

EVENT_MBUTTONDBLCLK 
Python: cv.EVENT_MBUTTONDBLCLK

indicates that middle mouse button is double clicked.

EVENT_MOUSEWHEEL 
Python: cv.EVENT_MOUSEWHEEL

positive and negative values mean forward and backward scrolling, respectively.

EVENT_MOUSEHWHEEL 
Python: cv.EVENT_MOUSEHWHEEL

positive and negative values mean right and left scrolling, respectively.

◆ WindowFlags

#include <opencv2/highgui.hpp>

Flags for cv::namedWindow.

Enumerator
WINDOW_NORMAL 
Python: cv.WINDOW_NORMAL

the user can resize the window (no constraint) / also use to switch a fullscreen window to a normal size.

WINDOW_AUTOSIZE 
Python: cv.WINDOW_AUTOSIZE

the user cannot resize the window, the size is constrainted by the image displayed.

WINDOW_OPENGL 
Python: cv.WINDOW_OPENGL

window with opengl support.

WINDOW_FULLSCREEN 
Python: cv.WINDOW_FULLSCREEN

change the window to fullscreen.

WINDOW_FREERATIO 
Python: cv.WINDOW_FREERATIO

the image expends as much as it can (no ratio constraint).

WINDOW_KEEPRATIO 
Python: cv.WINDOW_KEEPRATIO

the ratio of the image is respected.

WINDOW_GUI_EXPANDED 
Python: cv.WINDOW_GUI_EXPANDED

status bar and tool bar

WINDOW_GUI_NORMAL 
Python: cv.WINDOW_GUI_NORMAL

old fashious way

◆ WindowPropertyFlags

#include <opencv2/highgui.hpp>

Flags for cv::setWindowProperty / cv::getWindowProperty.

Enumerator
WND_PROP_FULLSCREEN 
Python: cv.WND_PROP_FULLSCREEN

fullscreen property (can be WINDOW_NORMAL or WINDOW_FULLSCREEN).

WND_PROP_AUTOSIZE 
Python: cv.WND_PROP_AUTOSIZE

autosize property (can be WINDOW_NORMAL or WINDOW_AUTOSIZE).

WND_PROP_ASPECT_RATIO 
Python: cv.WND_PROP_ASPECT_RATIO

window's aspect ration (can be set to WINDOW_FREERATIO or WINDOW_KEEPRATIO).

WND_PROP_OPENGL 
Python: cv.WND_PROP_OPENGL

opengl support.

WND_PROP_VISIBLE 
Python: cv.WND_PROP_VISIBLE

checks whether the window exists and is visible

WND_PROP_TOPMOST 
Python: cv.WND_PROP_TOPMOST

property to toggle normal window being topmost or not

WND_PROP_VSYNC 
Python: cv.WND_PROP_VSYNC

enable or disable VSYNC (in OpenGL mode)