Research of image algorithm---sharpening algorithm based on local mean value

Source: Internet
Author: User

Image sharpening algorithm is often used in image processing of the basic algorithm, in Photoshop, using the Unsharp mask, but this sharpening speed is relatively slow, today, introduced a very simple sharpening algorithm: Based on the mean filter sharpening algorithm. The algorithm introduced in this paper derives from the paper "Digital image enhancement and noise fitering by using local statistics". The algorithm process is as follows: 1, calculates the mean value in the window range:

The formula (1) is the mean formula, the formula (2) is the variance formula, the formula (2) is not used temporarily.

2, Sharpening formula:

2.1 Sharpening Algorithm (1):

The formula X (I,J) represents the sharpening value of the (i,j) position pixel, and M (i,j) represents the mean.

When K=0 is used, the algorithm represents mean-value filtering.

When 0<k<1, the algorithm represents low-pass filtering.

When k = 1 o'clock, the algorithm indicates that the original image is unchanged;

When K>1, the algorithm represents high-pass filtering, namely sharpening algorithm;

2.2 Sharpening Algorithm (2):

where g (x) represents a linear transformation, such as a=0.9,b=13, which represents a contrast enhancement.

When K=0 is used, the algorithm represents mean-value filtering.

When 0<k<1, the algorithm represents low-pass filtering.

When k = 1 o'clock, the algorithm indicates that the original image is unchanged;

When K>1, the algorithm represents high-pass filtering, namely sharpening algorithm;

The above is the algorithm based on mean filter sharpening, the algorithm is quite simple, easy to implement, here are:

Original

Window radius radius=10,k=0.5

Window radius radius=10,k=2

Finally, a simple demo is given: The sharpening algorithm based on mean filter demo.zip share with you!

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Research of image algorithm---sharpening algorithm based on local mean value

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.