If you’re unhappy with the composition of a photo then your first instinct may be to crop it, removing areas without important visual content to help the viewer concentrate on whatever is left. But this can only go so far. And if there’s plenty of content at the edge of the photo then you may hardly be able to crop the image at all.
Content-aware image resizing (CAIR) provides another, more intelligent way to reframe your shot. Essentially it allows you to define content you’d like to remove from a photo, wherever it might be, and can then strip it out (hopefully without leaving any trace). And as a result the image will shrink in size, sometimes dramatically, but you still retain the core content. (If you’re not sure what we mean then the relevant Wikipedia page has some sample images which should make everything clear.)
Unfortunately, while standard linear image resizing is very simple to implement, CAIR is much more challenging, which is why you’ll generally only find the technology in high-end tools such as Photoshop. But if you’d like to try it out for yourself then the open source Seam Carving GUI will give you a basic idea at no cost.
Once you’ve opened your sample images then the program allows you to mark areas you’d like to keep, and areas that really must go, simply by painting over them. The interface makes this more awkward than it should be, but zooming in and adjusting the brush size will help you to precisely define the areas you’re working with.
You can then enter the new dimensions for your image, if you’ve a target size in mind. But if that doesn’t matter, simply click Remove and the program will immediately resize the photo to strip out your unwanted content.
The results can be, well, variable. Resizing a beach photo didn’t work at all, for instance, as image artefacts in the sea made our tweaking very clear. But with simpler backgrounds -- sand, grass -- the final image was much better, and we also had success in more surprising areas (removing a few people from a party photo, for instance).
And if you explore the program then there are tweaks you can make to improve results, such as working with masks or trying different edge detectors.
Seam Carving GUI still doesn’t get close to achieving the quality of results you’ll get from Photoshop and other high-end editors, which is no great surprise. It can work well sometimes, though, depending on your source material, and if you don’t have anything else capable of content-aware image resizing then you may find the program useful.
Photo Credit: Laborant/Shutterstock