home Forums Media: Applications, Publications, Videos, Links and Examples Fuzzy Inference Systems in image processing

This topic contains 5 replies, has 4 voices, and was last updated by  MSub93 1 year, 8 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
• Author
Posts
• #1040

bodnaar
Participant

I’ve only found this page about a week ago, so I don’t have public projects using fuzzylite yet, however, I’d like to encourage every reader to use fuzzy logic in their area of interest, if possible.

I’m currently a PhD student and my area of interest is image processing, feature extraction, pattern and object recognition and classification. I just made some experiments using a Fuzzy Inference System (FIS) for a feature extraction task, and preliminary results are very promising. I wouldn’t like to go into details as long as a publication of the task is not assembled and reviewed in a conference, however, I’d like to tell FIS seems to be efficient so far. There are many humanly observeable features of object or textures in the image domain that can be expressed using fuzzy membership functions, and rule-based decisions are perfectly suitable for classification of images or image parts.

Juan: I’d also like to ask a question, since I’ve read in your CV that you are an expert of AI. Have you ever used/thought about using neuro-fuzzy implementations, or any hybrid solutions where a FIS is not only designed by human knowledge base, but they are reinforced by machine learning? The strength of rules and the parameters of membership functions can be optimized, maybe even the number and shape of memberships and the rules themselves. So my question is, have you ever worked with hybrid solutions like that? If so, please let me know by giving literature or anything about how ML and FIS can be efficiently bound together. Thank you in advance.

#1042

Keymaster

Hi bodnaar,

I remember I did some experiments with hybrids between fuzzy controllers and evolutionary algorithms. I used Particle Swarm Optimization to evolve the set of rules of a fuzzy logic controller for classification of datasets. I do not have any literature to refer you to, but I remember I used both Michigan and Pittsburgh approaches to evolve and optimize the fuzzy rules of the controller.

#1800

MSub93
Participant

Good day Juan,

I would like to appreciate your efforts in coming up with fuzzylite. It is in indeed a very powerful tool that has is its scope in establishing an ease of implementation of fuzzy logic on image processing. I have been trying to utilize it to implement fuzzy edge detection algorithms. However, I have rather faced one issue and that is the use of engine->process() instruction inside a loop parsing the image coordinates and taking the pixel values at (j,i) as the input to two fuzzy variables. The loop does work but even for a small region of interest, it takes considerably long time.

Here is the code block I am using:

for(int i = 50; i ++; 300;i++)
{
for(int j = 50; j ++; 300;j++)
{
engine->setInputValue(“Ix”,Ix_result.at<uchar>(j,i));
engine->setInputValue(“Iy”,Iy_result.at<uchar>(j,i));
engine->process();

fuzzy_result.at<uchar>;(j,i) = (uchar)Io->getOutputValue();
}

}

It takes long to finish. Is there any mistake in the way I am looping the engine process or is there any other problem at hand? to Any alternatives to it..? Regards.

PS: I am using openCVv2.0 and I am using only two rules to run my FIS. Thanks.

#1801

Keymaster

Hi,

Could you please export your engine in FLL and post it? One way to improve processing time is by reducing the resolution of the IntegralDefuzzifier, the default is 300 (I think), but this could be further reduced (sacrificing accuracy). If you are using a WeightedDefuzzifier, you should set its type to TakagiSugeno to improve performance.

Oh, you should definitely change the way you are setting the input values. You should get the variables outside the loops and set their values inside:

InputVariable* lx = engine->getInputVariable("lx");
InputVariable* ly = engine->getInputVariable("ly");
for ...:
for ...:
scalar value = lx_result.at(j,i);
lx->setInputValue(value);
ly->setInputValue(value);
engine->process();


Also, what data structure is fuzzy_result? you should avoid linked-list-based data structures, but rather use random-access-list structures like std::vector.

Cheers,

Juan

#1847

syara
Participant

Hye, have a good day.

currently i am building a system based on fuzzy logic in matlab with GUI. but i am facing a problem on creating the fis in M file format. would you like show me some examples or show me what is wrong on my fis in m file format. i do really hope you can help me. thanks.

%create new FIS
a = newfis(‘5152′);

a= addvar(a, ‘input’, ‘Penyeliaan’, [0 45]);

a= rmmf(a,’input’,1,’mf’,1);
a= rmmf(a,’input’,1,’mf’,1);
a= rmmf(a,’input’,1,’mf’,1);

a= addvar(a, ‘input’, ‘Penerbitan’, [0 10]);

a= rmmf(a,’input’,2,’mf’,1);
a= rmmf(a,’input’,2,’mf’,1);
a= rmmf(a,’input’,2,’mf’,1);

a= rmmf(a,’input’,3,’mf’,1);
a= rmmf(a,’input’,3,’mf’,1);

a= addvar(a, ‘input’, ‘KhidmatMasyarakat’, [0 3]);

a= rmmf(a,’input’,4,’mf’,1);
a= rmmf(a,’input’,4,’mf’,1);
a= rmmf(a,’input’,4,’mf’,1);

a= addvar(a, ‘input’, ‘Penyelidikan’, [0 15]);

a= rmmf(a,’input’,5,’mf’,1);
a= rmmf(a,’input’,5,’mf’,1);
a= rmmf(a,’input’,5,’mf’,1);
a= rmmf(a,’input’,5,’mf’,1);
a= rmmf(a,’input’,5,’mf’,1);

a= addvar(a, ‘input’, ‘Pengajaran’, [0 20]);

a= rmmf(a,’input’,6,’mf’,1);
a= rmmf(a,’input’,6,’mf’,1);
a= rmmf(a,’input’,6,’mf’,1);
a= rmmf(a,’input’,6,’mf’,1);
a= rmmf(a,’input’,6,’mf’,1);

a= rmmf(a,’input’,7,’mf’,1);
a= rmmf(a,’input’,7,’mf’,1);

a= addvar(a, ‘input’, ‘KhidmatUniversiti’, [0 3]);

a= rmmf(a,’input’,8,’mf’,1);
a= rmmf(a,’input’,8,’mf’,1);
a= rmmf(a,’input’,8,’mf’,1);

a=rmmf(a,’output’,1,’mf’,1);
a=rmmf(a,’output’,1,’mf’,1);
a=rmmf(a,’output’,1,’mf’,1);

%construct rules
ruleList = [1 1 1 1 1 1 1 1 ; 1 1 1 1 2 2 1 1 ; 2 2 2 2 3 3 2 2 ; 3 3 2 3 4 4 2 3 ; 3 3 2 3 5 5 2 3 ] ;

%show fis structure
showfis(a);
plotfis(a);

%visualize membership function
figure,plotmf(a,’input’,1);
figure,plotmf(a,’output’,1);

%visualize surface relationship
gensurf(a);

#1848

MSub93
Participant

I apologize for the very late reply Juan, I got the code running faster by reducing the IntegralDefuzzifier as you told but to maintain a certain level of accuracy , the resolution I have set still takes about 10 to 15 secs. I believe I am not using the library api’s well. I’ll send you my code on your email jcrada@fuzzylite.com. Please let me know of the code blocks that have to be improved.