Matrices and Digital Images

Similar documents
An Introduction to Images

Lab # 2 - ACS I Part I - DATA COMPRESSION in IMAGE PROCESSING using SVD

Filtering Images. Contents

BME I5000: Biomedical Imaging

Understanding Tracking and StroMotion of Soccer Ball

IMAGING. Images are stored by capturing the binary data using some electronic devices (SENSORS)

Segmentation of Mushroom and Cap Width Measurement Using Modified K-Means Clustering Algorithm

Image Processing. Ch1: Introduction. Prepared by: Hanan Hardan. Hanan Hardan 1

EE795: Computer Vision and Intelligent Systems

Extensions of One-Dimensional Gray-level Nonlinear Image Processing Filters to Three-Dimensional Color Space

RKUniversity, India. Key Words Digital image processing, Image enhancement, FPGA, Hardware design languages, Verilog.

Multimedia Retrieval Ch 5 Image Processing. Anne Ylinen

Digital Image Processing COSC 6380/4393

An Introduc+on to Mathema+cal Image Processing IAS, Park City Mathema2cs Ins2tute, Utah Undergraduate Summer School 2010

System Verification of Hardware Optimization Based on Edge Detection

Digital Image Fundamentals. Prof. George Wolberg Dept. of Computer Science City College of New York

WAVELET USE FOR IMAGE CLASSIFICATION. Andrea Gavlasová, Aleš Procházka, and Martina Mudrová

CP467 Image Processing and Pattern Recognition

Ulrik Söderström 17 Jan Image Processing. Introduction

Image Processing: Final Exam November 10, :30 10:30

Image processing. Reading. What is an image? Brian Curless CSE 457 Spring 2017

Reduced Image Noise on Shape Recognition Using Singular Value Decomposition for Pick and Place Robotic Systems

Hybrid Approach for MRI Human Head Scans Classification using HTT based SFTA Texture Feature Extraction Technique

Computer Assisted Image Analysis TF 3p and MN1 5p Lecture 1, (GW 1, )

Visualisation : Lecture 1. So what is visualisation? Visualisation

COMPUTER VISION. Dr. Sukhendu Das Deptt. of Computer Science and Engg., IIT Madras, Chennai

Chapter 3. Image Processing Methods. (c) 2008 Prof. Dr. Michael M. Richter, Universität Kaiserslautern

Digital Image Processing. Lecture # 3 Image Enhancement

Filtering of impulse noise in digital signals using logical transform

CDS Computing for Scientists. Final Exam Review. Final Exam on December 17, 2013

Digital Image Processing. Lecture # 15 Image Segmentation & Texture

UNIT-2 IMAGE REPRESENTATION IMAGE REPRESENTATION IMAGE SENSORS IMAGE SENSORS- FLEX CIRCUIT ASSEMBLY

A Modified SVD-DCT Method for Enhancement of Low Contrast Satellite Images

Linear Algebra Review

Information page for written examinations at Linköping University TER2

DEVELOPMENT OF A MATHEMATICAL MORPHOLOGY TOOL FOR EDUCATION PURPOSE

APPLICATIONS OF THE SINGULAR VALUE DECOMPOSITION

1. (10 pts) Order the following three images by how much memory they occupy:

Babu Madhav Institute of Information Technology Years Integrated M.Sc.(IT)(Semester - 7)

An Introduction to Images. CS6640/BIOENG6640 Ross Whitaker SCI Institute, School of Computing University of Utah

ECG782: Multidimensional Digital Signal Processing

Binary representation and data

APPM 2360 Lab #2: Facial Recognition

Topic 5 Image Compression

SYDE 575: Introduction to Image Processing

A Prehistory of Arithmetic

Biometrics Technology: Image Processing & Pattern Recognition (by Dr. Dickson Tong)

Chapter 3 Set Redundancy in Magnetic Resonance Brain Images

Using Templates to Introduce Time Efficiency Analysis in an Algorithms Course

