Image Processing

56 downloads 0 Views 2MB Size Report
fundamentals of digital signal processing and their extension to image ... Rafael G. Gonzalaz and Richard E. Woods, Digital Image ..... Dissertations.03-2.pdf.
Teaching Notes on Image Processing For senior students

Lecture 1: Introduction Dr. Mohammed Abdel-Megeed Salem Scientific Computing Department, Faculty of Computer and Information Sciences, Ain Shams University in Cairo

Outline • Course Information & Objectives • Introduction – Definitions • Images, Image Processing, Image Analysis, Computer Vision, Computer Graphics

– Image Processing: History, Objectives and Applications

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

2

Course Info - Description • This course is concerned with understanding the fundamentals of digital signal processing and their extension to image signals. The term “image” refers, in a broader context, to any signal of more than one variable. To understand and master the image processing the course provides knowledge on image perception, representation, and processing. Processing includes linear and non linear filtering, compression, and orthogonal transforms.

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

3

Course Info - References • Rafael G. Gonzalaz and Richard E. Woods, Digital Image Processing, 3rd Edition, Pearson Education, 2008. • Meffert, Hochmuth, Werkzeuge der Signalverarbeitung, Pearson 2006. • M. A.-M. Salem, Multiresolution Image Segmentation, Humboldt-Universitaet zu Berlin, 2008. • Matlab‘s Image Processing Toolbox User‘s Guide. • The on lecture discussions and student's lecture notes are critical part of the course materials.

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

4

Course Info - Contents • 1

Introduction

• 2

Elementary Operations on Images

• 3

Fundamentals of Signal and Image Processing

• 4

Acquisition and Digitizing Images

• 5

Image Processing Operations

• 6

Applications

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

5

Course Objectives • Image and vision are considered widely in the almost every recent application due to the continuous advances of imaging techniques and the decreasing of computational and financial cost. Therefore, understanding of image processing and analysis become fundamental for developing real world systems. The course aims to provide the students with the fundamental theories and background of image processing and to enable students to master its common and recent techniques. Salem, Teaching Notes on Image Processing, 2015

Lecture 1

6

Course Objectives • The objectives include: 1. Mastering the basic operations of image processing. 2. Mastering the basic operations of image analysis and understanding. 3. Understanding the theoretical fundamentals of signal and image (soft) processing. 4. Introducing the image operations in the field of mechatronics (Ex. Robotics). 5. Advancing the skills of self-learning, problem formulation, problem solving and presentation of the students. Salem, Teaching Notes on Image Processing, 2015

Lecture 1

7

Outline • Course Information & Objectives • Introduction – Definitions • Images, Image Processing, Image Analysis, Computer Vision, Computer Graphics

– Image Processing: History, Objectives and Applications

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

8

Definitions - Images

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

9

Definitions - Images

Images

A re-presentation of an object • contains descriptive information of the represented object. • It could be in many forms of representations.

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

10

Definitions - Images

Visible Images • visible to the eye Picture

• used synonymously to image. Optical Images • generated by optical systems (lenses)

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

11

Definitions - Images

Digital Images • numerical representation of an object • discrete units are pixels, associated to grey values • in a narrow sense: a matrix Physical Images • distribution of energy, non-visible (multi-spectral) or visible (390 to 700 nm.) Salem, Teaching Notes on Image Processing, 2015

Lecture 1

12

Definitions - Images Webster's dictionary: image, n. [OFr. image; L. imago (~inis), an imitation, copy, image.]

http://www.merriamwebster.com/dictionary/

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

13

Definitions - Images Webster's (cont’d): 1. (a) an imitation or representation of a person or thing, drawn, painted, etc.; especially, a statue (b) a sculptured figure used as an idol 2. The visual impression of something produced by reflection from a mirror, refraction through a lens, etc. 3. A person or thing very much like another; a copy; counterpart

4. (a) a mental picture of something; conception; idea; impression; (b) the concept of a person, product, institution, etc. … 5. A type; typical example; symbol; embodiment; as, he is the image of laziness.

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

14

Definitions - Images • The image I can be defined as a function f on the domain in the form of a matrix of . At any given point (m, n) the value of f can be:

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

