C + + OpenCV high-speed sample learning--reading graph display

Source: Internet
Author: User

1. Key functions

1. Read in picture imread (picture or position, display format):imread_color

Display format:

 imread_unchanged =-1    // 8bit, color or  not   

 imread_grayscale    = 0    // 8bit ,  gray   

 imread_color           = 1    //   color   

 imread_anydepth      = 2   //  any depth,   

Imread_anycolor = 4//Any color

2. Display Picture imshow (picture name, mat type picture)

There are a lot of examples with Namedwindow in it, but I find that there is no problem. Maybe I haven't found it yet!

A correction was found.


3.waitKey () function

Suppose you use Cvwaitkey (0) to display only the first frame of video.Return value: Assuming delay>0, then return-1 over the specified time, assuming delay=0. There will be no return value.

Suppose the program wants to respond to a key. The IF (Cvwaitkey (1) ==keyvalue) is available, and if (Cvwaitkey () >= 0) is often present in the program, it is said that the random key in 10ms enters the IF block.


2. Code--Display the picture you entered and name it yourself!


Note: The use of opencv2.4.4, debugging through!

C + + OpenCV high-speed sample learning--reading graph display

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.