Introducing Robotics Vision System to a Manufacturing Robotics Course

SEGMENTATION OF IMAGES USING GRADIENT METHODS AND POLYNOMIAL APPROXIMATION

Texture Segmentation and Classification in Biomedical Image Processing

Image Processing. Application area chosen because it has very good parallelism and interesting output.

Mathematical morphology... M.1 Introduction... M.1 Dilation... M.3 Erosion... M.3 Closing... M.4 Opening... M.5 Summary... M.6

Teachers Teaching with Technology (Scotland) Teachers Teaching with Technology. Scotland T 3. Matrices. Teachers Teaching with Technology (Scotland)

Key Frame Extraction using Faber-Schauder Wavelet

Features. Sequential encoding. Progressive encoding. Hierarchical encoding. Lossless encoding using a different strategy

Lecture 2 Image Processing and Filtering

Computer Vision CSCI-GA Assignment 1.

What is Visualization? Introduction to Visualization. Why is Visualization Useful? Visualization Terminology. Visualization Terminology

Recognition, SVD, and PCA

Intensification Of Dark Mode Images Using FFT And Bilog Transformation

ECG782: Multidimensional Digital Signal Processing

Getting Students Excited About Learning Mathematics

ISSN: ISO 9001:2008 Certified International Journal of Engineering and Innovative Technology (IJEIT) Volume 5, Issue 6, December 2015

AMS526: Numerical Analysis I (Numerical Linear Algebra)

Open Access Robust Design for Generalized Point Extract CNN with Application in Image Processing

ENG 7854 / 9804 Industrial Machine Vision. Midterm Exam March 1, 2010.

Redundant Data Elimination for Image Compression and Internet Transmission using MATLAB

types of data require absolute reliability. Examples are an executable computer program, a legal text document, a medical X-ray image, and genetic

EDGE BASED REGION GROWING

SCIENCE & TECHNOLOGY

Please be sure to save a copy of this activity to your computer!

Computer Graphics Fundamentals. Jon Macey

Hybrid filters for medical image reconstruction

Computer Science Faculty, Bandar Lampung University, Bandar Lampung, Indonesia

An idea which can be used once is a trick. If it can be used more than once it becomes a method

Relationship between Fourier Space and Image Space. Academic Resource Center

Optimization of Bit Rate in Medical Image Compression

Bits, Words, and Integers

Digital Image Processing

Reversible Wavelets for Embedded Image Compression. Sri Rama Prasanna Pavani Electrical and Computer Engineering, CU Boulder

ROTATION INVARIANT TRANSFORMS IN TEXTURE FEATURE EXTRACTION

EE795: Computer Vision and Intelligent Systems

Colour and Number Representation. From Hex to Binary and Back. Colour and Number Representation. Colour and Number Representation

(Refer Slide Time 00:17) Welcome to the course on Digital Image Processing. (Refer Slide Time 00:22)

An SVD-based Fragile Watermarking Scheme With Grouped Blocks

CS 5540 Spring 2013 Assignment 3, v1.0 Due: Apr. 24th 11:59PM

Chapter 5. Divide and Conquer. Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved.

Chapter 17: Information Science Lesson Plan

(Creating Arrays & Matrices) Applied Linear Algebra in Geoscience Using MATLAB

PRE-ALGEBRA PREP. Textbook: The University of Chicago School Mathematics Project. Transition Mathematics, Second Edition, Prentice-Hall, Inc., 2002.

Temperature Distribution Measurement Based on ML-EM Method Using Enclosed Acoustic CT System

Objectives. Connecting with Computer Science 2

Interesting Application. Linear Algebra

Image Enhancement Methods Approach using Verilog Hardware Description Language

Digital Images. Kyungim Baek. Department of Information and Computer Sciences. ICS 101 (November 1, 2016) Digital Images 1

Available Online through

Feature Detectors - Sobel Edge Detector

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics. Numbers & Number Systems

Transcription:

