1 / 24

Introduction to OpenCV

Introduction to OpenCV. Outline. What is OpenCV Installing Ubuntu Installing OpenCV Coding with OpenCV References for OpenCV. Outline. What is OpenCV Installing Ubuntu Installing OpenCV Coding with OpenCV References for OpenCV. What is OpenCV.

talisa
Télécharger la présentation

Introduction to OpenCV

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. LNMIIT DIP Winter Workshop 2011. Manohar Kuse Introduction to OpenCV

  2. Outline • What is OpenCV • Installing Ubuntu • Installing OpenCV • Coding with OpenCV • References for OpenCV LNMIIT DIP Winter Workshop 2011. Manohar Kuse

  3. Outline • What is OpenCV • Installing Ubuntu • Installing OpenCV • Coding with OpenCV • References for OpenCV LNMIIT DIP Winter Workshop 2011. Manohar Kuse

  4. What is OpenCV • C++ Library for Image Processing and Computer Vision • Developed by Intel • Can take advantage of multiple processors • Developed for high performance • Support for Web-cam, Microsoft Connect and other specialized cameras LNMIIT DIP Winter Workshop 2011. Manohar Kuse

  5. Linux Vs. Windows • Recommended : Install on Linux • NOT Recommended : OpenCV on Windows LNMIIT DIP Winter Workshop 2011. Manohar Kuse

  6. Outline • What is OpenCV • Installing Ubuntu • Installing OpenCV • Coding with OpenCV • References for OpenCV LNMIIT DIP Winter Workshop 2011. Manohar Kuse

  7. Installing Linux http://www.ubuntu.com/download/ubuntu/windows-installer LNMIIT DIP Winter Workshop 2011. Manohar Kuse

  8. Installing Linux http://www.ubuntu.com/download/ubuntu/windows-installer LNMIIT DIP Winter Workshop 2011. Manohar Kuse

  9. Installing Linux http://www.ubuntu.com/download/ubuntu/windows-installer LNMIIT DIP Winter Workshop 2011. Manohar Kuse

  10. Installing Linux http://www.ubuntu.com/download/ubuntu/windows-installer LNMIIT DIP Winter Workshop 2011. Manohar Kuse

  11. Installing Linux http://www.ubuntu.com/download/ubuntu/windows-installer LNMIIT DIP Winter Workshop 2011. Manohar Kuse

  12. Outline • What is OpenCV • Installing Ubuntu • Installing OpenCV • Coding with OpenCV • References for OpenCV LNMIIT DIP Winter Workshop 2011. Manohar Kuse

  13. OpenCV Installation • Open Synaptic Package Manager LNMIIT DIP Winter Workshop 2011. Manohar Kuse

  14. OpenCV Installation • Set Proxy LNMIIT DIP Winter Workshop 2011. Manohar Kuse

  15. OpenCV Installation • Search & Install “opencv-dev” LNMIIT DIP Winter Workshop 2011. Manohar Kuse

  16. Outline • What is OpenCV • Installing Ubuntu • Installing OpenCV • Coding with OpenCV • References for OpenCV LNMIIT DIP Winter Workshop 2011. Manohar Kuse

  17. Sample Code • Header Files #include <stdlib.h> #include <stdio.h> #include <math.h> #include <cv.h> #include <highgui.h> Sample code and compilation instructions : Opencv kit for download on “lnmiitdip.wordpress.com” LNMIIT DIP Winter Workshop 2011. Manohar Kuse

  18. Sample Code IplImage* img = 0;  Declaration of opencv-image char * fileName = “file.png”; img=cvLoadImage(fileName); Load image as a struct LNMIIT DIP Winter Workshop 2011. Manohar Kuse

  19. IplImage • Height : img->height • Width : img->width • Channels : img->nChannels • (Number of channels) • Data : img->imageData • (Array of size W x H x nC LNMIIT DIP Winter Workshop 2011. Manohar Kuse

  20. Sample Code • Iterate through the IplImage for(i=0;i<height;i++) { for(j=0;j<width;j++) { for(k=0;k<channels;k++) { data[i*step+j*channels+k]=255- data[i*step+j*channels+k]; } } } LNMIIT DIP Winter Workshop 2011. Manohar Kuse

  21. Sample Code cvNamedWindow("mainWin“,CV_WINDOW_AUTOSIZE); Create a display window cvShowImage("mainWin", img );  Show Image cvWaitKey(0);  Give delay (Pause) LNMIIT DIP Winter Workshop 2011. Manohar Kuse

  22. Links OpenCV Introduction: http://www.cs.iit.edu/~agam/cs512/lect-notes/opencv-intro/opencv-intro.html OpenCV E-Book: “Learning OpenCV” By Gary Bradski and Adrian Kaehler Official Site: http://opencv.willowgarage.com/wiki/ LNMIIT DIP Winter Workshop 2011. Manohar Kuse

  23. Download • Download “OpenCV Kit” – lnmiitdip.wordpress.com • Contains • Instruction for compilation • Sample code • Video dataset LNMIIT DIP Winter Workshop 2011. Manohar Kuse

  24. Thanks  LNMIIT DIP Winter Workshop 2011. Manohar Kuse

More Related