Some Code

  • June 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Some Code as PDF for free.

More details

  • Words: 94
  • Pages: 2
Load and display an image in OpenCV: #include "cv.h" //main OpenCV functions #include "highgui.h" //OpenCV GUI functions¯include <stdio.h> int main() { /* declare a new IplImage pointer, the basic image data structure in OpenCV */

IplImage* newImg;

/* load an image named "apple.bmp", 1 means this is a color image */

newImg = cvLoadImage("apple.bmp",1); //create a new window cvNamedWindow("Window", 1); //display the image in the window cvShowImage("Window", newImg); //wait for key to close the window cvWaitKey(0); cvDestroyWindow( "Window" ); //destroy the window cvReleaseImage( &newImg ); //release the memory for the image return 0; }

Related Documents

Some Code
June 2020 6
Some
December 2019 34
Some
October 2019 27
Some
May 2020 16
Code
June 2020 11