Matrices and Digital Images Dirce Uesu Pesco and Humberto José Bortolossi Institute of Mathematics and Statistics Fluminense Federal University 1 Binary, grayscale and color images The images you see on internet pages and the photos you take with your mobile phone are examples of digital images. It is possible to represent this kind of image using matrices. For example, the small image of Felix the Cat can be represented by a 5 5 matrix whose elements are the numbers 0 and 1. These numbers specify the color of each pixel 1 : the number 0 indicates black, and the number 1 indicates white. Digital images using only two colors are called binary images or boolean images. Grayscale images can also be represented by matrices. Each element of the matrix determines the intensity of the corresponding pixel. For convenience, most of the current digital files use integer numbers between 0 (to indicate black, the color of minimal intensity) and 55 (to indicate white, maximum intensity), giving a total of 5 = 8 different levels of gray. Color images, in turn, can be represented by three matrices. Each matrix specifies the amount of Red, Green and Blue that makes up the image. This color system is known as RGB. The elements of these matrices are integer numbers between 0 and 55, and they determine the intensity of the pixel with respect to the color of the matrix. Thus, in the RGB system, it is possible to represent 5 = 4 = 17771 different colors. 1 A pixel is the smallest graphical element of a matricial image, which can take only one color at a time. This quantity of levels of gray is reasonable to work with images in WEB pages. However, there are certain specific applications that need more levels of gray in order to reproduce the image with more details and avoid rounding errors in numerical calculations, as is the case of medical images. There are many other color systems that are used depending on the application: CMYK (for printing), Y IQ (for TV analog transmission in NTSC), etc. 1

A =, R =, G =, B =. Digital image processing and operations with matrices Once a digital image can be represented by matrices, we may ask how operations on their elements affect the corresponding image. For example, if we consider the binary image A below as a matrix, say A =(a i,j ), then the image B corresponds to the transposed matrix of A, thatis,b =(b i,j )=(a j,i )= A T. The image H, by its turn, corresponds to the matrix (a j,5i+1 ). Try to discover the matricial relationships between the image A and the other images! A B C D E F G H Another example: if we take the standard arithmetic mean of the component matrices R, G and B from a color image A, we will get a grayscale version of the image (non-integer values are rounded to the nearest integer): 1 + 1 + 1 =. One more example: using the operations of multiplication by a scalar and sum of matrices, it is possible to create an image transition effect commonly used, for instance, in Power Point c presentations and slide shows. More precisely, consider two grayscale images of the same size, represented by the matrices A and Z. For each scalar (real number) t in the interval [0, 1], define the matrix M(t) =(1 t)a + tz. Notice that M(0) = A, M(1) = Z and, for each t between 0 and 1, the elements of the matrix M(t) are between the elements of the matrices A and Z. Therefore, when t varies from 0 to 1, the matrix M(t) varies from A to Z. For the case of color images, the transformation above must be applied to the matrices R, G and B that compose each image. M(0) = A M(0.1) M(0.5) M(0.8) M(0.50) M(0.) M(0.75) M(0.88) M(1) = Z

