Introduction to DSP ECE-S352 Fall Quarter 2000 Matlab Project 1

Similar documents
IMAGE PROCESSING Vedat Tavşanoğlu

Image Processing (EA C443)

Prof. Vidya Manian Dept. of Electrical and Comptuer Engineering

Image and Video Processing

MATLAB Image Processing Toolbox

SECTION I - CHAPTER 2 DIGITAL IMAGING PROCESSING CONCEPTS

Chapter 4 MASK Encryption: Results with Image Analysis

Image and Multidimensional Signal Processing

Digital Image Processing

Digital Image Fundamentals. Digital Image Processing. Human Visual System. Contents. Structure Of The Human Eye (cont.) Structure Of The Human Eye

Digital Image Fundamentals. Digital Image Processing. Human Visual System. Contents. Structure Of The Human Eye (cont.) Structure Of The Human Eye

Digital Image Processing

PASS Sample Size Software

Image Enhancement in Spatial Domain

Preparing Remote Sensing Data for Natural Resources Mapping (image enhancement, rectifications )

Digital Image Processing. Digital Image Fundamentals II 12 th June, 2017

Computer Vision. Howie Choset Introduction to Robotics

ROBOT VISION. Dr.M.Madhavi, MED, MVSREC

APPLICATION OF COMPUTER VISION FOR DETERMINATION OF SYMMETRICAL OBJECT POSITION IN THREE DIMENSIONAL SPACE

10 GRAPHING LINEAR EQUATIONS

Problem of the Month: Between the Lines

Detection and Verification of Missing Components in SMD using AOI Techniques

Photons and solid state detection

NSCAS - Math Table of Specifications

Lab 4 Projectile Motion

6.098/6.882 Computational Photography 1. Problem Set 1. Assigned: Feb 9, 2006 Due: Feb 23, 2006

Vision Review: Image Processing. Course web page:

Connected Mathematics 2, 6th Grade Units (c) 2006 Correlated to: Utah Core Curriculum for Math (Grade 6)

Lane Detection in Automotive

AgilEye Manual Version 2.0 February 28, 2007

A PROPOSED ALGORITHM FOR DIGITAL WATERMARKING

Mathematics Success Grade 6

CS 548: Computer Vision REVIEW: Digital Image Basics. Spring 2016 Dr. Michael J. Reale

Excel Lab 2: Plots of Data Sets

Midterm Examination CS 534: Computational Photography

System and method for subtracting dark noise from an image using an estimated dark noise scale factor

Assignment: Light, Cameras, and Image Formation

Geometry and Spatial Reasoning

Solution Q.1 What is a digital Image? Difference between Image Processing

Mech 296: Vision for Robotic Applications. Vision for Robotic Applications

8.2 IMAGE PROCESSING VERSUS IMAGE ANALYSIS Image processing: The collection of routines and

Why Should We Care? Everyone uses plotting But most people ignore or are unaware of simple principles Default plotting tools are not always the best

Chapter 12 Image Processing

CIS581: Computer Vision and Computational Photography Homework: Cameras and Convolution Due: Sept. 14, 2017 at 3:00 pm

The Scientist and Engineer's Guide to Digital Signal Processing By Steven W. Smith, Ph.D.

Mathology Ontario Grade 2 Correlations

CS534 Introduction to Computer Vision. Linear Filters. Ahmed Elgammal Dept. of Computer Science Rutgers University

Twenty-fourth Annual UNC Math Contest Final Round Solutions Jan 2016 [(3!)!] 4

AN ERROR LIMITED AREA EFFICIENT TRUNCATED MULTIPLIER FOR IMAGE COMPRESSION

CO-ORDINATE GEOMETRY CHAPTER 3. Points to Remember :

Computer Graphics Fundamentals

Application of GIS to Fast Track Planning and Monitoring of Development Agenda

Scrabble Board Automatic Detector for Third Party Applications

Removal of High Density Salt and Pepper Noise through Modified Decision based Un Symmetric Trimmed Median Filter

CSCI 1290: Comp Photo

DSP First Lab 06: Digital Images: A/D and D/A

4/9/2015. Simple Graphics and Image Processing. Simple Graphics. Overview of Turtle Graphics (continued) Overview of Turtle Graphics

Understanding Matrices to Perform Basic Image Processing on Digital Images

IMAGE FORMATION. Light source properties. Sensor characteristics Surface. Surface reflectance properties. Optics

Solution Set #2

4 th Grade Curriculum Map

4NPO3a Add and subtract: Whole numbers, or Fractions with like denominators, or Decimals through hundredths.

Images and Graphics. 4. Images and Graphics - Copyright Denis Hamelin - Ryerson University

Chapter 2: Digital Image Fundamentals. Digital image processing is based on. Mathematical and probabilistic models Human intuition and analysis

