Title: Dynamic Image Resizing
1Dynamic Image Resizing
Patrick Elliott
2Goal
Resize an image without losing the dimensions of
important aspects of the image.
3 Method
- Turn color image into grayscale image.
- Find the gradient magnitude of the grayscale
image - Find the minimum sums of paths of pixels
4 Method (cont.)?
- Find a path of pixels with the smallest change of
intensity and remove them. - Continue this until the image has the desired
dimensions
5The intensities of the pixels are summed
vertically (creating the center gradient
magnitude image). Then, the darkest seams (path
of pixels from top to bottom, created by moving
at most one pixel to the left or right, with the
least intensity, and thus least importance in
the image) are removed.
6Expanding Images
- First, find the best seams to remove in order and
store the paths in an array. - Go to each path, and instead of removing it, add
pixels next to the path that has the average
values of the pixels on either side. - Repeat until image has desired dimensions.
7Traditional Stretching
Original Image
The traditional method of stretching the
image expands each pixel uniformly, thus making
the final image unrealistic.
My method of stretching expands only things in
the background of the image. The important items
(the dolphin in this case) remain untouched by
the program.
Final Result
8Further Work
With negative weights, a single object can be
removed from an image without effecting anything
else. The image can then be expanded back to its
original size, and it is near impossible to tell
it has been changed.