5

Image Processing Using Fuzzy Logic Toolbox

 3 years ago
source link: https://matlabhelper.com/blog/matlab/image-processing-using-fuzzy-logic-toolbox/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Have you ever imagined how our facial patterns are recognized; or how the antiskid braking system works; all these are put into the application using Fuzzy logic toolbox, because of its computational perception properties. It deals with information that arises from cognition, that is, uncertain or imprecise or vague depending upon the situation. It gives us a broader view of a more in-depth analysis, which provides us a better assessment of options.

Fuzzy logic toolbox – An Introduction

Fuzzy logic has two different meanings. In a narrow sense, fuzzy logic is a logical system, which is an extension of multivalued logic. However, in the broader sense, Fuzzy Logic (FL) is almost synonymous with the theory of fuzzy sets. This theory relates to classes of objects with unsharp boundaries in which membership is a matter of degree.

Fuzzy Logic Toolbox provides us with functions, apps, and blocks of Simulink, which are used for analyzing, designing, and simulating systems based on fuzzy logic. This toolbox guides us through the steps of designing fuzzy inference systems. In its functions are provided for many standard methods, including fuzzy clustering and adaptive neuro-fuzzy learning.

This toolbox lets us model complex system behaviors using simple logic rules, and then implement these rules in a fuzzy inference system. We can use it as a stand-alone fuzzy inference engine. Alternatively, we can use fuzzy inference blocks in Simulink and simulate the fuzzy systems within a comprehensive model of the entire dynamic system.

Fuzzy Inference system

The fuzzy inference system can be referred to as the critical unit of the fuzzy logic system. Its primary function is based upon decision making. The rules which it follows is "IF <_condition_>THEN", which is connected through "OR" or "AND".

Let's take an example, if one condition is satisfied, then the rule is applicable. Now take the example of two rules which are applicable or suppose two situations are applicable, and you must draw the decision, keeping in mind both. Here the work of connectors come. We will be using connectors for implementing 2 rules or conditions simultaneously.

Now let's have an overview of the functional blocks of the Fuzzy Inference System.

Rule Base – It contains a different set of rules. The rules are generally IF-THEN based.

Database – It defines the fuzzy sets by defining the membership functions. These fuzzy sets are used in fuzzy rules.

Decision-making Unit – Perform different operations on the rules and provide us the decisions.

Fuzzification interface unit – its purpose is to convert the crisp input quantities into fuzzy quantities. The input that we will be provided to the inference system, the fuzzification unit will convert that into fuzzy quantities.

Defuzzification interface unit – it converts the fuzzy quantities into crisp quantities because, at the end of the process, some numerical value is required, and for that purpose, we need this conversion.

Block diagram representing all the functional blocks involved

Working of the fuzzy inference system

Methods involved in Fuzzy inference system

Mamdani Fuzzy Inference System

This system was proposed in 1975 by Ebhasim Mamdani, so it got its name from it. It is commonly used in applications, like controlling a steam engine and boiler combination by synthesizing a set of fuzzy rules obtained from the people working on the system due to its simple structure of 'min-max' operations.

We will now go through the steps involved in the process. For this, we will consider a real-life example of giving tips for the service received at a restaurant. Based on this, we give a rating between 0 and 10 that represents the quality of service at a restaurant, which helps in evaluating the results.

Evaluating the antecedent for each rule.

Through our input values (crisp values), we obtain their membership values. This process is termed as input fuzzification. If the antecedent of the rule has more than one part, a fuzzy operator (t-norm or t-conorm) is applied to obtain a single membership value.

Input Fuzzification

When fuzzifying initially, the antecedent (service is excellent) we obtain the rating to which the service is excellent. For example, if we rate it as 3 (which gives a wrong impression when measured according to the highest limit, 10), which means that the service provided is low as a result, we obtain membership function as 0. In the second part of the antecedent (food is delicious), if we rate it as 8 (which gives a good impression when measured according to the highest limit, 10), which means that the service provided is suitable as a result, we obtain membership function as 0.7.

