Image processing Second lecture. Image Image Representation We have seen that the human visual...

Preview:

Citation preview

Image processing

Second lecture

Image• Image RepresentationWe have seen that the human visual system (HVS) receives an inputimage as a collection of spatially distributed light energy; this is form iscalled an optical image. Optical images are the type we deal with everyday –cameras captures them, monitors display them, and we see them[we know that these optical images are represented as video informationin the form of analog electrical signals and have seen how these aresampled to generate the digital image I(r , c).The digital image I (r, c) is represented as a two- dimensional array ofdata, where each pixel value corresponds to the brightness of the image atthe point (r, c). in linear algebra terms , a two-dimensional array like ourimage model I( r, c ) is referred to as a matrix , and one row ( or column)is called a vector.The image types we will consider are:

Images type• Binary ImageBinary images are the simplest type of images and can take on twovalues, typically black and white, or ‘0’ and ‘1’. A binary image is referred to as a 1 bit/pixel image because it takes only 1 binary digit torepresent each pixel.

Images type• Gray Scale ImageGray _scale images are referred to as monochrome, or one-color image.They contain brightness information only brightness information only, nocolor information. The number of different brightness level available.The typical image contains 8 bit/ pixel (data, which allows us to have (0-255) different brightness (gray) levels. The 8 bit representation istypically due to the fact that the byte, which corresponds to 8-bit of data,is the standard small unit in the world of digital computer.

Images type

• Gray Scale Image

Images type• Color ImageColor image can be modeled as three band monochrome image data,where each band of the data corresponds to a different color. The actual information stored in the digital image data is brightnessinformation in each spectral band. When the image is displayed, thecorresponding brightness information is displayed on the screen bypicture elements that emit light energy corresponding to that particularcolor. Typical color images are represented as red, green ,and blue or RGBimages .using the 8-bit monochrome standard as a model , thecorresponding color image would have 24 bit/pixel – 8 bit for each colorbands (red, green and blue ). The following figure we see a representationof a typical RGB color image.

Images type

Color Image

Digital Image File Format

Why do we need so many different types of image file format?• The short answer is that there are many different types of imagesand application with varying requirements.

واالحتياجات التطبيقات حسب• A more complete answer, also considers market share proprietaryinformation, and a lack of coordination within the imagingindustry. السوق حاجات حسب اكتمال االكثر الجواب

Digital Image File Format• TIFF(Tagged Image File Format) and GIF(Graphics Interchange Format):They are used on World Wide Web (WWW). GIF files are limited to amaximum of 8 bits/pixel and allows for a type of compression calledLZW. The GIF image header is 13 byte long & contains basic• JPEG (Joint photo Graphic Experts Group):It is simply becoming standard that allows images compressed algorithmsto be used in many different computer platforms.JPEG images compression is being used extensively on the WWW. It’s,flexible, so it can create large files with excellent image equality.

Image processing

• Pre-processing• Data reduction• Feature analysis• المعالجة قبل ما

البيانات اختزالاخبارى تحليل

Pre-processing

• ROI (region of interest) ….zoom , crop, translate, rotate

• zoom like enlarge and sharing

• Algebra operation• Enhancement• Reducing data

Zoom process

• Zero-order-hold• Zero-order-hold (row, row)• Zero-order-hold (column, column)• Zero-order-hold (row, column)

40 20 10

70 50 30

90 80 10

40 40 20 20 10 10

70 70 50 50 30 30

90 90 80 80 10 10

Zero-order-hold ((column, column)

Zoom process40 20 10

40 20 10

70 50 30

70 50 30

90 80 10

90 80 10

40 20 10

70 50 30

90 80 10

40 20 10

70 50 30

90 80 10

40 40 20 20 10 10

40 40 20 20 10 10

70 70 50 50 30 30

70 70 50 50 30 30

90 90 80 80 10 10

90 90 80 80 10 10

Zero-order-hold (column, column)

Zero-order-hold (row, column)

Zoom process

• Zoom processing by finding the average • Average (row, row)• Average (column, column)• Average (row, column)

8 4 8

4 8 4

8 8 2

8 6 4 6 8

4 6 8 6 4

8 5 8 5 2

Average (row, row)

Zoom process

• Convolution• First step

3 5 7

2 7 6

3 4 9

0 0 0 0 0 0 0

0 3 0 5 0 7 0

0 0 0 0 0 0 0

0 2 0 7 0 6 0

0 0 0 0 0 0 0

0 3 0 4 0 9 0

0 0 0 0 0 0 0

Zoom process

• Convolution• second step : define new mask that we going to use it

1/4 1/2 1/4

1/2 1 1/2

1/4 1/2 1/4

Zoom process

• Convolution

1/4 1/2 1/4

1/2 1 1/2

1/4 1/2 1/4

0 0 0 0 0 0 0

0 3 0 5 0 7 0

0 0 0 0 0 0 0

0 2 0 7 0 6 0

0 0 0 0 0 0 0

0 3 0 4 0 9 0

0 0 0 0 0 0 0

Zoom process

• Convolution• Results

3 4 5 6 7

17/4 6 25/4 13/2 5/2

9/2 7 13/2 6 2

4 11/2 26/4 15/2 5/2

7/2 4 13/2 9 3

Zoom process

• Zoom by using k factor • Example [125 140 155] when k=3,• Sol140-125=1515/3=5125+5=130When k=3 , so we add 5 again to 130 (k-1)Result

[125 130 135 140 145 150 155]

Zoom process

• Homework • Example: if u have following matrix , what the

result of enlarging this matrix?• Assume k=4

140 160 180

160 180 200

Image algebra

• Algebra operation• Arithmetic: (+, * , -, / )

• Logical operation: (OR, AND, NOT… gates)

Recommended