WYSIWYG

http://kufli.blogspot.com
http://github.com/karthik20522

Wednesday, October 23, 2013

Smart Thumbnail Cropping

Scaling an image down to a thumbnail size is a common practice when hosting it on websites to reduce page load time and save bandwidth and so on.. But very little has been done in optimization of those thumbnails from a human view-ability point of view. Human view-ability, what? Take a large image where background covers the major part of the image and shrink it down to a thumbnail size (say 192 px) and notice that the details of the image is subdued by the background.

To solve this problem of smart cropping, I am using a variation of descriptors and image processing tricks to extract only the most feature rich part of the image and preserve the aspect ratio while cropping the image. Following are the test results of algorithm used:
Sample 1
Original Thumbnail Feature Extraction Cropped Thumbnail
Sample 2
Original Thumbnail Feature Extraction Cropped Thumbnail
Sample 3
Original Thumbnail Feature Extraction Cropped Thumbnail


So what's in the pipeline:
  • Open source the image processing code
  • Build a http handler (ASP.NET http handler) for dynamic cropping
Thoughts?

Labels: , ,