Now we can see that the 2 statements are joined by a "OR" (service is excellent, or food is delicious), we apply OR operation. A decision is made that is any of the conditions is satisfied, we obtain the membership function. This gives the maximum value as a result

Suppose if it was joined by "AND" then the membership function obtained would have been the minimum.

Obtaining the conclusion of each rule applied

From the result that we obtained from step 1 by evaluating the antecedents, we now apply a fuzzy implication operator to obtain a new fuzzy set for the further process.

Obtaining the conclusion of each rule applied

By using the minimum operator, we can scale down the output received.

Summing up the conclusions

In this step, we will be combining all the outputs for the rules specified in the previous step, into a fuzzy set. This will be done using the fuzzy aggregation operator.

Examples of some aggregation operators are:

  • The Maximum

  • The Sum

  • The Probabilistic sum

Summing up the conclusions

Defuzzification

While solving any decision-based problem, we want the answer in numeric form or crisp values instead of a fuzzy set.

Like considering the above example, we want to know the number of tips which we want to give for the services received instead of knowing the quality of tips. For this, we transform our fuzzy set, which we obtained in the above example into a numeric value. So, for every Mamdani, some simple steps are to be followed, which are as:

Step 1.

We must determine the fuzzy rules involved.

Step 2.

By using the input membership functions, we will be making the input values or crisp quantities fuzzy

Step 3.

In this step, we will be establishing the rule strength by combining the fuzzified inputs according to the fuzzy rules.

Step 4.

Now the process will go to the other part; that is the consequence, and previously, we were dealing with the antecedent. We will determine the consequences of rule by combining the rule strength and the output membership function.

Step 5.

For getting the output distribution, combine all the consequences. From this, we obtained the defuzzified output distribution is obtained.

Defuzzification

Reasons why fuzzy logic is efficient to use

Fuzzy Logic Designer

Image Processing using Fuzzy Logic

First, let us understand what image processing means that it is a process to perform specific techniques on an image, to get an enhanced image, or to extract some useful information from it. We can even consider it as a type of signal processing in which input is an image, and output may be image or characteristics/features associated with that image.

In Image processing, the techniques involved use filters to enhance an image. Their main applications are to transform the contrast, brightness, resolution, and noise level of an image.

Now moving on to Image processing using Fuzzy Logic, we have used a collection of different fuzzy approaches for image processing.Fuzzy image processing is the collection of all approaches that understand, represent, and process the images, their segments, and features as fuzzy sets.

Fuzzy image processing uses

  • Image fuzzification

  • Modification of membership values

  • Image defuzzification

The technique which holds the highest priority is the modification of membership function. After the image data is transformed from a gray-level plane to the membership plane (fuzzification), appropriate fuzzy techniques modify the membership values. This can be done by fuzzy clustering, a fuzzy rule-based approach, a fuzzy integration approach, and so on.

Fuzzy Image processing is useful in representing uncertain data related to any image because of the following reasons: -

  • These techniques can govern the vagueness and ambiguity efficiently

  • Fuzzy logic is easy to understand the reasoning involved are very

  • The fuzzy method will be more suitable to manage the imperfection than the traditional way. The input of the fuzzy inference system (FIS) is the original image and composed of a high pass filter.

For our Image processing, we have used medical images like CT Scan and MRI. These biomedical images are being used within the healthcare facilities for patient diagnosis, guiding treatment, planning treatment, and observing illness progression. Medical imaging basically processes missing, uncertain, complementary, ambiguous, inconsistent, and distorted data.

We will be analyzing these medical images and drawing conclusions using the Fuzzy Logic Toolbox. As the fuzzy logic act is a combined system for processing and representing numerical and symbolic data, and also the structural information, the fuzzy sets theory act as an intriguing and valuable tool, as it gives an excellent hypothetical basis to represent imprecision of the information.

Now let's understand what these Medical Images are.

CT Scan

Image Processing Using Edge Detection