Multiplication of matrices also has applications in digital image processing. Although our next example will be more elaborate (with a rationale based on more advanced mathematical techniques usually only studied in Linear Algebra university courses), we believe, still, that it will be of interest to the reader, since this will have the opportunity to enjoy an amazing application derived from the ability to decompose a matrix as a product of matrices with special structures. The omitted details may be found in the references [Lay, 011] and [Poole, 005]. Consider, therefore, a singular value decomposition (SVD), that consists of writing a matrix A m n as the product of three matrices: A m n = U m m S m n V T n n, where U and V are orthogonal matrices (that is, U T U and V T V are m m and n n identity matrices, respectively) and S is a matrix whose elements s i,j are equal to zero for i j and s 1,1 s, s k,k 0, with k =min{m, n}. Here is an example of an SVD decomposition: A = [ ] 1 1 0 = USV 0 1 1 T = [ 0 0 0 1 0 ] 0 T. It can be shown that every matrix has an SVD decomposition ([Lay, 011], [Poole, 005]). Moreover, algorithms exist that allow us to calculate such decompositions using a computer. The key point of our example is to observe that if u 1, u,...,u m are the columns of the matrix U and v 1, v,...,v n are the columns of the matrix V,then A = USV T = s 1,1 u 1 v T 1 + s, u v T + + s k,k u k v T k. Why is that? Suppose that A, a grayscale image of size 1000 1000, must be transmitted from a satellite to a laboratory on Earth. In principle, the satellite would have to send 1 million numbers (one for each pixel). As typically only the first elements s i,i of the matrix S of the SVD decomposition for A are significant (the others are small ), it is enough, then, that the satellite sends, say, the 0 first columns of U and V, and the 0 first numbers s i,i (totaling only 0 1000 + 0 1000 + 0 = 4000 numbers that must be sent). Upon receiving these data, the laboratory on Earth calculates the matrix s 1,1 u 1 v T 1 + s,u v T + + s 0,0u 0 v T 0 that will give an approximation of the original image. Let s see an example: the picture below of the mathematician Christian Felix Klein (1849-195) has 70 54 = 7780 pixels. From the SVD decomposition of the corresponding matrix of this image, we can calculate the matrices s 1,1 u 1 v T 1 + s, u v T + + s r,r u r v T r for r =1, 5, 10 and 0. These matrices generate approximations to the original image, as illustrated in the following figures. Notice that the original image corresponds to the case r = 54. It is quite impressive, is it not?

Other applications r =1 r =5 r =10 r =0 Digital image processing has many applications, such as remote sensing, data transmission, medicine, robotics, computer vision, film industry, etc. In remote sensing, for example, images acquired by satellites are useful for tracking natural resources, geographical mapping, analysis of urban growth, and many other environmental applications. In the transmission of images, we have communications via fax, networks, the internet, and closed-circuit TV for monitoring and security. In medical applications, we have X-ray image processing, projection images of transaxial tomography, radiology, nuclear magnetic resonance (NMR) and ultrasonic scanning. Some methods of acquisition and transmission can generate noise in an image. The median filter is an image processing technique used to remove them or reduce their effects: for each element of the matrix that represents the image, we observe its neighboring elements and, then, we arrange them in an ordered list. The median filter consists of choosing the central element of this list and replace the element at the center by this one. Ordered List selected value Result Image with noise Image with the median filter There are many other techniques in image processing with different objectives. The following images illustrate examples of contrast adjustment, edge detection and threshold. Original Contrast adjustment Edge detection Threshold 4

4 Final comment Our objective with this text is to present a little known application of matrices for teachers and high school students: the processing of digital images. It is important to notice that the mathematical tools related to this topic go far beyond matrices. The subject is vast, rich and modern. Unfortunately, the limit of few pages recommended for this article does not allow us to provide further details. As a starting point for the reader motivated to find out more, we recommend the books [Gonzalez and Woods, 007] and [Gomes and Velho, 008]. 5 References At the web site http://www.uff.br/cdme/matrix/index-en.html (or at its mirror http://www.cdme. im-uff.mat.br/matrix/index-en.html), there is a series of interactive applets that allows you to explore the relations between matrices and digital images presented in this text. You will also find a DOC file with suggestions of exercises to be worked in the classroom. Here are the references cited in the text: Gomes,J.;Velho,L.Image Processing for Computer Graphics and Vision. Springer-Verlag, 008. Gonzalez, R. C.; Woods, R. E. Digital Image Processing. Third Edition. Prentice Hall, 007. Lay, D. Linear Algebra and Its Applications. Forth Edition. Addison Wesley, 011. Poole, D. Linear Algebra: A Modern Introduction. Second Edition. Brooks Cole, 005. The photo of the Mona Liza in LEGO is a property of Marco Pece Udronotto, who kindly granted permission to use them in this work. 5