1st section

Preview:

Citation preview

4th Computer Vision Workshop

February 2011

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

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

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

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

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)

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

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

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

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

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

improve quality, remove noise etc

denoise

Examples: Image Enhancement

deblur

Examples: Image Enhancement

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

Examples: GIS Geographic Information Systems

Digital image processing techniques are used extensively to manipulate satellite imagery

Terrain classification

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

Examples: HCI Try to make human computer interfaces more natural

Face recognition

Gesture recognition

These tasks can be extremely difficult

Examples: Object Segmentation

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

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

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

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

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

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

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

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

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

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

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

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

Thresholding

Dr. Philip Tse Multimedia Coding and Processing 31

Sample black and white images

θ=141 θ=128 θ=115

Thresholding Different images can be

generated from using different thresholds.

Higher threshold allows only fewer brighter pixels to become white.

Thresholding Many applications in image processing

Difficult to decide the value of threshold, θ.

The threshold value may depend on the application required.

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

Introduction

Getting Started

Architecture & Modules

Sample Code

OpenCV

Introduction

Getting Started

Architecture & Modules

Sample Code

OpenCV

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

Cross-platform and extremely portable

Free!

Targeted for real-time applications

OpenCV - Introduction

Introduction

Getting Started

Architecture & Modules

Sample Code

OpenCV

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

Introduction

Getting Started

Architecture & Modules

Sample Code

OpenCV

CvAux

Defunc areas and experimental algorithms

IPP

High Performance low-level routines if IPP is present

OpenCV – Architecture & Modules

HighGUI

“Smart” windows

Image I/O, rendering

Processing keyboard and other events, timeouts

Trackbars

Mouse callbacks

Video I/O

OpenCV – Architecture & Modules

Introduction

Getting Started

Architecture & Modules

Sample Code

OpenCV

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

Recommended