15

Definitions - Images • MATLAB stores most images as two-dimensional arrays (i.e., matrices), in which each element of the matrix corresponds to a single pixel in the displayed image. (Pixel is derived from picture element and usually denotes a single dot on a computer display.) • For example, an image composed of 200 rows and 300 columns of different colored dots would be stored in MATLAB as a 200-by-300 matrix. Salem, Teaching Notes on Image Processing, 2015

Lecture 1

16

Definitions - Images • The image is treated as a grid of discrete elements, ordered from top to bottom and left to right. • The first component r (the row) increases downward, while the second component c (the col.) increases to the right. • Pixel coordinates are integer values and range between 1 and the length of the row or column.

The Pixel Coordinate System

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

17

Definitions - Images • A binary image (black and white):

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

18

Definitions – Images: Binary Images • In a binary image, each pixel assumes one of only two discrete values: 1 or 0. A binary image is stored as a logical array.

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

19

Definitions - Images • A grey level image:

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

20

Definitions – Images: Grayscale Images • Also called gray-scale, gray scale, or gray-level. • The intensity 0 represents black and the intensity 1 represents white.

Pixel Values in a Grayscale Image Define Gray Levels Salem, Teaching Notes on Image Processing, 2015

Lecture 1

21

Definitions - Images • RGB-coloured image:

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

22

Definitions – Images: Truecolor Images • Also known as truecolor image.

• MATLAB store truecolor images as an m-by-nby-3 data array for the red, blue, and green components of the pixel’s color. • Graphics file formats store truecolor images as 24-bit images, where the red, green, and blue components are 8 bits each. This yields a potential of 16 million colors.

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

23

Definitions – Images: Truecolor Images To determine the color of the pixel at (2,3), you would look at the RGBtriplet stored in (2,3,1:3). Suppose (2,3,1) contains the value 0.5176, (2,3,2) contains 0.1608, and (2,3,3) contains 0.0627. • The color for the pixel at (2,3)is 0.5176 0.1608 0.0627 The Color Planes of a Truecolor Image Salem, Teaching Notes on Image Processing, 2015

Lecture 1

24

Indexed Images • An indexed image consists of an array and a colormap matrix. The pixel values in the array are direct indices into a colormap. • The colormap matrix is an m-by-3 array containing values in the range [0,1]. Each row of map specifies the red, green, and blue components of a single color. Salem, Teaching Notes on Image Processing, 2015

Lecture 1

25

Definitions - Images • An important feature of digital images and videos is that they are multidimensional functions, i.e., they are functions of more than a single variable. Images are functions of two, and perhaps three space dimensions in case of colored images. • The dimension of an image is the number of coordinates that are required to index a given point in the image. • A consequence of this is that digital image processing is quite data intensive, meaning that significant computational and storage resources are required. Salem, Teaching Notes on Image Processing, 2015

Lecture 1

26

Definitions – Image Processing • Image Processing – Digital Image Processing = Digital processing of images, not (processing digital images) . – It is a collection of operations and algorithms that are performed on the numerical values of image pixels to enhance or transform the image into new form. – The output of image processing may be either an image or a set of characteristics or parameters related to the image. – Most image-processing techniques involve treating the image as a two-dimensional signal and applying standard signal-processing techniques to it [Wikipedia]. Salem, Teaching Notes on Image Processing, 2015

Lecture 1

27

Definitions – Image Processing • Do we need to process images? – Acquisition & Sensing – For Display or Printing – Storage & Transmission – Enhancement and Restoring – Information Extraction

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

28

Definitions - Image Processing

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

29

Definitions - Image Processing

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

30

Definitions – Image Processing

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

31

Definitions – Image Analysis • Image Analysis – An image will be converted in something else (data, decisions ..).

• Image Analysis is the extraction of meaningful information from images by means of digital image processing techniques. • It can be as simple as reading bar coded tags or as sophisticated as identifying a person from their face.

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

32

Definitions – Image Analysis

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

33

Definitions – Image Analysis • Difficulties: automatic extraction of semantic information. – Example: James?)

