Fuzzy logic for image processing

1 view (last 30 days)
nayomi ranamuka
nayomi ranamuka on 19 May 2011
Commented: Walter Roberson on 18 Jun 2017
Dear all
I hope to identify some regions in the image using it color space. I want to do this using fuzzy logic with image processing. First I want to derive the fuzzy set. But I new for fuzzy logic. So Can you help me ?
  1 Comment
paramveer sran
paramveer sran on 9 Apr 2012
i am new to fuzzy toolbox. i have an ROI extracted from a medical image. what is the first step to compress this roi using the fuzzy toolbox

Sign in to comment.

Answers (4)

Andrew Fowler
Andrew Fowler on 19 May 2011
I'm a little unclear about what exactly you're trying to do, but what I think you want is to select a region of interest, then calculate a µ value for each pixel in the ROI with respect to some membership function, then subsequently map this µ value back onto the image in colorspace.
First you need to decide on the membership function you want to use. For example, a sigma function, where values less than 'A' have a µ value of zero, and values greater than 'B' have a µ value of 1, with a linearly increasing µ value for anything in between:
function mu = sigmamember(input, A, B)
mu = zeros(size(input));
vmu = input > A & input < B;
onemu = input >= B;
mu(vmu) = (input(vmu) - A) /. (B-A);
mu(onemu) = 1;
This is just an example member function, and you can play with the math to get your desired results.
For actually plotting this into colorspace, I need more details about what you are trying to do. You could plot the µ values into an array then use either HSV2RGB or IND2RGB depending on your situation.
  4 Comments
Twilighter
Twilighter on 5 Jul 2011
Nope, i'm not, but i do have the same question as Nayomi & i found this thread while googling it :)
Iqra Rizvi
Iqra Rizvi on 18 Jun 2017
I am same question ... how to modify an image to use it in fuzzy logic .. and after getting memberships functions and defuzzification .. how to get the fuzzy data in image form

Sign in to comment.


Walter Roberson
Walter Roberson on 23 Jun 2011
John d'Errico had a fuzzy color matching MATLAB File Exchange contribution. When I looked a few days ago he had withdrawn it from the File Exchange, but there is the possibility that if you write to him that he would be willing to share it with you.

ali kenari
ali kenari on 23 Aug 2011
Hi, I found your email address in mathworks and I have one question about FIS in matlab. How can I get a optimum number of rules without any knowledge about data?
  1 Comment
Walter Roberson
Walter Roberson on 18 Jun 2017
The optimal number of rules is the same as the number of unique data points -- or at least that is the case if "optimal" is defined in terms of accuracy over the training set.
Given any finite training data, and fewer rules than the number of unique points, and accuracy less than 100%, then you can always improve the accuracy by selecting (one of) the points that has the worst accuracy and making a new rule that defines that input / output combination as a special case. The accuracy for that one point becomes perfect and none of the other individual accuracies are affected, so the overall accuracy is improved. If the overall accuracy is still higher than you desire, you can repeat this procedure. The limiting case is that the accuracy will always reach 100% with no more rules than the number of unique data points.

Sign in to comment.


Arkadiy Turevskiy
Arkadiy Turevskiy on 7 Mar 2014
This new example might help: Fuzzy Logic Image Processing.

Categories

Find more on Fuzzy Logic Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!