Application of partial differential equations in image effects

Source: Internet
Author: User

A long time ago, there was such a software on iOS called pimple eraser. Its function was very simple, that is, to remove acne from the face, and the effect was very good. Of course, you must manually select the location and size of the acne. Unfortunately, the interaction of this software is not very good. About a year later, meitu xiuxiu's new version also achieved the same functionality, and its human-computer interaction functions were much better than pimple eraser, which became a new highlight of meitu xiuxiu. Similar to this, Baidu magic map actually has this function for a long time, but the effects they have made are really not flattering. Isn't the magic map team having no in-depth research?Algorithm?

First of all, I am not one of the authors of the above software development. However, I can guess that the algorithms used by meitu xiuxiu and pimple eraser are partial differential equation repair algorithms, while Baidu magic map uses the Weighted Mean Value repair algorithm, therefore, the effect of the latter cannot be comparable to that of the solution based on partial differentiation. In fact, in the well-known Photoshop image processing software, its stain Repair Tool is implemented by using the PDDE.

Image repair can be basically divided into two categories. First, it is better to fix small cracks. Another type is the repair of large blocks of holes, which are usually filled with textures. In Photoshop, choose fill> Texture Recognition to implement the texture Filling Algorithm for large blocks. The PS algorithm is not satisfactory for many times for filling large blocks of empty textures. At present, many better and faster algorithms have been proposed.

Since a large-scale linear equations need to be solved after partial differential equations are discretization, Gaussian Sader Iteration Algorithms are generally used. Therefore, the difficulty of the solution based on partial differential equations lies in the large amount of computing and the high proportion of system Ram resources. You can find a lot of documents on the Internet, and there are MATLABCodeFor reference.

Because facial acne is generally only in the face part, I have implemented a classic digital image repair algorithm for TV models based on this feature using a local repair method. It can quickly remove acne on the human face, and the system occupies a small amount of Ram resources.

Below is the test image:

 

 

 

From the repair results, although some hair blocks the part of the moles, the repair results are barely acceptable.

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.