Skip to main content

Content Aware Image Resizing With Seam Carving GUI

Content Aware Image Resizing, also known as Seam carving and content-aware scaling, is a way to re-size an image without modifying its content ratio. The algorithm resizes images non-uniformly and while doing so, magically preserves the content of the image by getting rid of unimportant areas. The purpose of the algorithm is to display images without distortion on various media using document standards, like HTML, that already support dynamic changes in page layout and text, but not images.

The algorithm was first explained by Shai Avidan and Ariel Shamir and published in 2007. Since then several excellent implementations have been released including a plugin for The Gimp and CAIR, a standalone application in C++. Content-aware scaling was also incorporated into Adobe Photoshop CS4.

Content Aware Image Resizing can be understood by the following example.

Below is a picture of Broadway Tower in England. We need to reduce the width of this image.

Broadway_tower

On the left is what happens when you reduce the width of the picture by scaling. On the right, is the result of seam carving.

Broadway_tower_edit_scale Broadway_tower_Seam_Carving

Seam Carving GUI is a GUI front end to CAIR. The program resizes images by automatically detecting “seams” – paths of minimum change from one end of the image to another, and then by removing the seams from the image. There is an option to manually mark the regions to keep and the regions to remove, but it generally produces worse results. To guide you in this process the program can show you energy density of the image.

seam-carving-gui2

The success of seam carving will vary from image to image. Pictures, like the one showed in the example above, is ideal for seam carving. Images with lot of content are not. If you aren’t asking for too much, choose images wisely and understand the limitations of the program, Seam Carving GUI can produce excellent results.

Examples of good scaling

seam-carving-good

seam-carving-good2

Example of bad scaling

seam-carving-bad

Photo credits: danichtfür, Miroslav Petrasko, perkijl61

Comments

Popular posts from this blog

How to Record CPU and Memory Usage Over Time in Windows?

Whenever the computer is lagging or some application is taking too long to respond, we usually fire up task manager and look under the Performance tab or under Processes to check on processor utilization or the amount of free memory available. The task manager is ideal for real-time analysis of CPU and memory utilization. It even displays a short history of CPU utilization in the form of a graph. You get a small time-window, about 30 seconds or so, depending on how large the viewing area is.

How to Schedule Changes to Your Facebook Page Cover Photo

Facebook’s current layout, the so called Timeline, features a prominent, large cover photo that some people are using in a lot of different creative ways. Timeline is also available for Facebook Pages that people can use to promote their website or business or event. Although you can change the cover photo as often as you like, it’s meant to be static – something which you design and leave it for at least a few weeks or months like a redesigned website. However, there are times when you may want to change the cover photo frequently and periodically to match event dates or some special promotion that you are running or plan to run. So, here is how you can do that.

Diagram 101: Different Types of Diagrams and When To Use Them

Diagrams are a great way to visualize information and convey meaning. The problem is that there’s too many different types of diagrams, so it can be hard to know which ones you should use in any given situation. To help you out, we’ve created this diagram that lays out the 7 most common types of diagrams and when they’re best used: