Monday, August 24, 2015

Twitter Photo Preview - Smart Cropping

So, I just noticed something in Twitter that I find kind of amazing. It seems like photos attached to tweets are cropped intelligently for the preview.

I noticed it with a tweet that I put out this morning (these are just screenshots):

When I first uploaded it, the preview was less than flattering:

But it seems like there was some analysis done on the photo (full photo below), and the preview was moved to show the face in the picture.

This is pretty cool in itself, but nothing too amazing. Lots of sites and applications have face recognition, so centering the primary face (or faces) shouldn't be all that difficult.

But then things got a bit more interesting.

The Really Cool Preview
Here's a tweet from last week where I was showing how excited I was to be on an upcoming episode of .NET Rocks!

Here's the full picture:

And when I first uploaded the picture, it showed the middle part in the preview:

But notice what Twitter eventually did when it re-cropped the preview: it used the part of the picture that had my name on it (the bottom part of the picture).

This tells me that in addition to facial recognition, they must also be doing some sort of OCR to figure out that the main part of this picture -- the part that I cared about -- was the part with my name in it.

Kind of freaky, but really, really cool.

I know I shouldn't be amazed by technology. But sometimes I have to marvel at the cool stuff that people come up with.

Happy Coding!

No comments:

Post a Comment