[OpenCV] Image Processing-fuzzy Set

Source: Internet
Author: User
Tags knowledge base

Using fuzzy techniques (Grayscale transformation grayscale Transform) and (spatial filtering spatial Filtering)

Fuzzy sets provide a form of processing of imprecise information.

First, the input amount needs to be converted to membership degree, this process is called "fuzziness". Then, use the resulting degree of membership to calculate, or judge, or other more complex algorithms. Finally, you need to convert the degree of membership to output again, which is called "blur " or "anti-blur."
using a Fuzzy collection for "grayscale transformation"

Use a fuzzy set for grayscale transformations to enhance the image. The first can be considered in common sense, general for the dynamic range of small images, we generally deal with the method is gray-scale, or histogram equalization.

The essence of these two approaches is to darken the darker pixels of the original, making the brighter pixels brighter. So, we set the following fuzzy rules

R1: If a pixel is dark and then makes the pixel darker;R2: If a pixel is gray, then let him remain gray;R3: If one pixel is bright, then make the pixel brighter;

This rule represents the way we deal with it.

Of course, the pixels in theIF condition are dark (or gray, or bright), and the concept is blurred.

The darker (or more gray, or brighter) of the results is also blurred.

To do this, we need to establish a membership function to determine the degree of membership of a pixel for three conditions.

In fact, the determination of the membership function is very complex, but here we try to be as simple as possible.

First, a pixel is dark (fuzzy), then its membership function is roughly shaped,

      • At a time below a certain value, the domain membership is 1,
      • After the grayscale crosses a value, its degree of membership is 0,
      • Of course.

Then linear interpolation with each other, then we can get the membership of R1 function. Similarly, R2 and R3 are the same.

For the sake of simplicity, Let's set the darker of the then conclusion to a simpler function.

      • To make this pixel darker, its output is 0. Similarly
      • To keep this pixel gray, we set its output to 0.5,
      • To make a pixel brighter, we set it to 1.

According to the above discussion, the membership function we have decided is as follows.

Using the input membership function, you can get the blurred data.

For a pixel , it is necessary to calculate the corresponding membership degree according to the rule r1,r2 and R3, and

This process, called fuzziness .

To obfuscate an input, the function (or correspondence) used is called a knowledge base.

application of Fuzzy set

Interesting way of expressing, praise.

Instance:

To overlap the membership function, it is important to understand:

The key here is to customize a standard, which is the essence.

In combination with the formula, understand the meaning of the formula:

A weight-weighted maturity estimate is obtained, the most output value.

But this is not the calculation is too big point, for each image, after all, so many pixels to calculate one by one.

But the effect looks good.

"Spatial filtering" using a fuzzy set

Fuzzy rule:

Instance:

[OpenCV] Image Processing-fuzzy Set

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.