31-01-2013, 11:01 AM
Array representation of images
Array representation.ppt (Size: 404.5 KB / Downloads: 59)
Image: A pixel is a square region on a display device that can be illuminated with one of the color combinations.
A wide range of colors can be specified using 3 bytes – one for each color R, G and B.
R = 255, G = 255, B = 255 represents White.
R = 0, G = 0, B = 0 represents Black.
Bitmap format: uncompressed, each pixel information stored.
Header + each pixel description
Image processing problems
image storage and access problems
format conversion
rotate, combine and other edit operations
compress, decompress
image enhancement problems
Remove noise
Extract features
Identify objects in image
Medical analysis (e.g. tumor or not)
Median filter
A problem with mean filter is that the image loses its sharpness. Median filter does a better job.
Median filter examines the neighborhood pixel values and sort them, replace the current pixel value by the median value.
Example:
Time complexity of median filtering
Worst-case:
for each color component, sorting an array of size 9 involves about 45 comparisons and about 45 data movements.
Total number of operations is ~ 270 n2.
For a 1024 x 1024 image, the total number of operations is ~ 270 million.
Summary
algorithm analysis involves measuring the number of operations performed by an algorithm before implementing it. This will provide some guideline on which one to implement.
many ways to measure efficiency of algorithms:
average vs. best case vs. worst-case
time, storage, bandwidth etc.
which operations? +, == , assignment, or all of them?
O notation is used to approximate the time complexity. (gives just the order of magnitude).