Dalmatian dog on a lawn with leaves (by RC

– (for the segmentation of such an image the human observers consider the brightness and previous learned knowledge) – http://subs.emis.de/LNI/Dissertation/Dissertation3/GIDissertations.03-2.pdf

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

34

Image Processing vs Analysis Image Processing • From an image a modified version of the image will be generated usually by a computer.

Input Image

Proc. Image

Salem, Teaching Notes on Image Processing, 2015

Image Analysis • Starting with an image, ending with a description of its contents.

Input Image

Descripti on

Lecture 1

35

Definitions – Computer Vision • Computer Vision: is a field that includes methods for acquiring, processing, analyzing, and understanding images. • It is a branch of artificial intelligence and image processing concerned with computer processing of images from the real world [FOlDoC.com]. Salem, Teaching Notes on Image Processing, 2015

Lecture 1

36

Definitions – Computer Vision

http://science.howstuffworks.com/robot.htm/printable

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

37

Definitions – Computer Vision

Slosson, Mary (8 May 2012). "Google gets first robotic car license in Nevada". Reuters. Retrieved 9 May 2012. Salem, Teaching Notes on Image Processing, 2015

Lecture 1

38

Definitions – Computer Vision

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

39

Definitions – Computer Graphics • Computer Graphics: Any kind of visible output including text, images, movies, line art and digital photographs; stored in bitmap or vector graphic form [FOlDoC.com]. • are graphics created using computers and, more generally, the representation and manipulation of image data by a computer with help from specialized software and hardware [Wikipedia].

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

40

Definitions – Computer Graphics

H. Abdel-Fattah, Y. Yousf, L. Abdel-Mohsen, “3D Dental Visualization”, ", Faculty of Computer and Information Sciences, Ain Shams University, 2012, (A Thesis of Graduation Project). Salem, Teaching Notes on Image Processing, 2015

Lecture 1

41

Computer Vision vs Graphics Computer Vision

Computer Graphics



the interpretation of scenes





related to robots: the eyes of the robot

processing & visualisation of math. descriptions, models or other non visible facts



(also translated by “image understanding”



includes computer art

Input Image

Knowledge

Salem, Teaching Notes on Image Processing, 2015

Knowledge

Image

Lecture 1

42

Report 1-1 • Based on your own understanding of what is meant by “image”, “image Processing”, “image analysis”, “Computer Vision” and “Computer Graphics”, draw a new Venn diagram similar to the diagram of Castleman. You may include new terms in your diagram, or you may exclude some of the above mentioned terms for simplicity. Salem, Teaching Notes on Image Processing, 2015

Lecture 1

43

Outline • Course Information & Objectives • Introduction – Definitions • Images, Image Processing, Image Analysis, Computer Vision, Computer Graphics

– Image Processing: History, Objectives and Applications

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

44

Image Processing: History • Ibn al-Haytham (965– 1039 A.D.), described a 'dark chamber' and experimented with images seen through the pinhole. • The Book of Optics ‫كتاب المناظر‬ https://en.wikipedia.org/wiki/Camera_obscura

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

45

Image Processing: History • First Inaugural ceremony broadcast nationally by radio. • Swearing-In Ceremony for President Calvin Coolidge. • Thirty-Fifth Inaugural Ceremonies, March 4, 1925. http://www.inaugural.senate.gov/swear ing-in/event/calvin-coolidge-1925

Wirephoto image of the inauguration of Calvin Coolidge. New York Evening Graphic, March 4, 1925, p.1.

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

46

Image Processing: History

• A Wirephoto is a photograph created by the Wirephoto process. • If the Associated Press put an original photograph in its Wirephoto machine and sent a copy via wire to the San Francisco Chronicle, the Chronicle’s received copy is a Wirephoto.

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

47

Image Processing: History • “Phone brings photo,” proclaimed the caption to the photograph of the inauguration of President Calvin Coolidge printed on the front page of the New York Evening Graphic on March 4, 1925. • "This picture was sent from Washington over telephone wires to New York, Chicago and San Francisco," wrote the Graphic, explaining how American Telephone and Telegraph's new wirephoto technology worked.

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

48

Image Processing: History

This image is available from the United States Library of Congress's Prints and Photographs division under the digital ID ggbain.00106.

Salem, Teaching Notes on Image Processing, 2015

Belinograph BEP2V wirephoto machine by Edouard Bélin, 1930 This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license. Lecture 1

49

Image Processing: History • Azriel Rosenfeld (1931-2004): • Image analysis and computer vision in the past half-century • Azriel Rosenfeld is a tenured Professor at the University of Maryland in College Park. • Rosenfeld, A. 1969. Picture Processing by Computer. Academic Press: NY. • The International Conference on Computer Vision, ICCV, London, 1987 Salem, Teaching Notes on Image Processing, 2015

Lecture 1

50

Image Processing: History Claude Shannon

1948

Founder of Information Theory

Processing and Transmission of Information Group Huffman, Fano, 1958 Salem, Teaching Notes on Image Processing, 2015

Lecture 1

51

Image Processing: History Thomas S. Huang, Development of an optical scanner

William Schreiber, Donald Troxel: 1975 Development of a laser scanner (heating of silver paper), and replacement of the old „Wirephoto machines“ Salem, Teaching Notes on Image Processing, 2015

Kenneth Ingham, 1967 Development of a reading machine for blind people: (PDP-1 and OCR) Lecture 1

52

Image Processing: History • Development… in the sixties • A short time after the establishment of the computer the possibilities of image processing were recognized, beginning with special images like text or traces of nuclear particles • Generalized algorithms for image analysis •

Difficulties with the application of Fourier analysis because

„pattern of interest for image description .... are not sinusoids” •

AI and robotics forced the further development (we expect robots to manipulate, to react on poor lighting, to navigate between objects)

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

53

Image Processing: History • Development… Today • More complex algorithms •

Better processors



More processing power



Less costs of Hard- and Software



Improvement of all peripheral devices



A lot of new and attractive applications in nearly all disciplines

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

54

Image Processing: Objectives • Do we need to process images? – Acquisition & Sensing – For Display or Printing – Storage & Transmission – Enhancement and Restoring – Information Extraction

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

55

Image Processing: Applications • Image Processing Application Areas

– Medicine: radiology, tomography, thermography, sonography – Production: assembling, sorting, monitoring – Robotics: autonomous handling machines – Quality control: error detection, non-destructive testing – Biology: analysis of microscope images – Criminology: finger prints, recognition of speakers or writers, generating of phantom images – Geography: cartography, remote sensing, photogrammetry, analysis of satellite images – Meteorology: weather forecast

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

56

Image Processing: Applications

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

57

Report 1-2 • Image Processing or Computer Vision have many applications in the field of mechatronics, such as for vision-based quality control, robot vision, or autonomous vehicles. Discuss one application to show the details and importance of the role of image processing to achieve the applications’ goals.

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

58

Simple Example • The following code should run on Matlab: RGB = imread('saturn.png'); I = rgb2gray(RGB); J =imnoise(I,'gaussian',0,0.025); imshow(J) K = wiener2(J,[5 5]); figure, imshow(K)

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

59

Report 1-3 • Repeat the last image denoising example on one of your own images. Write down your observations/ comments.

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

60

Reading • M. A.-M. Salem, “Multiresolution Image Segmentation”, Humboldt-Universität zu Berlin, 2008, [Chapter 2] • Rafael G. Gonzalaz and Richard E. Woods, Digital Image Processing, 3rd Edition, Pearson Edu., 2008. [Chapter 1] • E.R. Davies, Machine Vision: Theory, Algorithms and Practicalities, Third Edition, Morgan Kaufmann Publishers, 2004. [Chapter 1] • Bovik, A.C.: Handbook of Image and Video Processing. Academic Press, May 2000. Salem, Teaching Notes on Image Processing, 2015

Lecture 1

61

Contacts Teaching Notes on Image Processing, for senior students, 2015 Dr. Mohammed Abdel-Megeed M. Salem Faculty of Computer and Information Sciences, Ain Shams University Abbassia, Cairo, Egypt Tel.: +2 011 1727 1050 Email: [email protected] Website: https://sites.google.com/a/fcis.asu.edu.eg/salem/home

Salem, Teaching Notes on Image Processing, 2015

Lecture 1

62