In image processing, edge detection technique is used for finding the boundaries of objects within the images. It works by detecting discontinuities in the intensity of an image. Edge detection is used for image segmentation and data extraction in areas such as image processing, computer vision, and machine vision.

Standard edge detection algorithms include

  • Sobel
  • Canny
  • Prewitt
  • Roberts
  • fuzzy logic methods.

For image processing, a vital stage is segmentation. Segmentation is a process that divides an image into several homogeneous regions. The division of the image is based on abrupt changes in the gray-level.

Implementation

MH Quiz Contest - Dec'20

Online MCQ Quiz on Machine Learning & MATLAB

Special Prize applicable till 31st December 2020. Hurry up!

Image processing using image enhancement techniques

In image processing using image enhancement techniques, the most common method used is image binarization or enhancing directly through grayscale images. The steps involved in this process are: -

  • Normalization of the images

  • local orientation estimation

  • local frequency estimation

  • Filtering by designed Filters

The purpose behind normalizing the image is to decrease the dynamic range of the grayscale between ridges and valleys of the image estimation and the tuning of the filter parameters.

Implementation

Image Processing using Noise Reduction Techniques

As we all know that noise reduction is the process of removal of noise from a signal, so here the signal is our image and noise is the change in the pixel intensity of the image. Noise reduction algorithms tend to alter signals to a greater or lesser degree.

For the removal of noise, one of the most popular methods is the wiener filter. In this work, four types of noise (Gaussian noise, Salt & Pepper noise, Speckle noise, and Poisson noise) are used and image de-noising performed for different noise by Mean filter, Median filter, and Wiener filter.

Implementation

C-means Clustering for Image Processing using Fuzzy Logic Toolbox

C-means clustering is a part of the image segmentation algorithm used for image processing using fuzzy logic. As in image segmentation, we take an image of interest and extracts portions of the image for ease of analysis and is widely used in medical and healthcare facilities. We will be analyzing brain tumors from MRI images of a cancerous patient. It works by counting the number of pixels in a tumor with excellent accuracy.

By using Fuzzy c-means clustering (FCM), the diagnosis becomes more manageable as it is an efficient way to calculate the number of pixels hence helping in diagnosing the tumor. This is done mainly by assigning the data points to multiple clusters. Each data point has an assigned degree of membership.

Conclusion

Fuzzy Image processing has proved to be useful in the field of medical and healthcare. The fuzzy set theory provides us with a suitable tool, which can represent the uncertainties arising in image processing and can model the relevant cognitive activity of human beings. The fuzzy approach has proved to be efficient as compared to other methods. The more important advantage of a fuzzy methodology lies in that the fuzzy membership function provides a natural means to model the uncertainty prevalent in an image scene.

Loved the Blog? Gives us your valuable feedback through comments!

Thank you for reading this blog. Do share this blog, if you found it helpful. If you have any query, post it in the comments or get in touch with us by emailing your questions to [email protected]. Follow us on LinkedInFacebook and Subscribe to our YouTube Channel. We have expanded the traditional classroom teaching to meet the needs of today's learners. Our experts assist in all MATLAB & Simulink fields with communication options from live sessions to offline work with Pricing suitable for everyone. You can get offline help via email or opt for online zoom meetings with one-click content sharing, real-time co-annotation, and digital whiteboard.

If you are looking for one-time expert help, you can go ahead with Pay As You Go Plan. If your task is research-oriented like thesis support or paper implementation and you have a proper timeline, our recommendation would be Research Assistance, a monthly plan with a steady reduction of 10% of the expert fee up to six months of subscription. We also offer Corporate Assistance for requirements with annual validity. The minimum expert booking time is 1 hour under the Pay As You Go plan. You can book 5/10/20 hours under the Research Assistance plan. You will get expert help for the time you book only after you have an active order.

If you are looking for an expert's help and ready for the paid service, share your requirement with necessary attachments & inform us about any Service preference along with the timeline. Once evaluated, we will revert back to you with more details and the next suggested step.

Education is our future. MATLAB is our feature. Happy MATLABing!


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK