46
4th Computer Vision Workshop February 2011

1st section

Embed Size (px)

Citation preview

Page 1: 1st section

4th Computer Vision Workshop

February 2011

Page 2: 1st section

Introduction to Image Processing

What is a digital image?

What is digital image processing?

Usage examples of digital image processing

Key stages in digital image processing

Page 3: 1st section

Introduction to Image Processing

What is a digital image?

What is digital image processing?

Usage examples of digital image processing

Key stages in digital image processing

Page 4: 1st section

What is a Digital Image? A digital image is a representation of a two-

dimensional image as a finite set of digital values, called picture elements or pixels

Page 5: 1st section

What is a Digital Image? (cont…)

Pixel values typically represent gray levels, colours, heights, opacities etc

Remember digitization implies that a digital image is an approximation of a real scene

1 pixel

Page 6: 1st section

What is a Digital Image? (cont…)

Common image formats include:

1 sample per point (B&W or Grayscale)

3 samples per point (Red, Green, and Blue)

4 samples per point (Red, Green, Blue, and “Alpha”, a.k.a. Opacity)

Page 7: 1st section

Introduction to Image Processing

What is a digital image?

What is digital image processing?

Usage examples of digital image processing

Key stages in digital image processing

Page 8: 1st section

What is Digital Image Processing? Digital image processing focuses on two major tasks

Improvement of pictorial information for human interpretation

Processing of image data for storage, transmission and representation for autonomous machine perception

Some argument about where image processing ends and fields such as image analysis and computer vision start

Page 9: 1st section

What is Digital Image Processing? (cont…)

The continuum from image processing to computer vision can be broken up into low-, mid- and high-level processes

Low Level Process

Input: Image Output: Image

Examples: Noise removal, image sharpening

Mid Level Process

Input: Image Output: Attributes

Examples: Object recognition, segmentation

High Level Process

Input: Attributes Output: Understanding

Examples: Scene understanding, autonomous navigation

Page 10: 1st section

Introduction to Image Processing

What is a digital image?

What is digital image processing?

Usage examples of digital image processing

Key stages in digital image processing

Page 11: 1st section

Examples: Image Enhancement One of the most common uses of DIP techniques:

improve quality, remove noise etc

Page 12: 1st section

denoise

Examples: Image Enhancement

Page 13: 1st section

deblur

Examples: Image Enhancement

Page 14: 1st section

Examples: Medicine Take slice from MRI scan of canine heart, and find boundaries between types of tissue

Image with gray levels representing tissue density

Use a suitable filter to highlight edges

Original MRI Image of a Dog Heart Edge Detection Image

Page 15: 1st section

Examples: GIS Geographic Information Systems

Digital image processing techniques are used extensively to manipulate satellite imagery

Terrain classification

Page 16: 1st section

Examples: Law Enforcement Image processing techniques are used extensively by law enforcers

Number plate recognition for speed cameras/automated toll systems

Fingerprint recognition

Enhancement of CCTV images

Page 17: 1st section

Examples: HCI Try to make human computer interfaces more natural

Face recognition

Gesture recognition

These tasks can be extremely difficult

Page 18: 1st section

Examples: Object Segmentation

Page 19: 1st section

Introduction to Image Processing

What is a digital image?

What is digital image processing?

Usage examples of digital image processing

Key stages in digital image processing

Page 20: 1st section

Key Stages in Digital Image Processing

Image Acquisition

Image Restoration

Morphological Processing

Segmentation

Representation & Description

Image Enhancement

Object Recognition

Problem Domain

Colour Image Processing

Image Compression

Page 21: 1st section

Key Stages in Digital Image Processing: Image Acquisition

Image Acquisition

Image Restoration

Morphological Processing

Segmentation

Representation & Description

Image Enhancement

Object Recognition

Problem Domain

Colour Image Processing

Image Compression

Page 22: 1st section

Key Stages in Digital Image Processing: Image Enhancement

Image Acquisition

Image Restoration

Morphological Processing

Segmentation

Representation & Description

Image Enhancement

Object Recognition

Problem Domain

Colour Image Processing

Image Compression

Page 23: 1st section

Key Stages in Digital Image Processing: Image Restoration

Image Acquisition

Image Restoration

Morphological Processing

Segmentation

Representation & Description

Image Enhancement

Object Recognition

Problem Domain

Colour Image Processing

Image Compression

Page 24: 1st section

Key Stages in Digital Image Processing: Morphological Processing

Image Acquisition

Image Restoration

Morphological Processing

Segmentation

Representation & Description

Image Enhancement

Object Recognition

Problem Domain

Colour Image Processing

Image Compression

Page 25: 1st section

Key Stages in Digital Image Processing: Segmentation

Image Acquisition

Image Restoration

Morphological Processing

Segmentation

Representation & Description

Image Enhancement

Object Recognition

Problem Domain

Colour Image Processing

Image Compression

Page 26: 1st section

Key Stages in Digital Image Processing: Object Recognition

Image Acquisition

Image Restoration

Morphological Processing

Segmentation

Representation & Description

Image Enhancement

Object Recognition

Problem Domain

Colour Image Processing

Image Compression

Page 27: 1st section

Key Stages in Digital Image Processing: Representation & Description

Image Acquisition

Image Restoration

Morphological Processing

Segmentation

Representation & Description

Image Enhancement

Object Recognition

Problem Domain

Colour Image Processing

Image Compression

Page 28: 1st section

Key Stages in Digital Image Processing: Image Compression

Image Acquisition

Image Restoration

Morphological Processing

Segmentation

Representation & Description

Image Enhancement

Object Recognition

Problem Domain

Colour Image Processing

Image Compression

Page 29: 1st section

Key Stages in Digital Image Processing: Colour Image Processing

Image Acquisition

Image Restoration

Morphological Processing

Segmentation

Representation & Description

Image Enhancement

Object Recognition

Problem Domain

Colour Image Processing

Image Compression

Page 30: 1st section

Thresholding Use a threshold to transforms an input image

into a binary image

Compare each input pixel value f(i, j) against the threshold, θ, and setting the output pixel value g(i, j) appropriately

0 if ( , )( , )

1 otherwise

f i jg i j

Page 31: 1st section

Thresholding

Dr. Philip Tse Multimedia Coding and Processing 31

Sample black and white images

θ=141 θ=128 θ=115

Page 32: 1st section

Thresholding Different images can be

generated from using different thresholds.

Higher threshold allows only fewer brighter pixels to become white.

Page 33: 1st section

Thresholding Many applications in image processing

Difficult to decide the value of threshold, θ.

The threshold value may depend on the application required.

Page 34: 1st section

Summary We have looked at:

What is a digital image?

What is digital image processing?

Usage examples of digital image processing

Key stages in digital image processing

Next section we will talk about OpenCV

Page 35: 1st section
Page 36: 1st section

Introduction

Getting Started

Architecture & Modules

Sample Code

OpenCV

Page 37: 1st section

Introduction

Getting Started

Architecture & Modules

Sample Code

OpenCV

Page 38: 1st section

Open Source Computer Vision Library

Originally developed by Intel, currently maintained by Willow Garage

Written in C/C++

Implements Image Processing and Computer Vision algorithms

OpenCV - Introduction

Page 39: 1st section

Cross-platform and extremely portable

Free!

Targeted for real-time applications

OpenCV - Introduction

Page 40: 1st section

Introduction

Getting Started

Architecture & Modules

Sample Code

OpenCV

Page 41: 1st section

http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.1/

Page 42: 1st section

Introduction

Getting Started

Architecture & Modules

Sample Code

OpenCV

Page 43: 1st section

CvAux

Defunc areas and experimental algorithms

IPP

High Performance low-level routines if IPP is present

OpenCV – Architecture & Modules

Page 44: 1st section

HighGUI

“Smart” windows

Image I/O, rendering

Processing keyboard and other events, timeouts

Trackbars

Mouse callbacks

Video I/O

OpenCV – Architecture & Modules

Page 45: 1st section

Introduction

Getting Started

Architecture & Modules

Sample Code

OpenCV

Page 46: 1st section

Example code: load an image from disk and display it on the screen

#include “highgui.h”

int main( int argc, char **argv )

{

IplImage *img = cvLoadImage( argv[1] );

CvNamedWindow(“Example1”, CV_WINDOW_AUTOSIZE);

cvShowImage(“Example1”, img);

cvWaitKey(0);

cvReleaseImage( &img );

cvDestroyWindow(“Example1”);

}

OpenCV – Sample Code