- Case Study -

VPS Android App

An OpenGL-based Android app to simulate plastic surgeries

Plastic Surgery Simulator is a very useful Android app which can be used by users or plastic surgeons to see how someone will look after a surgery and make some serious plastic surgery decisions.

It can also be used for fun to distort your friends’ photos and see how they would look with fuller lips, bulging muscles or a nose job! The app is a simple-to-use but very powerful tool to simulate various plastic surgeries

– Nose Job (rhinoplasty)
– Breast, buttock augmentation / reduction
– Lips augmentation
– Chin and face contouring
– Weight loss, liposuction
– Muscle augmentation
– anything you can reshape, grow or shrink !

The Challenge

The app had to use a mesh which could render the user selected image so that each pixel could be manipulated by shrinking, bulging or distorting it with single touch. At the same time, the app had to be intelligent enough to identify multi-touch and allow the user to pinch and zoom the image. Another major issue was ensuring the different screen resolutions in Android did not affect the app’s layout. So if a device with high resolution uses it, the image should be laid out accordingly.

The app also allowed the user to rewind and view a video of all the actions they did on an image. For this each state of the image had to be stored in the memory while ensuring it did not lead to an out-of-memory exception.

Finally the user had to be able to save the edited image to their photo roll (both before and after) so they could share it via Facebook or email. They could take this image with the before/after text on it.

The Solution

While the functionality of the app was pretty complex, knowing the basics of OpenGL helped us a lot with the app. The image selected by the user was laid out in an OpenGL mesh to ensure we could interact with each pixel and manipulate it based on the user’s inputs.

The playback of all user’s actions as a video in the app seemed to be a very difficult functionality to implement. But our research helped us find a very simple solution to this problem – just get the texture files for all states of the image and show them in a loop. We already had the initial and final states for each transformation (had to be saved so user could undo any of their changes)!

The app gave the user an ability to save the before/after image. Since the image was in an OpenGL mesh, we took an image of the OpenGL layer and programatically wrote the text on top. Another approach could have been taking a screenshot of the visible view. But that would have included unnecessary components as well like the toolbar.

The Final Product

The final product was a very successful app for plastic surgeons and users which allowed them to do some really complex manipulations on images. The app also maintained simplicity of use despite the number of features available.

 

Its your last chance!

Nah... Not really. But you knew that. I will just leave this button here for you when you need it.

Call To Action