Bias errors in PIV: the pixel locking effect revisited.

Lane Detection in Automotive

>>> from numpy import random as r >>> I = r.rand(256,256);

The techniques with ERDAS IMAGINE include:

Bramble Patch. windhamfabrics.com Designed by Diane Nagle Featuring by FREE PROJECT

Cvision 2. António J. R. Neves João Paulo Silva Cunha. Bernardo Cunha. IEETA / Universidade de Aveiro

Lab 4 Projectile Motion

Problem of the Month: Between the Lines

MATLAB 6.5 Image Processing Toolbox Tutorial

AN OPTIMIZED APPROACH FOR FAKE CURRENCY DETECTION USING DISCRETE WAVELET TRANSFORM

TDI2131 Digital Image Processing

Demosaicing Algorithm for Color Filter Arrays Based on SVMs

Image Extraction using Image Mining Technique

Sensors and Scatterplots Activity Excel Worksheet

Digital images. Digital Image Processing Fundamentals. Digital images. Varieties of digital images. Dr. Edmund Lam. ELEC4245: Digital Image Processing

Lecture 2 Digital Image Fundamentals. Lin ZHANG, PhD School of Software Engineering Tongji University Fall 2016

Digital Image Processing

ECC419 IMAGE PROCESSING

Convolutional Networks Overview

Vehicle License Plate Recognition System Using LoG Operator for Edge Detection and Radon Transform for Slant Correction

4.5.1 Mirroring Gain/Offset Registers GPIO CMV Snapshot Control... 14

Defense Technical Information Center Compilation Part Notice

Foundations of Multiplication and Division

How to define Graph in HDSME

Why Should We Care? More importantly, it is easy to lie or deceive people with bad plots

Aesthetically Pleasing Azulejo Patterns

2. Nine points are distributed around a circle in such a way that when all ( )

A Geometric Correction Method of Plane Image Based on OpenCV

rum Puzzles in 2D and 3D Visualized with DSGI and Perspective Ted Clay, Clay Software and Statistics, Ashland, Oregon

>>> from numpy import random as r >>> I = r.rand(256,256);

Digital Image Processing. Lecture # 6 Corner Detection & Color Processing

Geometric Quality Assessment of CBERS-2. Julio d Alge Ricardo Cartaxo Guaraci Erthal

Determining MTF with a Slant Edge Target ABSTRACT AND INTRODUCTION

Latin Squares for Elementary and Middle Grades

Last Lecture. photomatix.com

Image Forgery. Forgery Detection Using Wavelets

Transcription:

Objective: Introduction to DSP ECE-S352 Fall Quarter 2000 Matlab Project 1 This Matlab Project is an extension of the basic correlation theory presented in the course. It shows a practical application of correlation to image processing. In fact during the late 1970 and early 1980 a company called View Engineering sold a product that implemented this process. Image Representation (simple discussion) An image may be represented by an array of numbers. Each element of the array is called a pixel (picture element) and in general represents the intensity of light from a scene falling on a 2-dimensional sensor. Each pixel represents a discrete spatial location of the scene. The value of each pixel is obtained by integrating the intensity (charge) on the sensor for some given time. The data is read out, the charge is reset and the process may repeat. Images may be any size; one example is a 640 by 480 image. This corresponds to 640 pixels across and 480 pixels down and generally corresponds to the area of a CCD camera sensor. This particular image digitization scheme has square pixels since the area of the CCD sensor is 4 units horizontally and 3 units vertically (a 4 to 3 aspect ratio). Similar to the sampling of electronic signals, spatial sampling defines the ability to discern characteristics such as lines or edges in a digitized image. In image processing, the origin of a image is traditionally the top left corner (0,0) and the x axis increased going across while the why axis increased going down. This makes a right hand coordinate system with the z axis going into the plane of the paper. If the image is a binary image then a bit can represent each pixel (black = 0 and white = 1); if the image is a gray scale image then a word (8 bits) may be used to represent each pixel. For the gray scale image, a word represents values in the range [0, 255] with zero as black and 255 as white with gray values. Other gray scale representations are also possible. Hence images are represented as spatially sampled and intensity sampled signals. Binary Correlation Matlab Exercise page 1 of 5

