Download presentation
Presentation is loading. Please wait.
Published byAndrew Woods Modified over 9 years ago
2
Image Processing A Study in Pixel Averaging Building a Resolution Pyramid With Parallel Computing Denise Runnels and Farnaz Zand
3
What is Image Processing? Image processing generally involves three steps: Input an Image Manipulate the image in some way. Output the result.
4
Original Image The master node divides the image into tiles of pixel sets Each slave node receives one tile, a 2D array (ex. 4X4) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
5
Processed Image Each slave node returns an averaged tile, a 2D array (ex. 2X2) The master consolidates into one image now smaller than the original 12 3 4 56 7 8 9101112 3141516 1
6
Resolution Pyramid A resolution pyramid is a set of files that contain an image with decreasing resolution. One file contains a tile from the original image with the best resolution; another contains a smaller tile that has been generated by averaging the pixels of the first file. The smaller tile uses less memory but it has a lower resolution.
7
The Problem: Why a Pyramid? Generate real-time immersive applications, such as an application that allows the viewer to ‘fly through’ a landscape. For the user to get real time results the changing scenery must be rendered very fast. A problem is encountered when the full scene will not fit into main memory.
8
The Solution: How a Pyramid Works When a viewer is focusing on a certain point in a scene other points in the distance can be rendered at a lower resolution. In this way we can hold several tiles in memory with varying resolutions As the viewer changes focal points new tiles can be loaded into memory to accommodate the different views.
9
Things That Make You Go HMMM Number of Processors Too few Too many Size of Tiles What scalar value should be used How much main memory do we have How much disk space do we have
10
Constraints & Limitations Original image must have dimensions that are a power of two Graphics Hardware Constraint Number of processors must be an even power of two OR Original image must be square Software Constraint Prevents “left over edges”, simplifies code
11
Master’s Responsibilities Read in Original.tga file Send Image to Slave Processors Vs. send tile to slave: which is faster? Each slave sorting out one tile or the master sorting out N tiles? Receive Result from Slave Processors Consolidate Results Generate a Result.tga file
12
Slave’s Responsibilities Receive Image from Master Sort out tile into tile sized array Begin Loop Average tiles based on scalar Generate.tga file with Proper Name Base name on corner and scalar values Send result tile back to Master Reduce scalar End Loop
13
Pixel Averaging Algorithm Partition tile into pixel sets Of Size scalar X scalar Sum the values in these sets Divide the Sums by scalar 2 Store averaged values in Resultant Array
14
Algorithm in Action 4 Pixels per Tile 4 Tiles in Original From Master 1 Pixel per Tile 4 Tiles Returned Resultant Tile
15
Run the Program With three different sized images A varying number of processors For timing comparisons Scaled down to smallest discernable resolution For image quality comparisons
16
Time Comparison Different Number of Processors Are smaller images processed more quickly with fewer processors Are larger images processed more quickly with more processors
17
Quality Comparison When is the quality compromised Averaging with the pixel set produced by the smallest scalar value (2), is quality already compromised How small is too small Averaging with the pixel set produced by a larger scalar value, what is that value
18
Observations Averaged 2 X 2 set of pixels Image quality is affected by even the smallest scalar value
19
Observations continued: Original 1024 X 1024 512 X 512 scalar = 2 256 X 256 Scalar = 4 The largest scalar value that produced a discernible image is 4. With a scalar of 8 the image becomes indiscernible
20
Results Time comparison results showed 5 processors produce the most efficient results 17 processors produce the least efficient results 1 processor is faster than 17 but slower than 5
21
Original Image Size 256 X 256
22
Original Image Size 512 X 512
23
Original Image Size 1024 X 1024
24
Conclusion Multiple processors can increase the speed of image processing There is a threshold number of processors, after which efficiency decreases due to message passing
25
Follow Up Implement message passing such that the master sorts out all of the slave tile pieces and delivers a smaller message to each slave Compare times master sorting all tiles vs. slave sorting one tile each In conjunction with smaller message sizes
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.