Computational Photography 15-862
Project2: Seam Carving
Yajuan Wang
This project mainly uses Seam Carving method to relieze content-aware imge resizing.
-
Two different energy functions are used to find the
seam position. The first is that I used sobel operator to find the horizontal and vertical gradient of the images, and then find the seam. The
second is that the 9 by 9 window is used to find the entropy for the image which is added to the gradient image to find the seams. It is observed
that the entropy+gradient method works better than gradient method when we want to keep some details of images with low gradient.
- After finishing
the horizontal carving, we just need to transpose the image matrix and do the similar manipulation to get the vertical carving results.
- Image enlarging is used similar logic. The first k seams is founded and then repeated to get the larger images.
- GIMP is also used to manipulate the images to get interesting results.
Here is the result of each part:
- Horizontal Carving Result Using Gradient Energy Function
- Vertical Carving Result Using Gradient Energy Function
- Comparison Result Using Gradient and Entropy Energy Function
- Image Enlarging Result
- Unsuccessful Results Using Both Method
- Using GIMP to Deal With Images
- Image Sources
1. Horizontal Carving Result Using Gradient Energy Function
2. Vertical Carving Result Using Gradient Energy Function
3. Comparison Result Using Gradient and Entropy+Gradient Energy Function
Original Images |
Horizontal Carving Using Entropy+Gradient (Better) |
Horizontal Carving Using Gradient |
|
|
|
|
|
|
|
|
|
|
|
|
From the above results, we could tell that using Entropy+Gradient method works better than
Gradient method for some images. I think the former can keep certain details in images with lower gradient which would be removed
using gradient method.
Original Images |
Carving Using Entropy+Gradient (similar) |
Carving Using Gradient(similar or better) |
|
|
|
|
|
|
|
|
|
4. Image Enlarging Result(The result in this part is gotten through calculating the first k seams
throught gradient seam carving methods then repeating these seams.)
5. Unsuccessful Results Using Both Method
Original Images |
Carving Using Entropy+Gradient |
Carving Using Gradient |
|
|
|
|
|
|
|
|
|
6.Using GIMP to Deal With Images
Original Images |
Cloning |
Scaling |
|
|
|
Original Images |
Cloning to remove flowers |
Cloning to add flowers |
|
|
|
7. Image Sources:
- Horizontal Carving Result Using Gradient Energy Function(in order of appearance)
- http://www.trekearth.com/gallery/
- http://www.trekearth.com/gallery/
- My photo from DC
- My photo from Pitts
- My photo from FL
- My photo from FL
- My photo from Caltech
- My photo from Caltech
- My photo from DC
- My photo from FL
- Vertical Carving Result Using Gradient Energy Function
- All the photos from http://www.trekearth.com/gallery/
- Comparison Result Using Gradient and Entropy Energy Function
Gradient+Entropy works better:
- http://www.webshots.com/
- http://www.trekearth.com/gallery/
- http://www.trekearth.com/gallery/
- My photo from FL
Similar result or gradient works better:
- http://www.trekearth.com/gallery/
- My photo from Caltech
- My photo from Caltech
- Image Enlarging Result
- http://www.trekearth.com/gallery/
- http://www.trekearth.com/gallery/
- http://www.trekearth.com/gallery/
- http://www.trekearth.com/gallery/
- http://www.trekearth.com/gallery/
- http://www.webshots.com/
- Unsuccessful Results Using Both Method
- My photo from Caltech
- My photo from DC
- My photo from DC
- Using GIMP to Deal With Images
- My photo from FL
- My photo from DC