public class opencv_highgui extends opencv_highgui
Modifier and Type | Field and Description |
---|---|
static int |
CV_CHECKBOX
enum
|
static int |
CV_EVENT_FLAG_ALTKEY
enum
|
static int |
CV_EVENT_FLAG_CTRLKEY
enum
|
static int |
CV_EVENT_FLAG_LBUTTON
enum
|
static int |
CV_EVENT_FLAG_MBUTTON
enum
|
static int |
CV_EVENT_FLAG_RBUTTON
enum
|
static int |
CV_EVENT_FLAG_SHIFTKEY
enum
|
static int |
CV_EVENT_LBUTTONDBLCLK
enum
|
static int |
CV_EVENT_LBUTTONDOWN
enum
|
static int |
CV_EVENT_LBUTTONUP
enum
|
static int |
CV_EVENT_MBUTTONDBLCLK
enum
|
static int |
CV_EVENT_MBUTTONDOWN
enum
|
static int |
CV_EVENT_MBUTTONUP
enum
|
static int |
CV_EVENT_MOUSEHWHEEL
enum
|
static int |
CV_EVENT_MOUSEMOVE
enum
|
static int |
CV_EVENT_MOUSEWHEEL
enum
|
static int |
CV_EVENT_RBUTTONDBLCLK
enum
|
static int |
CV_EVENT_RBUTTONDOWN
enum
|
static int |
CV_EVENT_RBUTTONUP
enum
|
static int |
CV_FONT_BLACK
enum
|
static int |
CV_FONT_BOLD
enum
|
static int |
CV_FONT_DEMIBOLD
enum
|
static int |
CV_FONT_LIGHT
enum
|
static int |
CV_FONT_NORMAL
enum
|
static int |
CV_GUI_EXPANDED
enum
|
static int |
CV_GUI_NORMAL
enum
|
static int |
CV_PUSH_BUTTON
enum
|
static int |
CV_RADIOBOX
enum
|
static int |
CV_STYLE_ITALIC
enum
|
static int |
CV_STYLE_NORMAL
enum
|
static int |
CV_STYLE_OBLIQUE
enum
|
static int |
CV_WINDOW_AUTOSIZE
enum
|
static int |
CV_WINDOW_FREERATIO
enum
|
static int |
CV_WINDOW_FULLSCREEN
enum
|
static int |
CV_WINDOW_KEEPRATIO
enum
|
static int |
CV_WINDOW_NORMAL
enum
|
static int |
CV_WINDOW_OPENGL
enum
|
static int |
CV_WND_PROP_ASPECTRATIO
enum
|
static int |
CV_WND_PROP_AUTOSIZE
enum
|
static int |
CV_WND_PROP_FULLSCREEN
enum
|
static int |
CV_WND_PROP_OPENGL
enum
|
static int |
CV_WND_PROP_VISIBLE
enum
|
static int |
EVENT_FLAG_ALTKEY
enum cv::MouseEventFlags
|
static int |
EVENT_FLAG_CTRLKEY
enum cv::MouseEventFlags
|
static int |
EVENT_FLAG_LBUTTON
enum cv::MouseEventFlags
|
static int |
EVENT_FLAG_MBUTTON
enum cv::MouseEventFlags
|
static int |
EVENT_FLAG_RBUTTON
enum cv::MouseEventFlags
|
static int |
EVENT_FLAG_SHIFTKEY
enum cv::MouseEventFlags
|
static int |
EVENT_LBUTTONDBLCLK
enum cv::MouseEventTypes
|
static int |
EVENT_LBUTTONDOWN
enum cv::MouseEventTypes
|
static int |
EVENT_LBUTTONUP
enum cv::MouseEventTypes
|
static int |
EVENT_MBUTTONDBLCLK
enum cv::MouseEventTypes
|
static int |
EVENT_MBUTTONDOWN
enum cv::MouseEventTypes
|
static int |
EVENT_MBUTTONUP
enum cv::MouseEventTypes
|
static int |
EVENT_MOUSEHWHEEL
enum cv::MouseEventTypes
|
static int |
EVENT_MOUSEMOVE
enum cv::MouseEventTypes
|
static int |
EVENT_MOUSEWHEEL
enum cv::MouseEventTypes
|
static int |
EVENT_RBUTTONDBLCLK
enum cv::MouseEventTypes
|
static int |
EVENT_RBUTTONDOWN
enum cv::MouseEventTypes
|
static int |
EVENT_RBUTTONUP
enum cv::MouseEventTypes
|
static int |
HG_AUTOSIZE |
static int |
QT_CHECKBOX
enum cv::QtButtonTypes
|
static int |
QT_FONT_BLACK
enum cv::QtFontWeights
|
static int |
QT_FONT_BOLD
enum cv::QtFontWeights
|
static int |
QT_FONT_DEMIBOLD
enum cv::QtFontWeights
|
static int |
QT_FONT_LIGHT
enum cv::QtFontWeights
|
static int |
QT_FONT_NORMAL
enum cv::QtFontWeights
|
static int |
QT_NEW_BUTTONBAR
enum cv::QtButtonTypes
|
static int |
QT_PUSH_BUTTON
enum cv::QtButtonTypes
|
static int |
QT_RADIOBOX
enum cv::QtButtonTypes
|
static int |
QT_STYLE_ITALIC
enum cv::QtFontStyles
|
static int |
QT_STYLE_NORMAL
enum cv::QtFontStyles
|
static int |
QT_STYLE_OBLIQUE
enum cv::QtFontStyles
|
static int |
WINDOW_AUTOSIZE
enum cv::WindowFlags
|
static int |
WINDOW_FREERATIO
enum cv::WindowFlags
|
static int |
WINDOW_FULLSCREEN
enum cv::WindowFlags
|
static int |
WINDOW_GUI_EXPANDED
enum cv::WindowFlags
|
static int |
WINDOW_GUI_NORMAL
enum cv::WindowFlags
|
static int |
WINDOW_KEEPRATIO
enum cv::WindowFlags
|
static int |
WINDOW_NORMAL
enum cv::WindowFlags
|
static int |
WINDOW_OPENGL
enum cv::WindowFlags
|
static int |
WND_PROP_ASPECT_RATIO
enum cv::WindowPropertyFlags
|
static int |
WND_PROP_AUTOSIZE
enum cv::WindowPropertyFlags
|
static int |
WND_PROP_FULLSCREEN
enum cv::WindowPropertyFlags
|
static int |
WND_PROP_OPENGL
enum cv::WindowPropertyFlags
|
static int |
WND_PROP_TOPMOST
enum cv::WindowPropertyFlags
|
static int |
WND_PROP_VISIBLE
enum cv::WindowPropertyFlags
|
static int |
WND_PROP_VSYNC
enum cv::WindowPropertyFlags
|
Constructor and Description |
---|
opencv_highgui() |
Modifier and Type | Method and Description |
---|---|
static void |
addText(Mat img,
BytePointer text,
Point org,
BytePointer nameFont) |
static void |
addText(Mat img,
BytePointer text,
Point org,
BytePointer nameFont,
int pointSize,
Scalar color,
int weight,
int style,
int spacing)
\brief Draws a text on the image.
|
static void |
addText(Mat img,
BytePointer text,
Point org,
QtFont font)
\brief Draws a text on the image.
|
static void |
addText(Mat img,
String text,
Point org,
QtFont font) |
static void |
addText(Mat img,
String text,
Point org,
String nameFont) |
static void |
addText(Mat img,
String text,
Point org,
String nameFont,
int pointSize,
Scalar color,
int weight,
int style,
int spacing) |
static int |
createButton(BytePointer bar_name,
ButtonCallback on_change) |
static int |
createButton(BytePointer bar_name,
ButtonCallback on_change,
Pointer userdata,
int type,
boolean initial_button_state)
\brief Attaches a button to the control panel.
|
static int |
createButton(String bar_name,
ButtonCallback on_change) |
static int |
createButton(String bar_name,
ButtonCallback on_change,
Pointer userdata,
int type,
boolean initial_button_state) |
static int |
createTrackbar(BytePointer trackbarname,
BytePointer winname,
int[] value,
int count) |
static int |
createTrackbar(BytePointer trackbarname,
BytePointer winname,
int[] value,
int count,
TrackbarCallback onChange,
Pointer userdata) |
static int |
createTrackbar(BytePointer trackbarname,
BytePointer winname,
IntBuffer value,
int count) |
static int |
createTrackbar(BytePointer trackbarname,
BytePointer winname,
IntBuffer value,
int count,
TrackbarCallback onChange,
Pointer userdata) |
static int |
createTrackbar(BytePointer trackbarname,
BytePointer winname,
IntPointer value,
int count) |
static int |
createTrackbar(BytePointer trackbarname,
BytePointer winname,
IntPointer value,
int count,
TrackbarCallback onChange,
Pointer userdata)
\brief Creates a trackbar and attaches it to the specified window.
|
static int |
createTrackbar(String trackbarname,
String winname,
int[] value,
int count) |
static int |
createTrackbar(String trackbarname,
String winname,
int[] value,
int count,
TrackbarCallback onChange,
Pointer userdata) |
static int |
createTrackbar(String trackbarname,
String winname,
IntBuffer value,
int count) |
static int |
createTrackbar(String trackbarname,
String winname,
IntBuffer value,
int count,
TrackbarCallback onChange,
Pointer userdata) |
static int |
createTrackbar(String trackbarname,
String winname,
IntPointer value,
int count) |
static int |
createTrackbar(String trackbarname,
String winname,
IntPointer value,
int count,
TrackbarCallback onChange,
Pointer userdata) |
static BytePointer |
currentUIFramework()
\brief HighGUI backend used.
|
static void |
cvAddSearchPath(BytePointer path)
\
|
static void |
cvAddSearchPath(String path) |
static void |
cvAddText(CvArr img,
BytePointer text,
CvPoint org,
CvFont arg2) |
static void |
cvAddText(CvArr img,
BytePointer text,
int[] org,
CvFont arg2) |
static void |
cvAddText(CvArr img,
BytePointer text,
IntBuffer org,
CvFont arg2) |
static void |
cvAddText(CvArr img,
String text,
CvPoint org,
CvFont arg2) |
static void |
cvAddText(CvArr img,
String text,
int[] org,
CvFont arg2) |
static void |
cvAddText(CvArr img,
String text,
IntBuffer org,
CvFont arg2) |
static int |
cvCreateButton() |
static int |
cvCreateButton(BytePointer button_name,
CvButtonCallback on_change,
Pointer userdata,
int button_type,
int initial_button_state) |
static int |
cvCreateButton(String button_name,
CvButtonCallback on_change,
Pointer userdata,
int button_type,
int initial_button_state) |
static int |
cvCreateTrackbar(BytePointer trackbar_name,
BytePointer window_name,
int[] value,
int count) |
static int |
cvCreateTrackbar(BytePointer trackbar_name,
BytePointer window_name,
int[] value,
int count,
CvTrackbarCallback on_change) |
static int |
cvCreateTrackbar(BytePointer trackbar_name,
BytePointer window_name,
IntBuffer value,
int count) |
static int |
cvCreateTrackbar(BytePointer trackbar_name,
BytePointer window_name,
IntBuffer value,
int count,
CvTrackbarCallback on_change) |
static int |
cvCreateTrackbar(BytePointer trackbar_name,
BytePointer window_name,
IntPointer value,
int count) |
static int |
cvCreateTrackbar(BytePointer trackbar_name,
BytePointer window_name,
IntPointer value,
int count,
CvTrackbarCallback on_change) |
static int |
cvCreateTrackbar(String trackbar_name,
String window_name,
int[] value,
int count) |
static int |
cvCreateTrackbar(String trackbar_name,
String window_name,
int[] value,
int count,
CvTrackbarCallback on_change) |
static int |
cvCreateTrackbar(String trackbar_name,
String window_name,
IntBuffer value,
int count) |
static int |
cvCreateTrackbar(String trackbar_name,
String window_name,
IntBuffer value,
int count,
CvTrackbarCallback on_change) |
static int |
cvCreateTrackbar(String trackbar_name,
String window_name,
IntPointer value,
int count) |
static int |
cvCreateTrackbar(String trackbar_name,
String window_name,
IntPointer value,
int count,
CvTrackbarCallback on_change) |
static int |
cvCreateTrackbar2(BytePointer trackbar_name,
BytePointer window_name,
int[] value,
int count,
CvTrackbarCallback2 on_change) |
static int |
cvCreateTrackbar2(BytePointer trackbar_name,
BytePointer window_name,
int[] value,
int count,
CvTrackbarCallback2 on_change,
Pointer userdata) |
static int |
cvCreateTrackbar2(BytePointer trackbar_name,
BytePointer window_name,
IntBuffer value,
int count,
CvTrackbarCallback2 on_change) |
static int |
cvCreateTrackbar2(BytePointer trackbar_name,
BytePointer window_name,
IntBuffer value,
int count,
CvTrackbarCallback2 on_change,
Pointer userdata) |
static int |
cvCreateTrackbar2(BytePointer trackbar_name,
BytePointer window_name,
IntPointer value,
int count,
CvTrackbarCallback2 on_change) |
static int |
cvCreateTrackbar2(BytePointer trackbar_name,
BytePointer window_name,
IntPointer value,
int count,
CvTrackbarCallback2 on_change,
Pointer userdata) |
static int |
cvCreateTrackbar2(String trackbar_name,
String window_name,
int[] value,
int count,
CvTrackbarCallback2 on_change) |
static int |
cvCreateTrackbar2(String trackbar_name,
String window_name,
int[] value,
int count,
CvTrackbarCallback2 on_change,
Pointer userdata) |
static int |
cvCreateTrackbar2(String trackbar_name,
String window_name,
IntBuffer value,
int count,
CvTrackbarCallback2 on_change) |
static int |
cvCreateTrackbar2(String trackbar_name,
String window_name,
IntBuffer value,
int count,
CvTrackbarCallback2 on_change,
Pointer userdata) |
static int |
cvCreateTrackbar2(String trackbar_name,
String window_name,
IntPointer value,
int count,
CvTrackbarCallback2 on_change) |
static int |
cvCreateTrackbar2(String trackbar_name,
String window_name,
IntPointer value,
int count,
CvTrackbarCallback2 on_change,
Pointer userdata) |
static void |
cvDestroyAllWindows() |
static void |
cvDestroyWindow(BytePointer name) |
static void |
cvDestroyWindow(String name) |
static void |
cvDisplayOverlay(BytePointer name,
BytePointer text) |
static void |
cvDisplayOverlay(BytePointer name,
BytePointer text,
int delayms) |
static void |
cvDisplayOverlay(String name,
String text) |
static void |
cvDisplayOverlay(String name,
String text,
int delayms) |
static void |
cvDisplayStatusBar(BytePointer name,
BytePointer text) |
static void |
cvDisplayStatusBar(BytePointer name,
BytePointer text,
int delayms) |
static void |
cvDisplayStatusBar(String name,
String text) |
static void |
cvDisplayStatusBar(String name,
String text,
int delayms) |
static CvFont |
cvFontQt(BytePointer nameFont) |
static CvFont |
cvFontQt(BytePointer nameFont,
int pointSize,
CvScalar color,
int weight,
int style,
int spacing) |
static CvFont |
cvFontQt(String nameFont) |
static CvFont |
cvFontQt(String nameFont,
int pointSize,
CvScalar color,
int weight,
int style,
int spacing) |
static int |
cvGetTrackbarPos(BytePointer trackbar_name,
BytePointer window_name) |
static int |
cvGetTrackbarPos(String trackbar_name,
String window_name) |
static Pointer |
cvGetWindowHandle(BytePointer name) |
static Pointer |
cvGetWindowHandle(String name) |
static BytePointer |
cvGetWindowName(Pointer window_handle) |
static double |
cvGetWindowProperty(BytePointer name,
int prop_id) |
static double |
cvGetWindowProperty(String name,
int prop_id) |
static int |
cvInitSystem(int argc,
byte[] argv) |
static int |
cvInitSystem(int argc,
ByteBuffer argv) |
static int |
cvInitSystem(int argc,
BytePointer argv) |
static int |
cvInitSystem(int argc,
PointerPointer argv) |
static void |
cvLoadWindowParameters(BytePointer name) |
static void |
cvLoadWindowParameters(String name) |
static void |
cvMoveWindow(BytePointer name,
int x,
int y) |
static void |
cvMoveWindow(String name,
int x,
int y) |
static int |
cvNamedWindow(BytePointer name) |
static int |
cvNamedWindow(BytePointer name,
int flags) |
static int |
cvNamedWindow(String name) |
static int |
cvNamedWindow(String name,
int flags) |
static void |
cvResizeWindow(BytePointer name,
int width,
int height) |
static void |
cvResizeWindow(String name,
int width,
int height) |
static void |
cvSaveWindowParameters(BytePointer name) |
static void |
cvSaveWindowParameters(String name) |
static void |
cvSetMouseCallback(BytePointer window_name,
CvMouseCallback on_mouse) |
static void |
cvSetMouseCallback(BytePointer window_name,
CvMouseCallback on_mouse,
Pointer param) |
static void |
cvSetMouseCallback(String window_name,
CvMouseCallback on_mouse) |
static void |
cvSetMouseCallback(String window_name,
CvMouseCallback on_mouse,
Pointer param) |
static void |
cvSetOpenGlContext(BytePointer window_name) |
static void |
cvSetOpenGlContext(String window_name) |
static void |
cvSetOpenGlDrawCallback(BytePointer window_name,
CvOpenGlDrawCallback callback) |
static void |
cvSetOpenGlDrawCallback(BytePointer window_name,
CvOpenGlDrawCallback callback,
Pointer userdata) |
static void |
cvSetOpenGlDrawCallback(String window_name,
CvOpenGlDrawCallback callback) |
static void |
cvSetOpenGlDrawCallback(String window_name,
CvOpenGlDrawCallback callback,
Pointer userdata) |
static void |
cvSetTrackbarMax(BytePointer trackbar_name,
BytePointer window_name,
int maxval) |
static void |
cvSetTrackbarMax(String trackbar_name,
String window_name,
int maxval) |
static void |
cvSetTrackbarMin(BytePointer trackbar_name,
BytePointer window_name,
int minval) |
static void |
cvSetTrackbarMin(String trackbar_name,
String window_name,
int minval) |
static void |
cvSetTrackbarPos(BytePointer trackbar_name,
BytePointer window_name,
int pos) |
static void |
cvSetTrackbarPos(String trackbar_name,
String window_name,
int pos) |
static void |
cvSetWindowProperty(BytePointer name,
int prop_id,
double prop_value) |
static void |
cvSetWindowProperty(String name,
int prop_id,
double prop_value) |
static void |
cvShowImage(BytePointer name,
CvArr image) |
static void |
cvShowImage(String name,
CvArr image) |
static int |
cvStartLoop(Pt2Func_int_byte__ pt2Func,
int argc,
byte[] argv) |
static int |
cvStartLoop(Pt2Func_int_ByteBuffer pt2Func,
int argc,
ByteBuffer argv) |
static int |
cvStartLoop(Pt2Func_int_BytePointer pt2Func,
int argc,
BytePointer argv) |
static int |
cvStartLoop(Pt2Func_int_PointerPointer pt2Func,
int argc,
PointerPointer argv) |
static int |
cvStartWindowThread() |
static void |
cvStopLoop() |
static void |
cvUpdateWindow(BytePointer window_name) |
static void |
cvUpdateWindow(String window_name) |
static void |
cvvAddSearchPath(BytePointer arg1) |
static void |
cvvAddSearchPath(String arg1) |
static int |
cvvCreateTrackbar(BytePointer arg1,
BytePointer arg2,
int[] arg3,
int arg4,
CvTrackbarCallback arg5) |
static int |
cvvCreateTrackbar(BytePointer arg1,
BytePointer arg2,
IntBuffer arg3,
int arg4,
CvTrackbarCallback arg5) |
static int |
cvvCreateTrackbar(BytePointer arg1,
BytePointer arg2,
IntPointer arg3,
int arg4,
CvTrackbarCallback arg5) |
static int |
cvvCreateTrackbar(String arg1,
String arg2,
int[] arg3,
int arg4,
CvTrackbarCallback arg5) |
static int |
cvvCreateTrackbar(String arg1,
String arg2,
IntBuffer arg3,
int arg4,
CvTrackbarCallback arg5) |
static int |
cvvCreateTrackbar(String arg1,
String arg2,
IntPointer arg3,
int arg4,
CvTrackbarCallback arg5) |
static void |
cvvDestroyWindow(BytePointer arg1) |
static void |
cvvDestroyWindow(String arg1) |
static int |
cvvInitSystem(int arg1,
byte[] arg2) |
static int |
cvvInitSystem(int arg1,
ByteBuffer arg2) |
static int |
cvvInitSystem(int arg1,
BytePointer arg2) |
static int |
cvvInitSystem(int arg1,
PointerPointer arg2) |
static void |
cvvNamedWindow(BytePointer arg1,
int arg2) |
static void |
cvvNamedWindow(String arg1,
int arg2) |
static void |
cvvResizeWindow(BytePointer arg1,
int arg2,
int arg3) |
static void |
cvvResizeWindow(String arg1,
int arg2,
int arg3) |
static void |
cvvShowImage(BytePointer arg1,
CvArr arg2) |
static void |
cvvShowImage(String arg1,
CvArr arg2) |
static int |
cvvWaitKey(BytePointer name) |
static int |
cvvWaitKey(String name) |
static int |
cvvWaitKeyEx(BytePointer name,
int delay) |
static int |
cvvWaitKeyEx(String name,
int delay) |
static int |
cvWaitKey() |
static int |
cvWaitKey(int delay) |
static void |
destroyAllWindows()
\brief Destroys all of the HighGUI windows.
|
static void |
destroyWindow(BytePointer winname)
\brief Destroys the specified window.
|
static void |
destroyWindow(String winname) |
static void |
displayOverlay(BytePointer winname,
BytePointer text) |
static void |
displayOverlay(BytePointer winname,
BytePointer text,
int delayms)
\brief Displays a text on a window image as an overlay for a specified duration.
|
static void |
displayOverlay(String winname,
String text) |
static void |
displayOverlay(String winname,
String text,
int delayms) |
static void |
displayStatusBar(BytePointer winname,
BytePointer text) |
static void |
displayStatusBar(BytePointer winname,
BytePointer text,
int delayms)
\brief Displays a text on the window statusbar during the specified period of time.
|
static void |
displayStatusBar(String winname,
String text) |
static void |
displayStatusBar(String winname,
String text,
int delayms) |
static QtFont |
fontQt(BytePointer nameFont) |
static QtFont |
fontQt(BytePointer nameFont,
int pointSize,
Scalar color,
int weight,
int style,
int spacing)
\brief Creates the font to draw a text on an image.
|
static QtFont |
fontQt(String nameFont) |
static QtFont |
fontQt(String nameFont,
int pointSize,
Scalar color,
int weight,
int style,
int spacing) |
static int |
getMouseWheelDelta(int flags)
\brief Gets the mouse-wheel motion delta, when handling mouse-wheel events cv::EVENT_MOUSEWHEEL and
cv::EVENT_MOUSEHWHEEL.
|
static int |
getTrackbarPos(BytePointer trackbarname,
BytePointer winname)
\brief Returns the trackbar position.
|
static int |
getTrackbarPos(String trackbarname,
String winname) |
static Rect |
getWindowImageRect(BytePointer winname)
\brief Provides rectangle of image in the window.
|
static Rect |
getWindowImageRect(String winname) |
static double |
getWindowProperty(BytePointer winname,
int prop_id)
\brief Provides parameters of a window.
|
static double |
getWindowProperty(String winname,
int prop_id) |
static void |
imshow(BytePointer winname,
GpuMat mat) |
static void |
imshow(BytePointer winname,
Mat mat)
\brief Displays an image in the specified window.
|
static void |
imshow(BytePointer winname,
Texture2D tex)
\addtogroup highgui_opengl OpenGL support
\{
|
static void |
imshow(BytePointer winname,
UMat mat) |
static void |
imshow(String winname,
GpuMat mat) |
static void |
imshow(String winname,
Mat mat) |
static void |
imshow(String winname,
Texture2D tex) |
static void |
imshow(String winname,
UMat mat) |
static void |
loadWindowParameters(BytePointer windowName)
\brief Loads parameters of the specified window.
|
static void |
loadWindowParameters(String windowName) |
static void |
moveWindow(BytePointer winname,
int x,
int y)
\brief Moves the window to the specified position
|
static void |
moveWindow(String winname,
int x,
int y) |
static void |
namedWindow(BytePointer winname) |
static void |
namedWindow(BytePointer winname,
int flags)
\brief Creates a window.
|
static void |
namedWindow(String winname) |
static void |
namedWindow(String winname,
int flags) |
static int |
pollKey()
\brief Polls for a pressed key.
|
static void |
resizeWindow(BytePointer winname,
int width,
int height)
\brief Resizes the window to the specified size
|
static void |
resizeWindow(BytePointer winname,
Size size)
\overload
|
static void |
resizeWindow(String winname,
int width,
int height) |
static void |
resizeWindow(String winname,
Size size) |
static void |
saveWindowParameters(BytePointer windowName)
\brief Saves parameters of the specified window.
|
static void |
saveWindowParameters(String windowName) |
static Rect |
selectROI(BytePointer windowName,
GpuMat img) |
static Rect |
selectROI(BytePointer windowName,
GpuMat img,
boolean showCrosshair,
boolean fromCenter,
boolean printNotice) |
static Rect |
selectROI(BytePointer windowName,
Mat img) |
static Rect |
selectROI(BytePointer windowName,
Mat img,
boolean showCrosshair,
boolean fromCenter,
boolean printNotice)
\brief Allows users to select a ROI on the given image.
|
static Rect |
selectROI(BytePointer windowName,
UMat img) |
static Rect |
selectROI(BytePointer windowName,
UMat img,
boolean showCrosshair,
boolean fromCenter,
boolean printNotice) |
static Rect |
selectROI(GpuMat img) |
static Rect |
selectROI(GpuMat img,
boolean showCrosshair,
boolean fromCenter,
boolean printNotice) |
static Rect |
selectROI(Mat img) |
static Rect |
selectROI(Mat img,
boolean showCrosshair,
boolean fromCenter,
boolean printNotice)
\overload
|
static Rect |
selectROI(String windowName,
GpuMat img) |
static Rect |
selectROI(String windowName,
GpuMat img,
boolean showCrosshair,
boolean fromCenter,
boolean printNotice) |
static Rect |
selectROI(String windowName,
Mat img) |
static Rect |
selectROI(String windowName,
Mat img,
boolean showCrosshair,
boolean fromCenter,
boolean printNotice) |
static Rect |
selectROI(String windowName,
UMat img) |
static Rect |
selectROI(String windowName,
UMat img,
boolean showCrosshair,
boolean fromCenter,
boolean printNotice) |
static Rect |
selectROI(UMat img) |
static Rect |
selectROI(UMat img,
boolean showCrosshair,
boolean fromCenter,
boolean printNotice) |
static void |
selectROIs(BytePointer windowName,
GpuMat img,
RectVector boundingBoxes) |
static void |
selectROIs(BytePointer windowName,
GpuMat img,
RectVector boundingBoxes,
boolean showCrosshair,
boolean fromCenter,
boolean printNotice) |
static void |
selectROIs(BytePointer windowName,
Mat img,
RectVector boundingBoxes) |
static void |
selectROIs(BytePointer windowName,
Mat img,
RectVector boundingBoxes,
boolean showCrosshair,
boolean fromCenter,
boolean printNotice)
\brief Allows users to select multiple ROIs on the given image.
|
static void |
selectROIs(BytePointer windowName,
UMat img,
RectVector boundingBoxes) |
static void |
selectROIs(BytePointer windowName,
UMat img,
RectVector boundingBoxes,
boolean showCrosshair,
boolean fromCenter,
boolean printNotice) |
static void |
selectROIs(String windowName,
GpuMat img,
RectVector boundingBoxes) |
static void |
selectROIs(String windowName,
GpuMat img,
RectVector boundingBoxes,
boolean showCrosshair,
boolean fromCenter,
boolean printNotice) |
static void |
selectROIs(String windowName,
Mat img,
RectVector boundingBoxes) |
static void |
selectROIs(String windowName,
Mat img,
RectVector boundingBoxes,
boolean showCrosshair,
boolean fromCenter,
boolean printNotice) |
static void |
selectROIs(String windowName,
UMat img,
RectVector boundingBoxes) |
static void |
selectROIs(String windowName,
UMat img,
RectVector boundingBoxes,
boolean showCrosshair,
boolean fromCenter,
boolean printNotice) |
static void |
setMouseCallback(BytePointer winname,
MouseCallback onMouse) |
static void |
setMouseCallback(BytePointer winname,
MouseCallback onMouse,
Pointer userdata)
\brief Sets mouse handler for the specified window
|
static void |
setMouseCallback(String winname,
MouseCallback onMouse) |
static void |
setMouseCallback(String winname,
MouseCallback onMouse,
Pointer userdata) |
static void |
setOpenGlContext(BytePointer winname)
\brief Sets the specified window as current OpenGL context.
|
static void |
setOpenGlContext(String winname) |
static void |
setOpenGlDrawCallback(BytePointer winname,
OpenGlDrawCallback onOpenGlDraw) |
static void |
setOpenGlDrawCallback(BytePointer winname,
OpenGlDrawCallback onOpenGlDraw,
Pointer userdata)
\brief Sets a callback function to be called to draw on top of displayed image.
|
static void |
setOpenGlDrawCallback(String winname,
OpenGlDrawCallback onOpenGlDraw) |
static void |
setOpenGlDrawCallback(String winname,
OpenGlDrawCallback onOpenGlDraw,
Pointer userdata) |
static void |
setTrackbarMax(BytePointer trackbarname,
BytePointer winname,
int maxval)
\brief Sets the trackbar maximum position.
|
static void |
setTrackbarMax(String trackbarname,
String winname,
int maxval) |
static void |
setTrackbarMin(BytePointer trackbarname,
BytePointer winname,
int minval)
\brief Sets the trackbar minimum position.
|
static void |
setTrackbarMin(String trackbarname,
String winname,
int minval) |
static void |
setTrackbarPos(BytePointer trackbarname,
BytePointer winname,
int pos)
\brief Sets the trackbar position.
|
static void |
setTrackbarPos(String trackbarname,
String winname,
int pos) |
static void |
setWindowProperty(BytePointer winname,
int prop_id,
double prop_value)
\brief Changes parameters of a window dynamically.
|
static void |
setWindowProperty(String winname,
int prop_id,
double prop_value) |
static void |
setWindowTitle(BytePointer winname,
BytePointer title)
\brief Updates window title
|
static void |
setWindowTitle(String winname,
String title) |
static int |
startLoop(Pt2Func_int_byte__ pt2Func,
int argc,
byte[] argv) |
static int |
startLoop(Pt2Func_int_ByteBuffer pt2Func,
int argc,
ByteBuffer argv) |
static int |
startLoop(Pt2Func_int_BytePointer pt2Func,
int argc,
BytePointer argv) |
static int |
startLoop(Pt2Func_int_PointerPointer pt2Func,
int argc,
PointerPointer argv) |
static int |
startWindowThread() |
static void |
stopLoop() |
static void |
updateWindow(BytePointer winname)
\brief Force window to redraw its context and call draw callback ( See cv::setOpenGlDrawCallback ).
|
static void |
updateWindow(String winname) |
static int |
waitKey() |
static int |
waitKey(int delay)
\brief Waits for a pressed key.
|
static int |
waitKeyEx() |
static int |
waitKeyEx(int delay)
\brief Similar to #waitKey, but returns full key code.
|
map
public static final int CV_FONT_LIGHT
public static final int CV_FONT_NORMAL
public static final int CV_FONT_DEMIBOLD
public static final int CV_FONT_BOLD
public static final int CV_FONT_BLACK
public static final int CV_STYLE_NORMAL
public static final int CV_STYLE_ITALIC
public static final int CV_STYLE_OBLIQUE
public static final int CV_PUSH_BUTTON
public static final int CV_CHECKBOX
public static final int CV_RADIOBOX
public static final int CV_WND_PROP_FULLSCREEN
public static final int CV_WND_PROP_AUTOSIZE
public static final int CV_WND_PROP_ASPECTRATIO
public static final int CV_WND_PROP_OPENGL
public static final int CV_WND_PROP_VISIBLE
public static final int CV_WINDOW_NORMAL
public static final int CV_WINDOW_AUTOSIZE
public static final int CV_WINDOW_OPENGL
public static final int CV_GUI_EXPANDED
public static final int CV_GUI_NORMAL
public static final int CV_WINDOW_FULLSCREEN
public static final int CV_WINDOW_FREERATIO
public static final int CV_WINDOW_KEEPRATIO
public static final int CV_EVENT_MOUSEMOVE
public static final int CV_EVENT_LBUTTONDOWN
public static final int CV_EVENT_RBUTTONDOWN
public static final int CV_EVENT_MBUTTONDOWN
public static final int CV_EVENT_LBUTTONUP
public static final int CV_EVENT_RBUTTONUP
public static final int CV_EVENT_MBUTTONUP
public static final int CV_EVENT_LBUTTONDBLCLK
public static final int CV_EVENT_RBUTTONDBLCLK
public static final int CV_EVENT_MBUTTONDBLCLK
public static final int CV_EVENT_MOUSEWHEEL
public static final int CV_EVENT_MOUSEHWHEEL
public static final int CV_EVENT_FLAG_LBUTTON
public static final int CV_EVENT_FLAG_RBUTTON
public static final int CV_EVENT_FLAG_MBUTTON
public static final int CV_EVENT_FLAG_CTRLKEY
public static final int CV_EVENT_FLAG_SHIFTKEY
public static final int CV_EVENT_FLAG_ALTKEY
public static final int HG_AUTOSIZE
public static final int WINDOW_NORMAL
public static final int WINDOW_AUTOSIZE
public static final int WINDOW_OPENGL
public static final int WINDOW_FULLSCREEN
public static final int WINDOW_FREERATIO
public static final int WINDOW_KEEPRATIO
public static final int WINDOW_GUI_EXPANDED
public static final int WINDOW_GUI_NORMAL
public static final int WND_PROP_FULLSCREEN
public static final int WND_PROP_AUTOSIZE
public static final int WND_PROP_ASPECT_RATIO
public static final int WND_PROP_OPENGL
public static final int WND_PROP_VISIBLE
public static final int WND_PROP_TOPMOST
public static final int WND_PROP_VSYNC
public static final int EVENT_MOUSEMOVE
public static final int EVENT_LBUTTONDOWN
public static final int EVENT_RBUTTONDOWN
public static final int EVENT_MBUTTONDOWN
public static final int EVENT_LBUTTONUP
public static final int EVENT_RBUTTONUP
public static final int EVENT_MBUTTONUP
public static final int EVENT_LBUTTONDBLCLK
public static final int EVENT_RBUTTONDBLCLK
public static final int EVENT_MBUTTONDBLCLK
public static final int EVENT_MOUSEWHEEL
public static final int EVENT_MOUSEHWHEEL
public static final int EVENT_FLAG_LBUTTON
public static final int EVENT_FLAG_RBUTTON
public static final int EVENT_FLAG_MBUTTON
public static final int EVENT_FLAG_CTRLKEY
public static final int EVENT_FLAG_SHIFTKEY
public static final int EVENT_FLAG_ALTKEY
public static final int QT_FONT_LIGHT
public static final int QT_FONT_NORMAL
public static final int QT_FONT_DEMIBOLD
public static final int QT_FONT_BOLD
public static final int QT_FONT_BLACK
public static final int QT_STYLE_NORMAL
public static final int QT_STYLE_ITALIC
public static final int QT_STYLE_OBLIQUE
public static final int QT_PUSH_BUTTON
public static final int QT_CHECKBOX
public static final int QT_RADIOBOX
public static final int QT_NEW_BUTTONBAR
@ByVal @Platform(value="linux") public static CvFont cvFontQt(@Cast(value="const char*") BytePointer nameFont, int pointSize, @ByVal(nullValue="CvScalar(cvScalarAll(0))") CvScalar color, int weight, int style, int spacing)
@ByVal @Platform(value="linux") public static CvFont cvFontQt(@Cast(value="const char*") BytePointer nameFont)
@ByVal @Platform(value="linux") public static CvFont cvFontQt(String nameFont, int pointSize, @ByVal(nullValue="CvScalar(cvScalarAll(0))") CvScalar color, int weight, int style, int spacing)
@Platform(value="linux") public static void cvAddText(@Const CvArr img, @Cast(value="const char*") BytePointer text, @ByVal CvPoint org, CvFont arg2)
@Platform(value="linux") public static void cvAddText(@Const CvArr img, String text, @ByVal @Cast(value="CvPoint*") IntBuffer org, CvFont arg2)
@Platform(value="linux") public static void cvAddText(@Const CvArr img, @Cast(value="const char*") BytePointer text, @ByVal @Cast(value="CvPoint*") int[] org, CvFont arg2)
@Platform(value="linux") public static void cvAddText(@Const CvArr img, String text, @ByVal CvPoint org, CvFont arg2)
@Platform(value="linux") public static void cvAddText(@Const CvArr img, @Cast(value="const char*") BytePointer text, @ByVal @Cast(value="CvPoint*") IntBuffer org, CvFont arg2)
@Platform(value="linux") public static void cvAddText(@Const CvArr img, String text, @ByVal @Cast(value="CvPoint*") int[] org, CvFont arg2)
@Platform(value="linux") public static void cvDisplayOverlay(@Cast(value="const char*") BytePointer name, @Cast(value="const char*") BytePointer text, int delayms)
@Platform(value="linux") public static void cvDisplayOverlay(@Cast(value="const char*") BytePointer name, @Cast(value="const char*") BytePointer text)
@Platform(value="linux") public static void cvDisplayOverlay(String name, String text, int delayms)
@Platform(value="linux") public static void cvDisplayOverlay(String name, String text)
@Platform(value="linux") public static void cvDisplayStatusBar(@Cast(value="const char*") BytePointer name, @Cast(value="const char*") BytePointer text, int delayms)
@Platform(value="linux") public static void cvDisplayStatusBar(@Cast(value="const char*") BytePointer name, @Cast(value="const char*") BytePointer text)
@Platform(value="linux") public static void cvDisplayStatusBar(String name, String text, int delayms)
@Platform(value="linux") public static void cvDisplayStatusBar(String name, String text)
@Platform(value="linux") public static void cvSaveWindowParameters(@Cast(value="const char*") BytePointer name)
@Platform(value="linux") public static void cvSaveWindowParameters(String name)
@Platform(value="linux") public static void cvLoadWindowParameters(@Cast(value="const char*") BytePointer name)
@Platform(value="linux") public static void cvLoadWindowParameters(String name)
@Platform(value="linux") public static int cvStartLoop(Pt2Func_int_PointerPointer pt2Func, int argc, @Cast(value="char**") PointerPointer argv)
@Platform(value="linux") public static int cvStartLoop(Pt2Func_int_BytePointer pt2Func, int argc, @Cast(value="char**") @ByPtrPtr BytePointer argv)
@Platform(value="linux") public static int cvStartLoop(Pt2Func_int_ByteBuffer pt2Func, int argc, @Cast(value="char**") @ByPtrPtr ByteBuffer argv)
@Platform(value="linux") public static int cvStartLoop(Pt2Func_int_byte__ pt2Func, int argc, @Cast(value="char**") @ByPtrPtr byte[] argv)
@Platform(value="linux") public static int cvCreateButton(@Cast(value="const char*") BytePointer button_name, CvButtonCallback on_change, Pointer userdata, int button_type, int initial_button_state)
@Platform(value="linux") public static int cvCreateButton(String button_name, CvButtonCallback on_change, Pointer userdata, int button_type, int initial_button_state)
public static int cvInitSystem(int argc, @Cast(value="char**") PointerPointer argv)
public static int cvInitSystem(int argc, @Cast(value="char**") @ByPtrPtr BytePointer argv)
public static int cvInitSystem(int argc, @Cast(value="char**") @ByPtrPtr ByteBuffer argv)
public static int cvStartWindowThread()
public static int cvNamedWindow(@Cast(value="const char*") BytePointer name, int flags)
public static int cvNamedWindow(@Cast(value="const char*") BytePointer name)
public static int cvNamedWindow(String name, int flags)
public static int cvNamedWindow(String name)
public static void cvSetWindowProperty(@Cast(value="const char*") BytePointer name, int prop_id, double prop_value)
public static void cvSetWindowProperty(String name, int prop_id, double prop_value)
public static double cvGetWindowProperty(@Cast(value="const char*") BytePointer name, int prop_id)
public static double cvGetWindowProperty(String name, int prop_id)
public static void cvShowImage(@Cast(value="const char*") BytePointer name, @Const CvArr image)
public static void cvResizeWindow(@Cast(value="const char*") BytePointer name, int width, int height)
public static void cvResizeWindow(String name, int width, int height)
public static void cvMoveWindow(@Cast(value="const char*") BytePointer name, int x, int y)
public static void cvMoveWindow(String name, int x, int y)
public static void cvDestroyWindow(@Cast(value="const char*") BytePointer name)
public static void cvDestroyWindow(String name)
public static void cvDestroyAllWindows()
public static Pointer cvGetWindowHandle(@Cast(value="const char*") BytePointer name)
@Cast(value="const char*") public static BytePointer cvGetWindowName(Pointer window_handle)
public static int cvCreateTrackbar(@Cast(value="const char*") BytePointer trackbar_name, @Cast(value="const char*") BytePointer window_name, IntPointer value, int count, CvTrackbarCallback on_change)
public static int cvCreateTrackbar(@Cast(value="const char*") BytePointer trackbar_name, @Cast(value="const char*") BytePointer window_name, IntPointer value, int count)
public static int cvCreateTrackbar(String trackbar_name, String window_name, IntBuffer value, int count, CvTrackbarCallback on_change)
public static int cvCreateTrackbar(String trackbar_name, String window_name, IntBuffer value, int count)
public static int cvCreateTrackbar(@Cast(value="const char*") BytePointer trackbar_name, @Cast(value="const char*") BytePointer window_name, int[] value, int count, CvTrackbarCallback on_change)
public static int cvCreateTrackbar(@Cast(value="const char*") BytePointer trackbar_name, @Cast(value="const char*") BytePointer window_name, int[] value, int count)
public static int cvCreateTrackbar(String trackbar_name, String window_name, IntPointer value, int count, CvTrackbarCallback on_change)
public static int cvCreateTrackbar(String trackbar_name, String window_name, IntPointer value, int count)
public static int cvCreateTrackbar(@Cast(value="const char*") BytePointer trackbar_name, @Cast(value="const char*") BytePointer window_name, IntBuffer value, int count, CvTrackbarCallback on_change)
public static int cvCreateTrackbar(@Cast(value="const char*") BytePointer trackbar_name, @Cast(value="const char*") BytePointer window_name, IntBuffer value, int count)
public static int cvCreateTrackbar(String trackbar_name, String window_name, int[] value, int count, CvTrackbarCallback on_change)
public static int cvCreateTrackbar(String trackbar_name, String window_name, int[] value, int count)
public static int cvCreateTrackbar2(@Cast(value="const char*") BytePointer trackbar_name, @Cast(value="const char*") BytePointer window_name, IntPointer value, int count, CvTrackbarCallback2 on_change, Pointer userdata)
public static int cvCreateTrackbar2(@Cast(value="const char*") BytePointer trackbar_name, @Cast(value="const char*") BytePointer window_name, IntPointer value, int count, CvTrackbarCallback2 on_change)
public static int cvCreateTrackbar2(String trackbar_name, String window_name, IntBuffer value, int count, CvTrackbarCallback2 on_change, Pointer userdata)
public static int cvCreateTrackbar2(String trackbar_name, String window_name, IntBuffer value, int count, CvTrackbarCallback2 on_change)
public static int cvCreateTrackbar2(@Cast(value="const char*") BytePointer trackbar_name, @Cast(value="const char*") BytePointer window_name, int[] value, int count, CvTrackbarCallback2 on_change, Pointer userdata)
public static int cvCreateTrackbar2(@Cast(value="const char*") BytePointer trackbar_name, @Cast(value="const char*") BytePointer window_name, int[] value, int count, CvTrackbarCallback2 on_change)
public static int cvCreateTrackbar2(String trackbar_name, String window_name, IntPointer value, int count, CvTrackbarCallback2 on_change, Pointer userdata)
public static int cvCreateTrackbar2(String trackbar_name, String window_name, IntPointer value, int count, CvTrackbarCallback2 on_change)
public static int cvCreateTrackbar2(@Cast(value="const char*") BytePointer trackbar_name, @Cast(value="const char*") BytePointer window_name, IntBuffer value, int count, CvTrackbarCallback2 on_change, Pointer userdata)
public static int cvCreateTrackbar2(@Cast(value="const char*") BytePointer trackbar_name, @Cast(value="const char*") BytePointer window_name, IntBuffer value, int count, CvTrackbarCallback2 on_change)
public static int cvCreateTrackbar2(String trackbar_name, String window_name, int[] value, int count, CvTrackbarCallback2 on_change, Pointer userdata)
public static int cvCreateTrackbar2(String trackbar_name, String window_name, int[] value, int count, CvTrackbarCallback2 on_change)
public static int cvGetTrackbarPos(@Cast(value="const char*") BytePointer trackbar_name, @Cast(value="const char*") BytePointer window_name)
public static void cvSetTrackbarPos(@Cast(value="const char*") BytePointer trackbar_name, @Cast(value="const char*") BytePointer window_name, int pos)
public static void cvSetTrackbarPos(String trackbar_name, String window_name, int pos)
public static void cvSetTrackbarMax(@Cast(value="const char*") BytePointer trackbar_name, @Cast(value="const char*") BytePointer window_name, int maxval)
public static void cvSetTrackbarMax(String trackbar_name, String window_name, int maxval)
public static void cvSetTrackbarMin(@Cast(value="const char*") BytePointer trackbar_name, @Cast(value="const char*") BytePointer window_name, int minval)
public static void cvSetTrackbarMin(String trackbar_name, String window_name, int minval)
public static void cvSetMouseCallback(@Cast(value="const char*") BytePointer window_name, CvMouseCallback on_mouse, Pointer param)
public static void cvSetMouseCallback(@Cast(value="const char*") BytePointer window_name, CvMouseCallback on_mouse)
public static void cvSetMouseCallback(String window_name, CvMouseCallback on_mouse, Pointer param)
public static void cvSetMouseCallback(String window_name, CvMouseCallback on_mouse)
public static int cvWaitKey(int delay)
public static int cvWaitKey()
public static void cvSetOpenGlDrawCallback(@Cast(value="const char*") BytePointer window_name, CvOpenGlDrawCallback callback, Pointer userdata)
public static void cvSetOpenGlDrawCallback(@Cast(value="const char*") BytePointer window_name, CvOpenGlDrawCallback callback)
public static void cvSetOpenGlDrawCallback(String window_name, CvOpenGlDrawCallback callback, Pointer userdata)
public static void cvSetOpenGlDrawCallback(String window_name, CvOpenGlDrawCallback callback)
public static void cvSetOpenGlContext(@Cast(value="const char*") BytePointer window_name)
public static void cvSetOpenGlContext(String window_name)
public static void cvUpdateWindow(@Cast(value="const char*") BytePointer window_name)
public static void cvUpdateWindow(String window_name)
public static void cvAddSearchPath(@Cast(value="const char*") BytePointer path)
Obsolete functions/synonyms * \
public static void cvAddSearchPath(String path)
public static int cvvInitSystem(int arg1, @Cast(value="char**") PointerPointer arg2)
public static int cvvInitSystem(int arg1, @Cast(value="char**") @ByPtrPtr BytePointer arg2)
public static int cvvInitSystem(int arg1, @Cast(value="char**") @ByPtrPtr ByteBuffer arg2)
public static int cvvInitSystem(int arg1, @Cast(value="char**") @ByPtrPtr byte[] arg2)
public static void cvvNamedWindow(@Cast(value="const char*") BytePointer arg1, int arg2)
public static void cvvNamedWindow(String arg1, int arg2)
public static void cvvShowImage(@Cast(value="const char*") BytePointer arg1, CvArr arg2)
public static void cvvResizeWindow(@Cast(value="const char*") BytePointer arg1, int arg2, int arg3)
public static void cvvResizeWindow(String arg1, int arg2, int arg3)
public static void cvvDestroyWindow(@Cast(value="const char*") BytePointer arg1)
public static void cvvDestroyWindow(String arg1)
public static int cvvCreateTrackbar(@Cast(value="const char*") BytePointer arg1, @Cast(value="const char*") BytePointer arg2, IntPointer arg3, int arg4, CvTrackbarCallback arg5)
public static int cvvCreateTrackbar(String arg1, String arg2, IntBuffer arg3, int arg4, CvTrackbarCallback arg5)
public static int cvvCreateTrackbar(@Cast(value="const char*") BytePointer arg1, @Cast(value="const char*") BytePointer arg2, int[] arg3, int arg4, CvTrackbarCallback arg5)
public static int cvvCreateTrackbar(String arg1, String arg2, IntPointer arg3, int arg4, CvTrackbarCallback arg5)
public static int cvvCreateTrackbar(@Cast(value="const char*") BytePointer arg1, @Cast(value="const char*") BytePointer arg2, IntBuffer arg3, int arg4, CvTrackbarCallback arg5)
public static int cvvCreateTrackbar(String arg1, String arg2, int[] arg3, int arg4, CvTrackbarCallback arg5)
public static void cvvAddSearchPath(@Cast(value="const char*") BytePointer arg1)
public static void cvvAddSearchPath(String arg1)
public static int cvvWaitKey(@Cast(value="const char*") BytePointer name)
public static int cvvWaitKey(String name)
public static int cvvWaitKeyEx(@Cast(value="const char*") BytePointer name, int delay)
public static int cvvWaitKeyEx(String name, int delay)
@Namespace(value="cv") public static void namedWindow(@opencv_core.Str BytePointer winname, int flags)
The function namedWindow creates a window that can be used as a placeholder for images and trackbars. Created windows are referred to by their names.
If a window with the same name already exists, the function does nothing.
You can call cv::destroyWindow or cv::destroyAllWindows to close the window and de-allocate any associated memory usage. For a simple program, you do not really have to call these functions because all the resources and windows of the application are closed automatically by the operating system upon exit.
\note Qt backend supports additional flags: - **WINDOW_NORMAL or WINDOW_AUTOSIZE:** WINDOW_NORMAL enables you to resize the window, whereas WINDOW_AUTOSIZE adjusts automatically the window size to fit the displayed image (see imshow ), and you cannot change the window size manually. - **WINDOW_FREERATIO or WINDOW_KEEPRATIO:** WINDOW_FREERATIO adjusts the image with no respect to its ratio, whereas WINDOW_KEEPRATIO keeps the image ratio. - **WINDOW_GUI_NORMAL or WINDOW_GUI_EXPANDED:** WINDOW_GUI_NORMAL is the old way to draw the window without statusbar and toolbar, whereas WINDOW_GUI_EXPANDED is a new enhanced GUI. By default, flags == WINDOW_AUTOSIZE | WINDOW_KEEPRATIO | WINDOW_GUI_EXPANDED
winname
- Name of the window in the window caption that may be used as a window identifier.flags
- Flags of the window. The supported flags are: (cv::WindowFlags)@Namespace(value="cv") public static void namedWindow(@opencv_core.Str BytePointer winname)
@Namespace(value="cv") public static void namedWindow(@opencv_core.Str String winname, int flags)
@Namespace(value="cv") public static void namedWindow(@opencv_core.Str String winname)
@Namespace(value="cv") public static void destroyWindow(@opencv_core.Str BytePointer winname)
The function destroyWindow destroys the window with the given name.
winname
- Name of the window to be destroyed.@Namespace(value="cv") public static void destroyWindow(@opencv_core.Str String winname)
@Namespace(value="cv") public static void destroyAllWindows()
The function destroyAllWindows destroys all of the opened HighGUI windows.
@Namespace(value="cv") @StdString public static BytePointer currentUIFramework()
The function returns HighGUI backend name used: could be COCOA, GTK2/3, QT, WAYLAND or WIN32. Returns empty string if there is no available UI backend.
@Namespace(value="cv") public static int startWindowThread()
@Namespace(value="cv") public static int waitKeyEx(int delay)
\note Key code is implementation specific and depends on used backend: QT/GTK/Win32/etc
@Namespace(value="cv") public static int waitKeyEx()
@Namespace(value="cv") public static int waitKey(int delay)
The function waitKey waits for a key event infinitely (when \texttt{delay}\leq 0
) or for delay
milliseconds, when it is positive. Since the OS has a minimum time between switching threads, the
function will not wait exactly delay ms, it will wait at least delay ms, depending on what else is
running on your computer at that time. It returns the code of the pressed key or -1 if no key was
pressed before the specified time had elapsed. To check for a key press but not wait for it, use
#pollKey.
\note The functions #waitKey and #pollKey are the only methods in HighGUI that can fetch and handle GUI events, so one of them needs to be called periodically for normal event processing unless HighGUI is used within an environment that takes care of event processing.
\note The function only works if there is at least one HighGUI window created and the window is active. If there are several HighGUI windows, any of them can be active.
delay
- Delay in milliseconds. 0 is the special value that means "forever".@Namespace(value="cv") public static int waitKey()
@Namespace(value="cv") public static int pollKey()
The function pollKey polls for a key event without waiting. It returns the code of the pressed key or -1 if no key was pressed since the last invocation. To wait until a key was pressed, use #waitKey.
\note The functions #waitKey and #pollKey are the only methods in HighGUI that can fetch and handle GUI events, so one of them needs to be called periodically for normal event processing unless HighGUI is used within an environment that takes care of event processing.
\note The function only works if there is at least one HighGUI window created and the window is active. If there are several HighGUI windows, any of them can be active.
@Namespace(value="cv") public static void imshow(@opencv_core.Str BytePointer winname, @ByVal Mat mat)
The function imshow displays an image in the specified window. If the window was created with the cv::WINDOW_AUTOSIZE flag, the image is shown with its original size, however it is still limited by the screen resolution. Otherwise, the image is scaled to fit the window. The function may scale the image, depending on its depth:
- If the image is 8-bit unsigned, it is displayed as is. - If the image is 16-bit unsigned, the pixels are divided by 256. That is, the value range [0,255\*256] is mapped to [0,255]. - If the image is 32-bit or 64-bit floating-point, the pixel values are multiplied by 255. That is, the value range [0,1] is mapped to [0,255]. - 32-bit integer images are not processed anymore due to ambiguouty of required transform. Convert to 8-bit unsigned matrix using a custom preprocessing specific to image's context.
If window was created with OpenGL support, cv::imshow also support ogl::Buffer , ogl::Texture2D and cuda::GpuMat as input.
If the window was not created before this function, it is assumed creating a window with cv::WINDOW_AUTOSIZE.
If you need to show an image that is bigger than the screen resolution, you will need to call namedWindow("", WINDOW_NORMAL) before the imshow.
\note This function should be followed by a call to cv::waitKey or cv::pollKey to perform GUI housekeeping tasks that are necessary to actually show the given image and make the window respond to mouse and keyboard events. Otherwise, it won't display the image and the window might lock up. For example, **waitKey(0)** will display the window infinitely until any keypress (it is suitable for image display). **waitKey(25)** will display a frame and wait approximately 25 ms for a key press (suitable for displaying a video frame-by-frame). To remove the window, use cv::destroyWindow.
\note [__Windows Backend Only__] Pressing Ctrl+C will copy the image to the clipboard. Pressing Ctrl+S will show a dialog to save the image. \note [__Wayland Backend Only__] Supoorting format is extended. - If the image is 8-bit signed, the pixels are biased by 128. That is, the value range [-128,127] is mapped to [0,255]. - If the image is 16-bit signed, the pixels are divided by 256 and biased by 128. That is, the value range [-32768,32767] is mapped to [0,255].
winname
- Name of the window.mat
- Image to be shown.@Namespace(value="cv") public static void imshow(@opencv_core.Str String winname, @ByVal Mat mat)
@Namespace(value="cv") public static void imshow(@opencv_core.Str String winname, @ByVal UMat mat)
@Namespace(value="cv") public static void imshow(@opencv_core.Str BytePointer winname, @ByVal UMat mat)
@Namespace(value="cv") public static void imshow(@opencv_core.Str BytePointer winname, @ByVal GpuMat mat)
@Namespace(value="cv") public static void imshow(@opencv_core.Str String winname, @ByVal GpuMat mat)
@Namespace(value="cv") public static void resizeWindow(@opencv_core.Str BytePointer winname, int width, int height)
\note The specified window size is for the image area. Toolbars are not counted. Only windows created without cv::WINDOW_AUTOSIZE flag can be resized.
winname
- Window name.width
- The new window width.height
- The new window height.@Namespace(value="cv") public static void resizeWindow(@opencv_core.Str String winname, int width, int height)
@Namespace(value="cv") public static void resizeWindow(@opencv_core.Str BytePointer winname, @Const @ByRef Size size)
winname
- Window name.size
- The new window size.@Namespace(value="cv") public static void resizeWindow(@opencv_core.Str String winname, @Const @ByRef Size size)
@Namespace(value="cv") public static void moveWindow(@opencv_core.Str BytePointer winname, int x, int y)
winname
- Name of the window.x
- The new x-coordinate of the window.y
- The new y-coordinate of the window.
\note [__Wayland Backend Only__] This function is not supported by the Wayland protocol limitation.
@Namespace(value="cv") public static void moveWindow(@opencv_core.Str String winname, int x, int y)
@Namespace(value="cv") public static void setWindowProperty(@opencv_core.Str BytePointer winname, int prop_id, double prop_value)
The function setWindowProperty enables changing properties of a window.
winname
- Name of the window.prop_id
- Window property to edit. The supported operation flags are: (cv::WindowPropertyFlags)prop_value
- New value of the window property. The supported flags are: (cv::WindowFlags)
\note [__Wayland Backend Only__] This function is not supported.
@Namespace(value="cv") public static void setWindowProperty(@opencv_core.Str String winname, int prop_id, double prop_value)
@Namespace(value="cv") public static void setWindowTitle(@opencv_core.Str BytePointer winname, @opencv_core.Str BytePointer title)
winname
- Name of the window.title
- New title.@Namespace(value="cv") public static void setWindowTitle(@opencv_core.Str String winname, @opencv_core.Str String title)
@Namespace(value="cv") public static double getWindowProperty(@opencv_core.Str BytePointer winname, int prop_id)
The function getWindowProperty returns properties of a window.
winname
- Name of the window.prop_id
- Window property to retrieve. The following operation flags are available: (cv::WindowPropertyFlags)
\note [__Wayland Backend Only__] This function is not supported.
@Namespace(value="cv") public static double getWindowProperty(@opencv_core.Str String winname, int prop_id)
@Namespace(value="cv") @ByVal public static Rect getWindowImageRect(@opencv_core.Str BytePointer winname)
The function getWindowImageRect returns the client screen coordinates, width and height of the image rendering area.
winname
- Name of the window.
moveWindow
\note [__Wayland Backend Only__] This function is not supported by the Wayland protocol limitation.
@Namespace(value="cv") @ByVal public static Rect getWindowImageRect(@opencv_core.Str String winname)
@Namespace(value="cv") public static void setMouseCallback(@opencv_core.Str BytePointer winname, MouseCallback onMouse, Pointer userdata)
winname
- Name of the window.onMouse
- Callback function for mouse events. See OpenCV samples on how to specify and use the callback.userdata
- The optional parameter passed to the callback.@Namespace(value="cv") public static void setMouseCallback(@opencv_core.Str BytePointer winname, MouseCallback onMouse)
@Namespace(value="cv") public static void setMouseCallback(@opencv_core.Str String winname, MouseCallback onMouse, Pointer userdata)
@Namespace(value="cv") public static void setMouseCallback(@opencv_core.Str String winname, MouseCallback onMouse)
@Namespace(value="cv") public static int getMouseWheelDelta(int flags)
For regular mice with a scroll-wheel, delta will be a multiple of 120. The value 120 corresponds to a one notch rotation of the wheel or the threshold for action to be taken and one such action should occur for each delta. Some high-precision mice with higher-resolution freely-rotating wheels may generate smaller values.
For cv::EVENT_MOUSEWHEEL positive and negative values mean forward and backward scrolling, respectively. For cv::EVENT_MOUSEHWHEEL, where available, positive and negative values mean right and left scrolling, respectively.
\note Mouse-wheel events are currently supported only on Windows and Cocoa.
flags
- The mouse callback flags parameter.@Namespace(value="cv") @ByVal public static Rect selectROI(@opencv_core.Str BytePointer windowName, @ByVal Mat img, @Cast(value="bool") boolean showCrosshair, @Cast(value="bool") boolean fromCenter, @Cast(value="bool") boolean printNotice)
The function creates a window and allows users to select a ROI using the mouse.
Controls: use space
or enter
to finish selection, use key c
to cancel selection (function will return the zero cv::Rect).
windowName
- name of the window where selection process will be shown.img
- image to select a ROI.showCrosshair
- if true crosshair of selection rectangle will be shown.fromCenter
- if true center of selection will match initial mouse position. In opposite case a corner of
selection rectangle will correspont to the initial mouse position.printNotice
- if true a notice to select ROI or cancel selection will be printed in console.\note The function sets it's own mouse callback for specified window using cv::setMouseCallback(windowName, ...). After finish of work an empty callback will be set for the used window.
@Namespace(value="cv") @ByVal public static Rect selectROI(@opencv_core.Str BytePointer windowName, @ByVal Mat img)
@Namespace(value="cv") @ByVal public static Rect selectROI(@opencv_core.Str String windowName, @ByVal Mat img, @Cast(value="bool") boolean showCrosshair, @Cast(value="bool") boolean fromCenter, @Cast(value="bool") boolean printNotice)
@Namespace(value="cv") @ByVal public static Rect selectROI(@opencv_core.Str String windowName, @ByVal Mat img)
@Namespace(value="cv") @ByVal public static Rect selectROI(@opencv_core.Str String windowName, @ByVal UMat img, @Cast(value="bool") boolean showCrosshair, @Cast(value="bool") boolean fromCenter, @Cast(value="bool") boolean printNotice)
@Namespace(value="cv") @ByVal public static Rect selectROI(@opencv_core.Str String windowName, @ByVal UMat img)
@Namespace(value="cv") @ByVal public static Rect selectROI(@opencv_core.Str BytePointer windowName, @ByVal UMat img, @Cast(value="bool") boolean showCrosshair, @Cast(value="bool") boolean fromCenter, @Cast(value="bool") boolean printNotice)
@Namespace(value="cv") @ByVal public static Rect selectROI(@opencv_core.Str BytePointer windowName, @ByVal UMat img)
@Namespace(value="cv") @ByVal public static Rect selectROI(@opencv_core.Str BytePointer windowName, @ByVal GpuMat img, @Cast(value="bool") boolean showCrosshair, @Cast(value="bool") boolean fromCenter, @Cast(value="bool") boolean printNotice)
@Namespace(value="cv") @ByVal public static Rect selectROI(@opencv_core.Str BytePointer windowName, @ByVal GpuMat img)
@Namespace(value="cv") @ByVal public static Rect selectROI(@opencv_core.Str String windowName, @ByVal GpuMat img, @Cast(value="bool") boolean showCrosshair, @Cast(value="bool") boolean fromCenter, @Cast(value="bool") boolean printNotice)
@Namespace(value="cv") @ByVal public static Rect selectROI(@opencv_core.Str String windowName, @ByVal GpuMat img)
@Namespace(value="cv") @ByVal public static Rect selectROI(@ByVal Mat img, @Cast(value="bool") boolean showCrosshair, @Cast(value="bool") boolean fromCenter, @Cast(value="bool") boolean printNotice)
@Namespace(value="cv") @ByVal public static Rect selectROI(@ByVal UMat img, @Cast(value="bool") boolean showCrosshair, @Cast(value="bool") boolean fromCenter, @Cast(value="bool") boolean printNotice)
@Namespace(value="cv") @ByVal public static Rect selectROI(@ByVal GpuMat img, @Cast(value="bool") boolean showCrosshair, @Cast(value="bool") boolean fromCenter, @Cast(value="bool") boolean printNotice)
@Namespace(value="cv") public static void selectROIs(@opencv_core.Str BytePointer windowName, @ByVal Mat img, @ByRef RectVector boundingBoxes, @Cast(value="bool") boolean showCrosshair, @Cast(value="bool") boolean fromCenter, @Cast(value="bool") boolean printNotice)
The function creates a window and allows users to select multiple ROIs using the mouse.
Controls: use space
or enter
to finish current selection and start a new one,
use esc
to terminate multiple ROI selection process.
windowName
- name of the window where selection process will be shown.img
- image to select a ROI.boundingBoxes
- selected ROIs.showCrosshair
- if true crosshair of selection rectangle will be shown.fromCenter
- if true center of selection will match initial mouse position. In opposite case a corner of
selection rectangle will correspont to the initial mouse position.printNotice
- if true a notice to select ROI or cancel selection will be printed in console.
\note The function sets it's own mouse callback for specified window using cv::setMouseCallback(windowName, ...). After finish of work an empty callback will be set for the used window.
@Namespace(value="cv") public static void selectROIs(@opencv_core.Str BytePointer windowName, @ByVal Mat img, @ByRef RectVector boundingBoxes)
@Namespace(value="cv") public static void selectROIs(@opencv_core.Str String windowName, @ByVal Mat img, @ByRef RectVector boundingBoxes, @Cast(value="bool") boolean showCrosshair, @Cast(value="bool") boolean fromCenter, @Cast(value="bool") boolean printNotice)
@Namespace(value="cv") public static void selectROIs(@opencv_core.Str String windowName, @ByVal Mat img, @ByRef RectVector boundingBoxes)
@Namespace(value="cv") public static void selectROIs(@opencv_core.Str String windowName, @ByVal UMat img, @ByRef RectVector boundingBoxes, @Cast(value="bool") boolean showCrosshair, @Cast(value="bool") boolean fromCenter, @Cast(value="bool") boolean printNotice)
@Namespace(value="cv") public static void selectROIs(@opencv_core.Str String windowName, @ByVal UMat img, @ByRef RectVector boundingBoxes)
@Namespace(value="cv") public static void selectROIs(@opencv_core.Str BytePointer windowName, @ByVal UMat img, @ByRef RectVector boundingBoxes, @Cast(value="bool") boolean showCrosshair, @Cast(value="bool") boolean fromCenter, @Cast(value="bool") boolean printNotice)
@Namespace(value="cv") public static void selectROIs(@opencv_core.Str BytePointer windowName, @ByVal UMat img, @ByRef RectVector boundingBoxes)
@Namespace(value="cv") public static void selectROIs(@opencv_core.Str BytePointer windowName, @ByVal GpuMat img, @ByRef RectVector boundingBoxes, @Cast(value="bool") boolean showCrosshair, @Cast(value="bool") boolean fromCenter, @Cast(value="bool") boolean printNotice)
@Namespace(value="cv") public static void selectROIs(@opencv_core.Str BytePointer windowName, @ByVal GpuMat img, @ByRef RectVector boundingBoxes)
@Namespace(value="cv") public static void selectROIs(@opencv_core.Str String windowName, @ByVal GpuMat img, @ByRef RectVector boundingBoxes, @Cast(value="bool") boolean showCrosshair, @Cast(value="bool") boolean fromCenter, @Cast(value="bool") boolean printNotice)
@Namespace(value="cv") public static void selectROIs(@opencv_core.Str String windowName, @ByVal GpuMat img, @ByRef RectVector boundingBoxes)
@Namespace(value="cv") public static int createTrackbar(@opencv_core.Str BytePointer trackbarname, @opencv_core.Str BytePointer winname, IntPointer value, int count, TrackbarCallback onChange, Pointer userdata)
The function createTrackbar creates a trackbar (a slider or range control) with the specified name and range, assigns a variable value to be a position synchronized with the trackbar and specifies the callback function onChange to be called on the trackbar position change. The created trackbar is displayed in the specified window winname.
\note [__Qt Backend Only__] winname can be empty if the trackbar should be attached to the control panel.
Clicking the label of each trackbar enables editing the trackbar values manually.
trackbarname
- Name of the created trackbar.winname
- Name of the window that will be used as a parent of the created trackbar.value
- Optional pointer to an integer variable whose value reflects the position of the
slider. Upon creation, the slider position is defined by this variable.count
- Maximal position of the slider. The minimal position is always 0.onChange
- Pointer to the function to be called every time the slider changes position. This
function should be prototyped as void Foo(int,void\*); , where the first parameter is the trackbar
position and the second parameter is the user data (see the next parameter). If the callback is
the NULL pointer, no callbacks are called, but only value is updated.userdata
- User data that is passed as is to the callback. It can be used to handle trackbar
events without using global variables.@Namespace(value="cv") public static int createTrackbar(@opencv_core.Str BytePointer trackbarname, @opencv_core.Str BytePointer winname, IntPointer value, int count)
@Namespace(value="cv") public static int createTrackbar(@opencv_core.Str String trackbarname, @opencv_core.Str String winname, IntBuffer value, int count, TrackbarCallback onChange, Pointer userdata)
@Namespace(value="cv") public static int createTrackbar(@opencv_core.Str String trackbarname, @opencv_core.Str String winname, IntBuffer value, int count)
@Namespace(value="cv") public static int createTrackbar(@opencv_core.Str BytePointer trackbarname, @opencv_core.Str BytePointer winname, int[] value, int count, TrackbarCallback onChange, Pointer userdata)
@Namespace(value="cv") public static int createTrackbar(@opencv_core.Str BytePointer trackbarname, @opencv_core.Str BytePointer winname, int[] value, int count)
@Namespace(value="cv") public static int createTrackbar(@opencv_core.Str String trackbarname, @opencv_core.Str String winname, IntPointer value, int count, TrackbarCallback onChange, Pointer userdata)
@Namespace(value="cv") public static int createTrackbar(@opencv_core.Str String trackbarname, @opencv_core.Str String winname, IntPointer value, int count)
@Namespace(value="cv") public static int createTrackbar(@opencv_core.Str BytePointer trackbarname, @opencv_core.Str BytePointer winname, IntBuffer value, int count, TrackbarCallback onChange, Pointer userdata)
@Namespace(value="cv") public static int createTrackbar(@opencv_core.Str BytePointer trackbarname, @opencv_core.Str BytePointer winname, IntBuffer value, int count)
@Namespace(value="cv") public static int createTrackbar(@opencv_core.Str String trackbarname, @opencv_core.Str String winname, int[] value, int count, TrackbarCallback onChange, Pointer userdata)
@Namespace(value="cv") public static int createTrackbar(@opencv_core.Str String trackbarname, @opencv_core.Str String winname, int[] value, int count)
@Namespace(value="cv") public static int getTrackbarPos(@opencv_core.Str BytePointer trackbarname, @opencv_core.Str BytePointer winname)
The function returns the current position of the specified trackbar.
\note [__Qt Backend Only__] winname can be empty if the trackbar is attached to the control panel.
trackbarname
- Name of the trackbar.winname
- Name of the window that is the parent of the trackbar.@Namespace(value="cv") public static int getTrackbarPos(@opencv_core.Str String trackbarname, @opencv_core.Str String winname)
@Namespace(value="cv") public static void setTrackbarPos(@opencv_core.Str BytePointer trackbarname, @opencv_core.Str BytePointer winname, int pos)
The function sets the position of the specified trackbar in the specified window.
\note [__Qt Backend Only__] winname can be empty if the trackbar is attached to the control panel.
trackbarname
- Name of the trackbar.winname
- Name of the window that is the parent of trackbar.pos
- New position.@Namespace(value="cv") public static void setTrackbarPos(@opencv_core.Str String trackbarname, @opencv_core.Str String winname, int pos)
@Namespace(value="cv") public static void setTrackbarMax(@opencv_core.Str BytePointer trackbarname, @opencv_core.Str BytePointer winname, int maxval)
The function sets the maximum position of the specified trackbar in the specified window.
\note [__Qt Backend Only__] winname can be empty if the trackbar is attached to the control panel.
trackbarname
- Name of the trackbar.winname
- Name of the window that is the parent of trackbar.maxval
- New maximum position.@Namespace(value="cv") public static void setTrackbarMax(@opencv_core.Str String trackbarname, @opencv_core.Str String winname, int maxval)
@Namespace(value="cv") public static void setTrackbarMin(@opencv_core.Str BytePointer trackbarname, @opencv_core.Str BytePointer winname, int minval)
The function sets the minimum position of the specified trackbar in the specified window.
\note [__Qt Backend Only__] winname can be empty if the trackbar is attached to the control panel.
trackbarname
- Name of the trackbar.winname
- Name of the window that is the parent of trackbar.minval
- New minimum position.@Namespace(value="cv") public static void setTrackbarMin(@opencv_core.Str String trackbarname, @opencv_core.Str String winname, int minval)
@Namespace(value="cv") public static void imshow(@opencv_core.Str BytePointer winname, @Const @ByRef Texture2D tex)
/** \brief Displays OpenGL 2D texture in the specified window.
winname
- Name of the window.tex
- OpenGL 2D texture data.@Namespace(value="cv") public static void imshow(@opencv_core.Str String winname, @Const @ByRef Texture2D tex)
@Namespace(value="cv") public static void setOpenGlDrawCallback(@opencv_core.Str BytePointer winname, OpenGlDrawCallback onOpenGlDraw, Pointer userdata)
The function setOpenGlDrawCallback can be used to draw 3D data on the window. See the example of callback function below:
void on_opengl(void* param)
{
glLoadIdentity();
glTranslated(0.0, 0.0, -1.0);
glRotatef( 55, 1, 0, 0 );
glRotatef( 45, 0, 1, 0 );
glRotatef( 0, 0, 0, 1 );
static const int coords[6][4][3] = {
{ { +1, -1, -1 }, { -1, -1, -1 }, { -1, +1, -1 }, { +1, +1, -1 } },
{ { +1, +1, -1 }, { -1, +1, -1 }, { -1, +1, +1 }, { +1, +1, +1 } },
{ { +1, -1, +1 }, { +1, -1, -1 }, { +1, +1, -1 }, { +1, +1, +1 } },
{ { -1, -1, -1 }, { -1, -1, +1 }, { -1, +1, +1 }, { -1, +1, -1 } },
{ { +1, -1, +1 }, { -1, -1, +1 }, { -1, -1, -1 }, { +1, -1, -1 } },
{ { -1, -1, +1 }, { +1, -1, +1 }, { +1, +1, +1 }, { -1, +1, +1 } }
};
for (int i = 0; i < 6; ++i) {
glColor3ub( i*20, 100+i*10, i*42 );
glBegin(GL_QUADS);
for (int j = 0; j < 4; ++j) {
glVertex3d(0.2 * coords[i][j][0], 0.2 * coords[i][j][1], 0.2 * coords[i][j][2]);
}
glEnd();
}
}
winname
- Name of the window.onOpenGlDraw
- Pointer to the function to be called every frame. This function should be
prototyped as void Foo(void\*) .userdata
- Pointer passed to the callback function.(__Optional__)@Namespace(value="cv") public static void setOpenGlDrawCallback(@opencv_core.Str BytePointer winname, OpenGlDrawCallback onOpenGlDraw)
@Namespace(value="cv") public static void setOpenGlDrawCallback(@opencv_core.Str String winname, OpenGlDrawCallback onOpenGlDraw, Pointer userdata)
@Namespace(value="cv") public static void setOpenGlDrawCallback(@opencv_core.Str String winname, OpenGlDrawCallback onOpenGlDraw)
@Namespace(value="cv") public static void setOpenGlContext(@opencv_core.Str BytePointer winname)
winname
- Name of the window.@Namespace(value="cv") public static void setOpenGlContext(@opencv_core.Str String winname)
@Namespace(value="cv") public static void updateWindow(@opencv_core.Str BytePointer winname)
winname
- Name of the window.@Namespace(value="cv") public static void updateWindow(@opencv_core.Str String winname)
@Namespace(value="cv") @ByVal public static QtFont fontQt(@opencv_core.Str BytePointer nameFont, int pointSize, @ByVal(nullValue="cv::Scalar::all(0)") Scalar color, int weight, int style, int spacing)
The function fontQt creates a cv::QtFont object. This cv::QtFont is not compatible with putText .
A basic usage of this function is the following: :
QtFont font = fontQt("Times");
addText( img1, "Hello World !", Point(50,50), font);
nameFont
- Name of the font. The name should match the name of a system font (such as
Times*). If the font is not found, a default one is used.pointSize
- Size of the font. If not specified, equal zero or negative, the point size of the
font is set to a system-dependent default value. Generally, this is 12 points.color
- Color of the font in BGRA where A = 255 is fully transparent. Use the macro CV_RGB
for simplicity.weight
- Font weight. Available operation flags are : cv::QtFontWeights You can also specify a positive integer for better control.style
- Font style. Available operation flags are : cv::QtFontStylesspacing
- Spacing between characters. It can be negative or positive.@Namespace(value="cv") @ByVal public static QtFont fontQt(@opencv_core.Str BytePointer nameFont)
@Namespace(value="cv") @ByVal public static QtFont fontQt(@opencv_core.Str String nameFont, int pointSize, @ByVal(nullValue="cv::Scalar::all(0)") Scalar color, int weight, int style, int spacing)
@Namespace(value="cv") @ByVal public static QtFont fontQt(@opencv_core.Str String nameFont)
@Namespace(value="cv") public static void addText(@Const @ByRef Mat img, @opencv_core.Str BytePointer text, @ByVal Point org, @Const @ByRef QtFont font)
The function addText draws *text* on the image *img* using a specific font *font* (see example cv::fontQt )
img
- 8-bit 3-channel image where the text should be drawn.text
- Text to write on an image.org
- Point(x,y) where the text should start on an image.font
- Font to use to draw a text.@Namespace(value="cv") public static void addText(@Const @ByRef Mat img, @opencv_core.Str String text, @ByVal Point org, @Const @ByRef QtFont font)
@Namespace(value="cv") public static void addText(@Const @ByRef Mat img, @opencv_core.Str BytePointer text, @ByVal Point org, @opencv_core.Str BytePointer nameFont, int pointSize, @ByVal(nullValue="cv::Scalar::all(0)") Scalar color, int weight, int style, int spacing)
img
- 8-bit 3-channel image where the text should be drawn.text
- Text to write on an image.org
- Point(x,y) where the text should start on an image.nameFont
- Name of the font. The name should match the name of a system font (such as
Times*). If the font is not found, a default one is used.pointSize
- Size of the font. If not specified, equal zero or negative, the point size of the
font is set to a system-dependent default value. Generally, this is 12 points.color
- Color of the font in BGRA where A = 255 is fully transparent.weight
- Font weight. Available operation flags are : cv::QtFontWeights You can also specify a positive integer for better control.style
- Font style. Available operation flags are : cv::QtFontStylesspacing
- Spacing between characters. It can be negative or positive.@Namespace(value="cv") public static void addText(@Const @ByRef Mat img, @opencv_core.Str BytePointer text, @ByVal Point org, @opencv_core.Str BytePointer nameFont)
@Namespace(value="cv") public static void addText(@Const @ByRef Mat img, @opencv_core.Str String text, @ByVal Point org, @opencv_core.Str String nameFont, int pointSize, @ByVal(nullValue="cv::Scalar::all(0)") Scalar color, int weight, int style, int spacing)
@Namespace(value="cv") public static void addText(@Const @ByRef Mat img, @opencv_core.Str String text, @ByVal Point org, @opencv_core.Str String nameFont)
@Namespace(value="cv") public static void displayOverlay(@opencv_core.Str BytePointer winname, @opencv_core.Str BytePointer text, int delayms)
The function displayOverlay displays useful information/tips on top of the window for a certain amount of time *delayms*. The function does not modify the image, displayed in the window, that is, after the specified delay the original content of the window is restored.
winname
- Name of the window.text
- Overlay text to write on a window image.delayms
- The period (in milliseconds), during which the overlay text is displayed. If this
function is called before the previous overlay text timed out, the timer is restarted and the text
is updated. If this value is zero, the text never disappears.@Namespace(value="cv") public static void displayOverlay(@opencv_core.Str BytePointer winname, @opencv_core.Str BytePointer text)
@Namespace(value="cv") public static void displayOverlay(@opencv_core.Str String winname, @opencv_core.Str String text, int delayms)
@Namespace(value="cv") public static void displayOverlay(@opencv_core.Str String winname, @opencv_core.Str String text)
@Namespace(value="cv") public static void displayStatusBar(@opencv_core.Str BytePointer winname, @opencv_core.Str BytePointer text, int delayms)
The function displayStatusBar displays useful information/tips on top of the window for a certain amount of time *delayms* . This information is displayed on the window statusbar (the window must be created with the CV_GUI_EXPANDED flags).
winname
- Name of the window.text
- Text to write on the window statusbar.delayms
- Duration (in milliseconds) to display the text. If this function is called before
the previous text timed out, the timer is restarted and the text is updated. If this value is
zero, the text never disappears.@Namespace(value="cv") public static void displayStatusBar(@opencv_core.Str BytePointer winname, @opencv_core.Str BytePointer text)
@Namespace(value="cv") public static void displayStatusBar(@opencv_core.Str String winname, @opencv_core.Str String text, int delayms)
@Namespace(value="cv") public static void displayStatusBar(@opencv_core.Str String winname, @opencv_core.Str String text)
@Namespace(value="cv") public static void saveWindowParameters(@opencv_core.Str BytePointer windowName)
The function saveWindowParameters saves size, location, flags, trackbars value, zoom and panning location of the window windowName.
windowName
- Name of the window.@Namespace(value="cv") public static void saveWindowParameters(@opencv_core.Str String windowName)
@Namespace(value="cv") public static void loadWindowParameters(@opencv_core.Str BytePointer windowName)
The function loadWindowParameters loads size, location, flags, trackbars value, zoom and panning location of the window windowName.
windowName
- Name of the window.@Namespace(value="cv") public static void loadWindowParameters(@opencv_core.Str String windowName)
@Namespace(value="cv") public static int startLoop(Pt2Func_int_PointerPointer pt2Func, int argc, @Cast(value="char**") PointerPointer argv)
@Namespace(value="cv") public static int startLoop(Pt2Func_int_BytePointer pt2Func, int argc, @Cast(value="char**") @ByPtrPtr BytePointer argv)
@Namespace(value="cv") public static int startLoop(Pt2Func_int_ByteBuffer pt2Func, int argc, @Cast(value="char**") @ByPtrPtr ByteBuffer argv)
@Namespace(value="cv") public static int startLoop(Pt2Func_int_byte__ pt2Func, int argc, @Cast(value="char**") @ByPtrPtr byte[] argv)
@Namespace(value="cv") public static void stopLoop()
@Namespace(value="cv") public static int createButton(@opencv_core.Str BytePointer bar_name, ButtonCallback on_change, Pointer userdata, int type, @Cast(value="bool") boolean initial_button_state)
The function createButton attaches a button to the control panel. Each button is added to a buttonbar to the right of the last button. A new buttonbar is created if nothing was attached to the control panel before, or if the last element attached to the control panel was a trackbar or if the QT_NEW_BUTTONBAR flag is added to the type.
See below various examples of the cv::createButton function call: :
createButton("",callbackButton);//create a push button "button 0", that will call callbackButton.
createButton("button2",callbackButton,NULL,QT_CHECKBOX,0);
createButton("button3",callbackButton,&value);
createButton("button5",callbackButton1,NULL,QT_RADIOBOX);
createButton("button6",callbackButton2,NULL,QT_PUSH_BUTTON,1);
createButton("button6",callbackButton2,NULL,QT_PUSH_BUTTON|QT_NEW_BUTTONBAR);// create a push button in a new row
bar_name
- Name of the button.on_change
- Pointer to the function to be called every time the button changes its state.
This function should be prototyped as void Foo(int state,\*void); . *state* is the current state
of the button. It could be -1 for a push button, 0 or 1 for a check/radio box button.userdata
- Pointer passed to the callback function.type
- Optional type of the button. Available types are: (cv::QtButtonTypes)initial_button_state
- Default state of the button. Use for checkbox and radiobox. Its
value could be 0 or 1. (__Optional__)@Namespace(value="cv") public static int createButton(@opencv_core.Str BytePointer bar_name, ButtonCallback on_change)
@Namespace(value="cv") public static int createButton(@opencv_core.Str String bar_name, ButtonCallback on_change, Pointer userdata, int type, @Cast(value="bool") boolean initial_button_state)
@Namespace(value="cv") public static int createButton(@opencv_core.Str String bar_name, ButtonCallback on_change)
Copyright © 2024. All rights reserved.