Difference between revisions of "Image retargeting by k-seam removal"
PamelaGotti (Talk | contribs) (→'''The Algorithm''') |
m (→Laboratory work and risk analysis) |
||
(39 intermediate revisions by 3 users not shown) | |||
Line 25: | Line 25: | ||
===== Project head(s) ===== | ===== Project head(s) ===== | ||
− | * | + | * [[User:PierluigiTaddei|Pierluigi Taddei]] |
+ | * Vincenzo Caglioti | ||
− | |||
− | |||
===== Students currently working on the project ===== | ===== Students currently working on the project ===== | ||
Line 37: | Line 36: | ||
* [[User:PamelaGotti|Pamela Gotti]] | * [[User:PamelaGotti|Pamela Gotti]] | ||
− | |||
− | |||
== '''Part 2: project description''' == | == '''Part 2: project description''' == | ||
Line 45: | Line 42: | ||
==='''State of the art'''=== | ==='''State of the art'''=== | ||
− | This project is based on the article '' | + | This project is based on the article ''Seam carving for content-aware image resizing, Avidan, S. and Shamir, A.,International Conference on Computer Graphics and Interactive Techniques, 2007'', in which the author describes content aware image resizing by removal of 8-connected path of pixels. |
==='''The problem'''=== | ==='''The problem'''=== | ||
− | The normal way of resizing a picture doesn’t take in account it’s content and differs from the resizing of a web | + | The normal way of resizing a picture doesn’t take in account it’s content and differs from the resizing of a web page where each object is modified on the basis of its content. So, there is the need for an image resizing that is content aware. |
==='''The Idea'''=== | ==='''The Idea'''=== | ||
− | The idea behind content aware resizing is to treat in a different way the important | + | The idea behind content aware resizing is to treat in a different way the important regions of the image respect to those regions with less information. To achieve this goal it’s possible to remove from the picture the seam with low energy. |
A seam is a path of pixel from top to bottom or from left to right, as it’s possible to see in the following picture: | A seam is a path of pixel from top to bottom or from left to right, as it’s possible to see in the following picture: | ||
− | [[Image:Paesaggioconseam.JPG]] | + | [[Image:Paesaggioconseam.JPG|center|thumb|An example of vertical connected seam|400px]] |
==='''The Algorithm'''=== | ==='''The Algorithm'''=== | ||
− | The implemented | + | The implemented algorithms use different kind of seam and minimize different measure: |
* removing a 8-connected path of pixels (1-seam) minimizing an energy function | * removing a 8-connected path of pixels (1-seam) minimizing an energy function | ||
* removing a not connected path of pixels (k-seam) minimizing an energy function | * removing a not connected path of pixels (k-seam) minimizing an energy function | ||
Line 68: | Line 65: | ||
Where k seam are those seam with a maximum disconnection of k pixel. This disconnection is important when in the picture there are many object and it’s important to don’t cut their edges. | Where k seam are those seam with a maximum disconnection of k pixel. This disconnection is important when in the picture there are many object and it’s important to don’t cut their edges. | ||
− | All these algorithms were implemented in Matlab and tested on several pictures (source code is available here: [[ | + | All these algorithms were implemented in Matlab and tested on several pictures (source code is available here: [[Media:Carving.zip|Carving source code]] |
). The project follows with a comparative analysis of strength and weakness of each method. | ). The project follows with a comparative analysis of strength and weakness of each method. | ||
+ | |||
+ | ==='''Report'''=== | ||
+ | |||
+ | The report about this project is available here: [[Media:Relazione.pdf|Report]] | ||
==='''Conclusion'''=== | ==='''Conclusion'''=== | ||
Line 75: | Line 76: | ||
From results emerge that the best algorithm is that one working with 1-seam with minimum energy. | From results emerge that the best algorithm is that one working with 1-seam with minimum energy. | ||
− | In the following pictures it is possible to see the result of | + | In the following pictures it is possible to see the difference between the result of the retargeting using the best algorithm and the normal resize method (stretching). |
+ | |||
+ | [[Image:ImageContentResizeDelfino.jpg|left|thumb|Original image|325px]] | ||
+ | |||
+ | [[Image:Delfino22.JPG|left|thumb|Resized image with streching|250px]] | ||
+ | |||
+ | [[Image:Delfino2 original connected.JPG|left|thumb|Resized image with 1-seam with minumum energy|250px]] | ||
− | [[Image: | + | [[Image:Delfino2 original notconnected.JPG|left|thumb|Resized image with k-seam with minumum energy|250px]] |
− | [[Image: | + | [[Image:Delfino2 final connected.JPG|left|thumb|Resized image with 1-seam with minumum energy variation|250px]] |
− | [[Image:Delfino2 | + | [[Image:Delfino2 final notconnected.JPG|left|thumb|Resized image with k-seam with minumum energy variation|250px]] |
Latest revision as of 16:25, 16 June 2008
Contents
Part 1: project profile
Project name
Image retargeting by k-seam removal.
Project short description
This project presents a methodology for content aware image resizing based on seam removal. In this work four different approaches were implemented in order to retarget an image:
- removing a 8-connected path of pixels (1-seam) minimizing an energy function
- removing a not connected path of pixels (k-seam) minimizing an energy function
- removing a 8-connected path of pixels (1-seam) minimizing the energy variation in the image
- removing a not connected path of pixels (k-seam) minimizing the energy variation in the image
where k is the maximum disconnect allowed.
The work ends with a comparison on several test pictures among these algorithms considering the one which gives the best results.
Dates
Start date: 2008/01/01
End date: 2008/06/24
People involved
Project head(s)
- Pierluigi Taddei
- Vincenzo Caglioti
Students currently working on the project
- Luigi Cardamone - luigi (dot) cardamone (at) mail (dot) polimi (dot) it
Part 2: project description
State of the art
This project is based on the article Seam carving for content-aware image resizing, Avidan, S. and Shamir, A.,International Conference on Computer Graphics and Interactive Techniques, 2007, in which the author describes content aware image resizing by removal of 8-connected path of pixels.
The problem
The normal way of resizing a picture doesn’t take in account it’s content and differs from the resizing of a web page where each object is modified on the basis of its content. So, there is the need for an image resizing that is content aware.
The Idea
The idea behind content aware resizing is to treat in a different way the important regions of the image respect to those regions with less information. To achieve this goal it’s possible to remove from the picture the seam with low energy. A seam is a path of pixel from top to bottom or from left to right, as it’s possible to see in the following picture:
The Algorithm
The implemented algorithms use different kind of seam and minimize different measure:
- removing a 8-connected path of pixels (1-seam) minimizing an energy function
- removing a not connected path of pixels (k-seam) minimizing an energy function
- removing a 8-connected path of pixels (1-seam) minimizing the total energy variation in the image
- removing a not connected path of pixels (k-seam) minimizing the total energy variation in the image
Where k seam are those seam with a maximum disconnection of k pixel. This disconnection is important when in the picture there are many object and it’s important to don’t cut their edges.
All these algorithms were implemented in Matlab and tested on several pictures (source code is available here: Carving source code ). The project follows with a comparative analysis of strength and weakness of each method.
Report
The report about this project is available here: Report
Conclusion
From results emerge that the best algorithm is that one working with 1-seam with minimum energy.
In the following pictures it is possible to see the difference between the result of the retargeting using the best algorithm and the normal resize method (stretching).