Download presentation
Presentation is loading. Please wait.
Published byAmanda Kennedy Modified over 6 years ago
1
Image Abstract Data Types, and Operations on Images
CSE 373, Copyright S. Tanimoto, Image Abstract Data Types -
2
CSE 373, Copyright S. Tanimoto, 2002 Image Abstract Data Types -
Motivation Image data makes up more than 75% of Internet data traffic. Images are widely used in modern computing systems and applications. A wide variety of algorithms work with image data. CSE 373, Copyright S. Tanimoto, Image Abstract Data Types -
3
Mathematical Description
An image is a function mapping pixel positions to values. Its domain is a set of the form D = {0, 1, ..., m-1} {0, 1, ..., n-1} Its range is a set of possible "pixel values." Different kinds of images have different ranges. A binary image has range {0, 1}. A monochrome image typically has range {0, 1, ..., 255}. An RGB typically has range {0, 1, ..., 255}3. CSE 373, Copyright S. Tanimoto, Image Abstract Data Types -
4
An Image Abstract Data Type
Data: Binary Images I: {0, 1, ..., m-1} {0, 1, ..., n-1} {0, 1} Methods: PUTPIXEL: IMAGES D {0, 1} IMAGES GETPIXEL: IMAGES D {0, 1} CSE 373, Copyright S. Tanimoto, Image Abstract Data Types -
5
Another Image Abstract Data Type
Data: Monochrome Images I: {0, 1, ..., m-1} {0, 1, ..., n-1} {0, 1,...,255} Methods: PUTPIXEL: IMAGES D {0, 1, ..., 255} IMAGES GETPIXEL: IMAGES D {0, 1, ..., 255} CSE 373, Copyright S. Tanimoto, Image Abstract Data Types -
6
Images: Array Implementation
7 3 3 3 3 3 3 3 1 1 9 9 5 6 9 9 CSE 373, Copyright S. Tanimoto, Image Abstract Data Types -
7
Images: Quadtree Implementation
7 3 3 3 3 3 3 3 1 1 9 9 3 9 5 6 9 9 Recursively quarter each image region whenever the pixel values are heterogeneous. Create a node for each region. 7 3 3 3 1 1 5 6 CSE 373, Copyright S. Tanimoto, Image Abstract Data Types -
8
Images: Run-Length Coding
7 3 3 3 1x7;7x3;2x1;2x9;1x5;1x6;2x9 3 3 3 3 1 1 9 9 5 6 9 9 Using row-major (raster-scan) ordering, write out the number of pixels in each run followed by an "x" and the value of the pixels in the run. Separate runs with ";". CSE 373, Copyright S. Tanimoto, Image Abstract Data Types -
9
CSE 373, Copyright S. Tanimoto, 2002 Image Abstract Data Types -
Median Filtering "Salt-and-pepper" noise is present in many video images. It not only looks bad, but it can lead recognition algorithms astray. One method for eliminating salt-and-pepper noise is to replace each pixel value by the median of the 9 values in its 3 by 3 neighborhood. 2 2 4 2 9 5 1 2 4 2 CSE 373, Copyright S. Tanimoto, Image Abstract Data Types -
10
Connected Components Analysis
7 3 3 3 1 1 1 3 3 3 3 1 1 1 1 1 1 9 9 2 2 3 3 5 6 9 9 4 5 3 3 Two common method for computing this are: (1) stack-based depth-first search, and (2) merging components using the UNION-FIND technique. CSE 373, Copyright S. Tanimoto, Image Abstract Data Types -
11
CSE 373, Copyright S. Tanimoto, 2002 Image Abstract Data Types -
Thresholding 7 3 3 3 1 4 3 3 3 3 1 1 9 9 1 1 5 6 9 9 1 1 1 1 Any pixel with value greater than or equal to the threshold gets mapped to 1. Otherwise it's mapped to 0. CSE 373, Copyright S. Tanimoto, Image Abstract Data Types -
12
Image Compression using Huffman Coding
Frequency table: 1: 2 3: 7 5: 1 6: 1 7: 1 9: 4 Sorted table: 5: 1 6: 1 7: 1 1: 2 9: 4 3: 7 Huffman Tree: 7 3 3 3 16 3 3 3 3 9 7 1 1 9 9 3 5 6 9 9 5 4 Code 3: 1 9: 01 1: 001 5: 00000 6: 00001 7: 0001 9 3 2 1 To build the Huffman tree, keep taking the two smallest-weight subtrees and merge them. To code a pixel, trace the path from the root to that leaf, writing a 0 whenever going left and 1 whenever going right. 2 1 7 1 1 6 5 CSE 373, Copyright S. Tanimoto, Image Abstract Data Types -
13
Convolution Filtering
Kernel K[1,1] 2 2 4 -1 1 2 9 5 -2 2 1 2 4 -1 1 I'[i,j] = I[i+r,j+s] K[1+r,1+s] Image I[i,j] r, s = -1, 1 CSE 373, Copyright S. Tanimoto, Image Abstract Data Types -
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.