Image Comparisons/Binary correlation In many image processing applications, it is desired to find a particular pattern in a larger image. One method of doing this to use a reference image which corresponds to the pattern in questions and find the best fit of the pattern in the larger image. Hence for each position in the test image, one would expect some type of "quality" measure defining how good of a match occurred (say from 0 to 100 %). Mathematically this may be represented as: where: O(x o,y o ) = G{T(x-x o, y-y o ), t(x,y)} t(x,y) = the image to be tested T(x,y) = the reference sub-image (smaller than t(x,y)) x o,y o = the spatial translation offset of the sub-image in the test image O(x o,y o ) = the response of the operation G{.} = the comparison operator There are many type of operators that can be used to perform the comparison such as "nearest neighbor classifier" or the Fisher Statistical Correlation Coefficient sometimes called Normalized Correlation. For our example and exercise we will use binary correlation. As expected both the image and template are binary in nature. The process is defined as follows: 1) A template is defined. For binary correlation it is usually part of the image (i.e. a sub-image) but may take any geometric form that is desired such as a square, rectangle, line or even a disjoint set of pixels that maintain a fixed spatial relationship to one another. In the View Engineering product one would demonstrate (or teach) the template by placing a box around the portion of the image that corresponded to the area of interest. 2) One pixel of the template is chosen as a reference point. 3) The template is then overlaid on the test image. The number (or fraction) of pixels in the template that match the test image over which it is placed are computed. Basically a count is made of the Binary Correlation Matlab Exercise page 2 of 5

pixels that match (either 1's or 0's) This is the sum of a complementary XOR function performed between the corresponding template and test image pixels. 4) The value computed above is placed in a resultant image, O(x o,y o ) at the location corresponding to the template's reference position. 5) The procedure is repeated until the template has been overlaid on each pixel location in the entire image. It may be necessary to "pad" the test image with rows or columns of zeros, that is provide more data in cases where the template extends beyond the image. Numerical Example: consider the following 3x3 template and the following 15x20 test image 01111000011010111111 11000110011111000000 11011011100010011110 10001000110000111111 00011001110111110000 01000110010011000110 00110110110000011011 11110101000101000000 00010100010011111101 01010000110011001111 11100111000111011110 00001011110100011101 10100001011101111101 01101110001011101100 01110000111110111101 If one selects the top left corner of the template as the reference, it is easily seen that the image runs out of data along the last two columns and two rows, hence two columns of zeros must be added to the right of the image Binary Correlation Matlab Exercise page 3 of 5

and two rows must be added to the bottom of the image so the reference point can be moved over the entire 15x20 image. The resulting output is given as the following 15x20 image 6 2 3 5 3 6 4 4 5 7 4 9 3 4 3 2 2 3 3 3 5 5 5 6 5 6 5 5 5 2 4 4 4 4 5 6 6 5 5 3 5 1 5 5 2 3 4 5 5 3 3 4 3 4 7 5 6 7 5 5 4 4 5 6 4 5 4 6 7 4 5 7 6 6 5 3 3 3 3 3 4 4 4 3 5 5 3 4 5 2 5 5 5 3 4 4 4 6 5 3 5 4 6 3 7 4 6 4 7 3 4 2 5 3 6 5 6 6 5 5 6 6 7 2 6 5 3 4 5 3 4 6 4 3 3 3 2 2 5 2 4 2 6 3 6 3 4 4 5 3 5 4 8 5 6 7 5 5 5 4 4 5 5 2 5 2 5 4 7 3 4 5 5 2 4 4 6 5 6 4 8 4 5 5 4 7 4 4 4 2 6 6 6 4 5 6 6 3 6 2 1 5 3 4 6 4 8 4 6 4 5 2 4 2 5 5 5 4 5 4 6 5 2 5 1 5 3 5 5 6 5 5 5 6 5 6 6 3 6 4 4 6 5 5 7 5 5 2 4 3 5 4 5 5 4 4 6 1 6 2 6 7 4 5 3 4 4 6 6 8 5 6 5 6 5 7 6 5 5 5 4 3 4 3 4 4 3 4 3 3 3 4 2 4 3 3 4 2 5 3 The corresponding surface plot shows the peak value of 9 corresponding to spatial location row 1 column 12. Two Matlab mfiles for this example are included on the web site. They are called binary_corr.m and main_bc.m Binary Correlation Matlab Exercise page 4 of 5

Student assignment: 1) Get the Matlab programs to run and duplicate the results of the example. This code had been designed to run on either the Student or Professional version. It should run on versions 4.3 and above. Make sure you understand how the template and image are overlayed. Look carefully at the reshape function. Use the rotate tool on the surface plot to set the axes similar to the example. 2) Modify the program to work with a larger template. Use the following 5x3 template Define how much padding you will need to generate the output matrix. Does this larger template give better discrimination (i.e. less larger numbers as compared to the 3x3 template)? Discuss why. 3) The process used for binary correlation can also be used to find features such as corners in an image. To illustrate this concept make a 10x10 image consisting of white pixels in the center 6x6 array surrounded with a black background (all zeros). Define the following templates Top left Top right Bottom left Bottom right Use binary correlation to find the four corners. Obviously you need to run each template separately and combine the results. Think of a way to identify this graphically. 4) Define a template that will find the left edge. Test you template on the image of part 3. Binary Correlation Matlab Exercise page 5 of 5