Hardware, file, and graphic user interfaces
Create window -- cvnamedwindow
If it is set to cv_window_autosize, the window size will be adjusted according to the image size as the image is loaded. You cannot adjust the window size manually.
Set to 0 and adjust it as needed
Cvdestoywindow cvdestroyallwindows
Cvgetwindowhandle cvgetwindowname
Cvloadimage reads a 16-bit color image-cv_load_image_color | cv_load_image_anydepth
Mouse events are handled using callback functions.
Cvmousecallback
Cvsetmousecallback -- register to the window (the window that generates the event)
#include <cv.h>#include
Scyclers -- trackbar Sliding bar cvcreatetrackbar callback function
Cvgettrackbarpos cvsettrackbarpos -- read and set the value of the slider bar
Opencv does not provide any form of buttons, instead of two State slide bars.
#include <cv.h>#include
Video Processing
Cvcapture-read the information required by the frame from the camera or video file
Cvcreatefilecapture cvcreatecameracapture-to enable successful video reading, you must ensure that the video decoding library is already installed in the system.
When cvcreatecameracapture-1, opencv opens a window for users to select
Read video
Cvgrabframe. This memory space is managed by opencv and should not be released.) cvretrieveframe cvqueryframe (a combination of cvgrabframe and cvretrieveframe)
For a video file, when cvgrabframe is called, the video frame will automatically move forward. The next call will automatically read the next video frame.
Cvreleasecapture
Cvgetcaptureproperty
Cvvideowriter writes a video. If the write structure is not explicitly released, the video file may be damaged.-cvreleasevideowriter
Convertimage (used for conversion between different image formats and vertical rotation of images in highgui)