I have a low resolution square photo that was cropped (by the user) from high quality, not square, original. Then the low-resolution photo was resized down to thumbnail. I would like to automatically (without user intervention) redo the original photo in the same way to get a copy of the square version with a higher resolution. I do not have access to the original crop coordinates. All I have are two photos.
Here are some sample images (from my Facebook profile) to illustrate what I mean:
Original high-resolution photo - Cropped, then reduced, square photo
Again, the goal is to use a small photo as a guide to get a square photo with a higher resolution from the source.
The only limitations to the solution are:
- Community: I use this for profile photos, so if it only works on faces that are perfectly acceptable! No need to generalize to all kinds of random images; photographs of people are a great place to start.
- Platform: I use Node, but I would be happy to run this process in Ruby, Python, Java or C ++ (with Node bindings). It will almost certainly work on Heroku or AWS.
- Speed: it will be very fast. For this to be useful, it had to run online, as I would block the user interface waiting for this action.
Does anyone have any ideas? I don’t know much about image processing, so I don’t know where to start.
EDIT: For Facebook in particular, there is a solution that is not so difficult. Harvest source data is available for profile images: https://graph.facebook.com/bcherry/profile?fields=pic_crop
This will help me overcome my immediate hurdle, but it may not be a long-term solution, so the answers below are still very useful for a more general problem.
source
share