Intel OPEN SOURCE COMPUTER VISION LIBRARY - PowerPoint PPT Presentation

1 / 24
About This Presentation
Title:

Intel OPEN SOURCE COMPUTER VISION LIBRARY

Description:

Image Pyramids ... IPL 2.2 for the core library tests. Data Types. Image (IplImage); Matrix (CvMat) ... Portable GUI library (HighGUI) ... – PowerPoint PPT presentation

Number of Views:99
Avg rating:3.0/5.0
Slides: 25
Provided by: Eruh5
Category:

less

Transcript and Presenter's Notes

Title: Intel OPEN SOURCE COMPUTER VISION LIBRARY


1
OpenCV
  • Intel OPEN SOURCE COMPUTER VISION LIBRARY

2
OpenCV Functionality(more than 350 algorithms)
  • Basic structures and operations
  • Image Analysis
  • Structural Analysis
  • Object Recognition
  • Motion Analysis and Object Tracking
  • 3D Reconstruction

3
Basic Structures and Operations
  • Multidimensional array operations
  • Dynamic structures operations
  • Drawing primitives
  • Utility functions

4
Image Analysis
  • Thresholds
  • Statistics
  • Pyramids
  • Morphology
  • Distance transform
  • Flood fill
  • Feature detection
  • Contours retrieving

5
Image Thresholding
  • Fixed threshold
  • Adaptive threshold

6
Image Thresholding Examples
Source picture
Fixed threshold
Adaptive threshold
7
Statistics
Victor Eruhimov In addition to simple norm
calculation, there is a function that finds the
norm of the difference between two images.
  • min, max, mean value, standard deviation over the
    image
  • Norms C, L1, L2
  • Multidimensional histograms
  • Spatial moments up to order 3 (central,
    normalized, Hu)

8
Image Pyramids
  • Gaussian and Laplacian

9
Pyramid-based color segmentation
On still pictures
And on movies
10
Feature Detection
  • Fixed filters (Sobel operator, Laplacian)
  • Optimal filter kernels with floating point
    coefficients (first, second derivatives,
    Laplacian)
  • Special feature detection (corners)
  • Canny operator
  • Hough transform (find lines and line segments)
  • Gradient runs

11
Canny Edge Detector
12
Hough Transform
Detects lines in a binary image
  • Probabilistic Hough Transform
  • Standard Hough Transform

13
Another Sample of the Hough Transform Using
Source picture
Result
14
Using contours and geometry to classify shapes
  • Given the contour classify the geometrical figure
    shape (triangle, circle, etc)

15
Line and ellipse fitting
  • Algebraic ellipse fitting
  • Fitting lines by m-estimators

16
Software Requirements
  • Win32 platforms
  • Win9x/WinNT/Win2000/WinXP
  • C Compiler (makefiles for Visual C 6.0,Intel
    C Compiler 5.x,Borland C 5.5, Mingw GNU C/C
    2.95.3 are included ) for core libraries
  • Visual C to build the most of demos
  • DirectX 8.x SDK for directshow filters
  • ActiveTCL 8.3.3 for TCL demos
  • IPL 2.2 for the core library tests
  • Linux/NIX
  • C Compiler (tested with GNU C/C 2.95.x, 2.96,
    3.0.x)
  • TCL 8.3.3 BWidgets for TCL demos
  • Video4Linux Camera drivers for most of demos
  • IPL 2.2 for the core library tests

17
Data Types
  • Image (IplImage)
  • Matrix (CvMat)
  • Histogram (CvHistogram)

Multi-dimensional array
18
Portable GUI library (HighGUI)
  • Reading/Writing images in several formats
    (BMP,JPEG,TIFF,PxM,Sun Raster)
  • Creating windows and displaying images in it.
    HighGUI windows remember their content (no need
    to implement repainting callbacks)
  • Simple interaction facilities trackbars, getting
    input from keyboard
  • and mouse (new in Win32 version).

19
Primitive Functions
  • Open Window
  • cvvNamedWindow( "image", 1 )
  • Create Image
  • IplImage work cvCreateImage( cvsize, depth,
    channel )
  • Load Image
  • IplImage img cvvLoadImage( filename )
  • Copy Image
  • img cvCloneImage( img )
  • Show Image
  • cvvShowImage( "image", img ) // show image in
    the window "image
  • Release Image
  • cvReleaseImage( img ) // release both images

20
IplImage data Structure
  • In OpenCV Library Reference Manaul
  • typedef struct _IplImage
  • .. .. ..
  • char colorModel4
  • int width
  • int height
  • int imageSize / useful size in bytes /
  • char imageData / pointer to aligned image /
  • .. .. ..
  • IplImage

21
Other Functions
  • Most of functions are explained in
    OpenCVReferenceManual.pdf
  • cvKMeans ( int numClusters, CvVect32f samples,
    int numSamples, int vecSize, CvTermCriteria
    termcrit, int cluster )
  • cvCanny( IplImage img, IplImage edges, double
    lowThresh, double highThresh, int
    apertureSize3 )

22
An example
  • include ltstdio.hgt
  • include ltmath.hgt
  • include ltstring.hgt
  • include "cv.h" // include core library
    interface
  • include "highgui.h" // include GUI library
    interface
  • class ImageProcessor
  • IplImage img // Declare IPL/OpenCV image
    pointer
  • public
  • ImageProcessor(CString filename, bool
    displaytrue)
  • img cvvLoadImage( filename ) // load
    image
  • if (display)
  • cvvNamedWindow( "Original Image", 1 )
    // create a window

23
cvapp.h (cont.)
  • void display()
  • cvvNamedWindow( "Resulting Image", 1 ) //
    create a window
  • cvvShowImage( "Resulting Image", img ) //
    display the image on window
  • void execute()
  • ImageProcessor()
  • cvReleaseImage( img )

24
cvapp.c
  • include "stdafx.h"
  • include "cvapp.h"
  • ImageProcessor proc 0
  • // Should have been declared as
  • // void process(IplImage img)
  • // but we will use it as a callback
  • // in the next version.
  • void process(void img)
  • IplImage image reinterpret_castltIplImagegt(im
    g) // img must point to an IplImage
  • cvErode( image, image, 0, 2 )
  • void ImageProcessorexecute()
  • process(img)

25
Reference
  • http//sourceforge.net/projects/opencvlibrary/
  • Slides and Sample Programs
  • CVPR01_course.zip
  • http//www-scf.usc.edu/csci574/opencv/
  • OpenCV Library Reference Manual
  • OpenCVRefMan.pdf
  • Installation of OpenCV
  • InstallOpenCV.doc
Write a Comment
User Comments (0)
About PowerShow.com