Axis-aligned image retargeting for iOS
This app gives you a new way to modify your photos. It allows you to change the aspect ratio of your images with minimal visual artifacts. Important content, like people or landmarks, can be preserved while parts of the background might get stretched or cropped.
The app is available as a free download in the iOS App Store for the iPad, iPhone, iPod touch and iPad mini.
This application was developed in the Bachelor Thesis of Daniel Graf at ETH Zurich in Winter 2012/13. It implements and extends the axis-aligned image retargeting algorithm by Panozzo et al. A paper about the project was published and presented at VMV 2013 in Lugano.
The thesis was supervised by Dr. Daniele Panozzo and Prof. Dr. Olga Sorkine-Hornung at the Interactive Geometry Lab at ETH Zurich. The underlying optimization problem is solved using CVXGEN, a project by Jacob Mattingley at Stanford. The icon of the app was designed by Felix Hornung.
Feel free to contact us with any questions you might have.
A comparison of our retargeting operator with previous results can be found here.
The source code of this application is freely available on our github repository.
If you are interested in finding out more about the techniques used to implement this application, take a look at the thesis, download the presentation slides or take a look at the page of the publication.
The application consists of two main parts. In the library, you can store and preview all the images that you retargeted so far. In the editor, you can refine and reformat a single image to a new aspect ratio.
To add images to the library use the two buttons on the top left. You can either take a picture with the built-in camera or choose an image from your camera roll.
In order to edit a picture add it to the gallery and then tap on it. To remove a picture from the gallery, tap and hold on the picture and confirm that you want to delete it.
By pinching with two fingers, you can change the size of the thumbnails in the gallery. After the import, the thumbnail will just show the original image. Once you have edited an image the app automatically saves an optimized square thumbnail to use every pixel of your screen.
This is the place where you can change the aspect ratio of an image and paint the important parts of the image. You can start by simply painting into the image with a single finger. You will see that the marked regions will get highlighted in white. To change the aspect ratio, you can use two fingers and swipe up and down to retarget the image. You can also choose one of the predefined aspect ratios by tapping on the little icon with the coordinate axis:
The following list explains the buttons in the toolbar on the top. On iPhones and iPods, the full list of buttons is only visible in landscape mode.
This button saves your work and brings you back to the gallery.
Here you can define whether the deformation is allowed to crop parts of the images and you can choose the size of the paint brush. The advanced settings give you access to the detailed parameters of the retargeting algorithm. For instance, you can show the underlying quad grid or enable regularization. Some of the exposed parameters are only for demo purposes to show the inner workings of the underlying algorithm. All of them are preset to values that are working well in most cases. So you should only change them if you want to explore the details of the retargeting algorithm.
A tap on this button renders a full resolution retargeted image in the current aspect ratio and saves it to the camera roll, so that you can insert it to emails, blogs, and so on.
Take a new picture and edit it directly. All your work on the current picture will be saved first.
Choose a picture from your photo library and directly edit it. All your work on the current picture will be saved.
Show / Hide Saliency Map
Here you can switch between seeing the following to views:
Displays the saliency map on top of the image. You can also see the cropped parts when using the combined view.
See the optimized retargeted image in all its beauty.
Combined / Split View
Here you can switch between seeing the following two views:
Displays the retargeted image using the whole screen. You can directly paint onto the retargeted image. When showing the saliency, you can also visualize the cropped image parts and paint onto them.
You can see the image in original and retargeted aspect ratios side by side. To paint saliency, move your finger across the original image.
This palette allows you to choose out of a few predefined aspect ratios. Among them are the classical still picture and widescreen television ratios. You can also go back to the original aspect ratio. At the end of the list, all the ratios needed for the RetargetMe benchmark are provided.
Paint Brush / Eraser Tools
To paint onto the saliency map, make sure that the paint brush is selected here. If you want to remove saliency, tap this button to change between the paint brush and the eraser.
By clicking the wand button, the app tries to automatically detect salient image parts. The app looks for strong edges and borders and detects faces in the image. You can improve the saliency map by just painting over it. By pressing the wand several times, you can increase the contrast in the saliency map.
You can reset the saliency map to start painting or detecting from scratch.
Do you have any questions or problems?
Let me know if you like the app, found a bug or just want to say hi.