Opencv -- highgui

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.