Numbers in Images GCNU 1025 Numbers Save the Day.
-
Upload
horace-wood -
Category
Documents
-
view
223 -
download
0
Transcript of Numbers in Images GCNU 1025 Numbers Save the Day.
![Page 1: Numbers in Images GCNU 1025 Numbers Save the Day.](https://reader035.fdocuments.net/reader035/viewer/2022062807/56649ce25503460f949ae098/html5/thumbnails/1.jpg)
Numbers in Images
GCNU 1025Numbers Save the Day
![Page 2: Numbers in Images GCNU 1025 Numbers Save the Day.](https://reader035.fdocuments.net/reader035/viewer/2022062807/56649ce25503460f949ae098/html5/thumbnails/2.jpg)
Announcement
• In-class Assignment #3 on Nov 21 (Friday)• Coverage: Chapter 3 “Numbers on the Internet”• 10% of final score• Books, notes, other materials and discussions all allowed• Help from instructor and teaching assistant• Assignments submitted after class subject to penalty
![Page 3: Numbers in Images GCNU 1025 Numbers Save the Day.](https://reader035.fdocuments.net/reader035/viewer/2022062807/56649ce25503460f949ae098/html5/thumbnails/3.jpg)
Image storage in computers
• Pixel: small coloured point (smallest component of image)• Colour represented by number: one digital value for each pixel
• How many different possible colours are there?• How many bits are used to represent each colour?
![Page 4: Numbers in Images GCNU 1025 Numbers Save the Day.](https://reader035.fdocuments.net/reader035/viewer/2022062807/56649ce25503460f949ae098/html5/thumbnails/4.jpg)
Image storage in computers
• Pixel: small coloured point (smallest component of image)• Colour represented by number: one digital value for each pixel
• How many different possible colours are there?• Colour palette: a list of available colours
• How many bits are used to represent each colour?• Example: RGB models
• Encoding colour by mixing red (R), green (G) and blue (B)
![Page 5: Numbers in Images GCNU 1025 Numbers Save the Day.](https://reader035.fdocuments.net/reader035/viewer/2022062807/56649ce25503460f949ae098/html5/thumbnails/5.jpg)
Image storage in computers
• Pixel: small coloured point (smallest component of image)• Colour represented by number: one digital value for each pixel
• How many bits are used to represent each colour?• Example: RGB model (colour-depth: 8-bit)
• Red/Green (3 bits each): from 0 to 7• 0: least intense• 7: most intense
• Blue (2 bits): from 0 to 3• 0: least intense• 3: most intense
• Total: 256 colours
![Page 6: Numbers in Images GCNU 1025 Numbers Save the Day.](https://reader035.fdocuments.net/reader035/viewer/2022062807/56649ce25503460f949ae098/html5/thumbnails/6.jpg)
Image storage in computers
• Pixel: small coloured point (smallest component of image)• Colour represented by number: one digital value for each pixel
• How many bits are used to represent each colour?• Example: RGB model (colour-depth: 24-bit)
• Red/Green/Blue (8 bits each): from 0 to 255• 0: least intense• 255: most intense
• Total: more than 10M colours
![Page 7: Numbers in Images GCNU 1025 Numbers Save the Day.](https://reader035.fdocuments.net/reader035/viewer/2022062807/56649ce25503460f949ae098/html5/thumbnails/7.jpg)
Image storage in computers
• Pixel: small coloured point (smallest component of image)• Colour represented by number: one digital value for each pixel
• How many bits are used to represent each colour?• Example: RGB model (colour-depth: 24-bit)
• Red/Green/Blue (8 bits each): from 0 to 255• 0: least intense• 255: most intense
• Total: more than 10M colours
![Page 8: Numbers in Images GCNU 1025 Numbers Save the Day.](https://reader035.fdocuments.net/reader035/viewer/2022062807/56649ce25503460f949ae098/html5/thumbnails/8.jpg)
Image storage in computers
• Pixel: small coloured point (smallest component of image)• Colour represented by number: one digital value for each pixel
• How many bits are used to represent each colour?• Example: RGB model (colour-depth: 24-bit)
• Red/Green/Blue (8 bits each): from 0 to 255• 0: least intense• 255: most intense
• Total: more than 10M colours
![Page 9: Numbers in Images GCNU 1025 Numbers Save the Day.](https://reader035.fdocuments.net/reader035/viewer/2022062807/56649ce25503460f949ae098/html5/thumbnails/9.jpg)
Resolution and file size
• Resolution: number of pixels in image• Expressed as dimension ()
• Example:
• Display resolution: number of pixels on the screen• Expression as dimension ()
• Example:
![Page 10: Numbers in Images GCNU 1025 Numbers Save the Day.](https://reader035.fdocuments.net/reader035/viewer/2022062807/56649ce25503460f949ae098/html5/thumbnails/10.jpg)
Resolution and file size
• Resolution: number of pixels in image• Expressed as dimension ()
• Example: • Higher resolution:
• More details can be shown• Larger file size (given same colour-depth)
![Page 11: Numbers in Images GCNU 1025 Numbers Save the Day.](https://reader035.fdocuments.net/reader035/viewer/2022062807/56649ce25503460f949ae098/html5/thumbnails/11.jpg)
Image file format
• File format: method of storage• Image compression: lossless/lossy
![Page 12: Numbers in Images GCNU 1025 Numbers Save the Day.](https://reader035.fdocuments.net/reader035/viewer/2022062807/56649ce25503460f949ae098/html5/thumbnails/12.jpg)
Image file format
• File format: method of storage• Image compression: lossless/lossy
![Page 13: Numbers in Images GCNU 1025 Numbers Save the Day.](https://reader035.fdocuments.net/reader035/viewer/2022062807/56649ce25503460f949ae098/html5/thumbnails/13.jpg)
Image processing
• Image formed by a rectangle of pixels• Matrix: table with rows and columns of numbers• Image represented by matrix • Example: matrix representing an image
• Resolution of image: • Size of matrix:
![Page 14: Numbers in Images GCNU 1025 Numbers Save the Day.](https://reader035.fdocuments.net/reader035/viewer/2022062807/56649ce25503460f949ae098/html5/thumbnails/14.jpg)
Image processing
• Manipulation of image (image processing): operation on matrix representing the image• 3-bit grey scale examples (0-7) used in this course
• Major types of actions:• Reduction of image• Rotation of image• Cropping of image• Darkening/brightening of image• Inversion of image• Blurring of image• Enlargement of image• Morphing of images• Addition/removal of objects in image
![Page 15: Numbers in Images GCNU 1025 Numbers Save the Day.](https://reader035.fdocuments.net/reader035/viewer/2022062807/56649ce25503460f949ae098/html5/thumbnails/15.jpg)
Image processing
• Reduction of image by half
![Page 16: Numbers in Images GCNU 1025 Numbers Save the Day.](https://reader035.fdocuments.net/reader035/viewer/2022062807/56649ce25503460f949ae098/html5/thumbnails/16.jpg)
Image processing
• Reduction of image by half• Average taken for each partition• Example: (resolution) reduced to (resolution)
![Page 17: Numbers in Images GCNU 1025 Numbers Save the Day.](https://reader035.fdocuments.net/reader035/viewer/2022062807/56649ce25503460f949ae098/html5/thumbnails/17.jpg)
Image processing
• Reduction of image by half• Average taken for each partition• Example: (resolution) reduced to (resolution)
![Page 18: Numbers in Images GCNU 1025 Numbers Save the Day.](https://reader035.fdocuments.net/reader035/viewer/2022062807/56649ce25503460f949ae098/html5/thumbnails/18.jpg)
Image processing
• Rotation by 90 degrees• Simple rotation of matrix
![Page 19: Numbers in Images GCNU 1025 Numbers Save the Day.](https://reader035.fdocuments.net/reader035/viewer/2022062807/56649ce25503460f949ae098/html5/thumbnails/19.jpg)
Image processing
• Cropping of image• Deletion of corresponding part of matrix
![Page 20: Numbers in Images GCNU 1025 Numbers Save the Day.](https://reader035.fdocuments.net/reader035/viewer/2022062807/56649ce25503460f949ae098/html5/thumbnails/20.jpg)
Image processing
• Darkening of image• Multiplication by weight factor (smaller than 1)
![Page 21: Numbers in Images GCNU 1025 Numbers Save the Day.](https://reader035.fdocuments.net/reader035/viewer/2022062807/56649ce25503460f949ae098/html5/thumbnails/21.jpg)
Image processing
• Darkening of image• Multiplication by weight factor (smaller than 1)• Example: darkening by a factor of 0.8
• Rounding off needed
![Page 22: Numbers in Images GCNU 1025 Numbers Save the Day.](https://reader035.fdocuments.net/reader035/viewer/2022062807/56649ce25503460f949ae098/html5/thumbnails/22.jpg)
Image processing
• Brightening of image• Multiplication by weight factor (bigger than 1) wouldn't work as some
entries might exceed 7• Alternative method: assign new value to an entry for some factor smaller
than 1• Example: Brightening with a factor of 0.8
• Replacement of each entry by • Rounding off needed• Smaller factor used instead of 0.8 for brighter image
![Page 23: Numbers in Images GCNU 1025 Numbers Save the Day.](https://reader035.fdocuments.net/reader035/viewer/2022062807/56649ce25503460f949ae098/html5/thumbnails/23.jpg)
Image processing
• Inversion of image• Replacement of each entry by 𝑥
![Page 24: Numbers in Images GCNU 1025 Numbers Save the Day.](https://reader035.fdocuments.net/reader035/viewer/2022062807/56649ce25503460f949ae098/html5/thumbnails/24.jpg)
Image processing
• Blurring of image• Averaging neighbourhood of each entry
![Page 25: Numbers in Images GCNU 1025 Numbers Save the Day.](https://reader035.fdocuments.net/reader035/viewer/2022062807/56649ce25503460f949ae098/html5/thumbnails/25.jpg)
Image processing
• Enlargement of image• Step 1: determine size of new matrix • Step 2: duplicate existing entries• Step 3: blurring • Example: doubling linear size
• Step 1: (matrix size) enlarged to (matrix size)• Step 2: duplication
![Page 26: Numbers in Images GCNU 1025 Numbers Save the Day.](https://reader035.fdocuments.net/reader035/viewer/2022062807/56649ce25503460f949ae098/html5/thumbnails/26.jpg)
Image processing
• Enlargement of image• Step 1: determine size of new matrix • Step 2: duplicate existing entries• Step 3: blurring • Example: doubling linear size
• Step 3: blurring
![Page 27: Numbers in Images GCNU 1025 Numbers Save the Day.](https://reader035.fdocuments.net/reader035/viewer/2022062807/56649ce25503460f949ae098/html5/thumbnails/27.jpg)
Image processing
• Morphing of images• Matching the corresponding entries of the matrices and adjusting the
weighting• Example: morphing of lion and tiger
• Matching eyes of lion with eyes of tiger• Adjustment of weighting
![Page 28: Numbers in Images GCNU 1025 Numbers Save the Day.](https://reader035.fdocuments.net/reader035/viewer/2022062807/56649ce25503460f949ae098/html5/thumbnails/28.jpg)
Image processing
• Addition of objects• Application of “if…then” statements to add background• Example: replacing white background
![Page 29: Numbers in Images GCNU 1025 Numbers Save the Day.](https://reader035.fdocuments.net/reader035/viewer/2022062807/56649ce25503460f949ae098/html5/thumbnails/29.jpg)
Image processing
• Removal of objects• Series of photos needed to provide background information• Median averaging: elimination of abnormal pixels by taking median value
of corresponding pixels in the images
![Page 30: Numbers in Images GCNU 1025 Numbers Save the Day.](https://reader035.fdocuments.net/reader035/viewer/2022062807/56649ce25503460f949ae098/html5/thumbnails/30.jpg)
Numbers in Images
-End-