OpenCV Learning Highgui Graphical user interface initial "1"

Source: Internet
Author: User

Highgui is a graphical user interface module. Including:
1, input and output;
2, video capture;
3, graphics and video decoding code;
4, graphics interface and interfaces.

Because OPENCV.HPP contains the core, Objdetect, Ingproc, photo, video, featurse2d, calib3d, ML, Highgui, contrib and other modules. General development Lazy
#include <opencv2\opencv.hpp>. However, the file is submitted with a specific module header.

Namespaces will let you write code simple: using namespace CV, then you can Imread (... Otherwise you will have to c::imread every time (...) )。

Mat Class (OPENCV2): This class is very important. Be sure to check the data to figure out its structure and its use. Use class to avoid the duration of C: pointer.
Is the data structure used to hold images and other matrix data. The default size is 0. You can also initialize Dimensions: Cv::mat pic (320,640,cv::scalar (100));
To read a video or image file:
Mat scrimage = Imread ("girl.jpg");
The prototype is: Mat imread (const string & Filename,int Flags=1).
Follow the flags: Check it out, it's useful.
Image display: inshow (const string& Winname,imputarray mat). Inputarray/outputaray can often be used simply as a mat type.
Create window: Namedwindow (const string& winname,int flags=window_autosize). Infrequently used are destroywindows () or destroyallwindows ().
Output image to File: Imwrite ().
  

  

OpenCV Learning Highgui Graphical user interface initial "1"

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.