"OpenCV Exercise" simply displays the code for the picture

Source: Internet
Author: User
Tags what debugging

Today, according to the online tutorial to try the most basic picture display.

First of all, I would like to say the compile-time problem, at the beginning of the compilation will appear unrecognized Cvreleaseimage, because there is no corresponding core library files in the configuration.

Add in to solve the problem.

Another problem is that after compiling the program, you are prompted to deny access, which looks like the League of Legends. Seems to be lol shut down what debugging function, in short, restart the computer just fine.

Finally put the corresponding code:

#include <iostream>//#include <opencv/cv.h>//#include <opencv/cxcore.h>#include <opencv2/highgui/highgui.hpp>//Show PicturesintMain () {Iplimage* src = cvloadimage ("d:\\1.jpg"); Cvnamedwindow (" Picture"); Cvshowimage (" Picture", SRC); Cvwaitkey (0); Cvreleaseimage (&src); Cvdestroywindow (" Picture"); return 0;}

Now I still do not understand the principle of the inclusion of the library, the beginning of the video to do when the include <opencv/cv.h> written in the inside, now note found that there is no problem ah. With more exposure to OPENCV, you may be able to understand this slowly.

"OpenCV Exercise" simply displays the code for the picture

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.