Retargeting: an unexpected application of classic Dynamic Planning

Source: Internet
Author: User

The image processing technology of computers is getting better and better, and many seemingly impossible things are now quite mature.Algorithm. But do you believe that there is an algorithm that can change the aspect ratio of an image while keeping the aspect ratio unchanged!
We often encounter such a problem: the source image's aspect ratio is not consistent with the target's length and width. It would be a pity to cut a part of the image, and the image content is changed after the image is stretched. At this time, a technology called retargeting may help you: when the aspect ratio of an image changes, it can compress unimportant parts of the image and keep the aspect ratio of the image body unchanged, this image cannot be seen as being stretched.
The principle of the algorithm comes from this paper named seam carving for content-aware image resizing, which was first presented at the Siggraph conference in August this year. The following video briefly introduces this algorithm, and you will find it very simple.

Youtube link: http://www.youtube.com/watch? V = qadw0brkemk

You will hear a word that oier is particularly familiar with in the video. "Starting from a pixel in the top row, you can only move to the bottom left, bottom right, and bottom right at a time to find the weight and the smallest one in the path at the bottom ", this is a required course for every oier to learn dynamic planning. It even appeared in a noip simulation competition a few days ago (it seems to be the third question ).
A recent cnbeta article mentioned that this technology has been used for practice. A flash website called rsizr can implement the above algorithms. If you are interested, you can try it.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.