Research Article
Fuzzy Logic Based Hardware Accelerator with Partially Reconfigurable Defuzzification Stage for Image Edge Detection
Pseudocode 1
Pseudocode for SOM defuzzification.
| rModule_Defuzzification (uint8 LE, uint8 ME, unit8 HE, uint8 Output) | | | | If (LE > ME and LE> HE) | | Output= Calculate_Crisp (MF, LE) | | Else If (ME > LE and ME> HE) | | Output= Calculate_Crisp (MF, ME) | | Else If (HE > LE and HE> ME) | | Output= Calculate_Crisp (MF, HE) | | | | Uint8 Calculate_Crisp (MembershipFunction MF, uint8 Value) | | | | If (MF is Triangle) | | Return Triangle_Crisp(Value) | | else | | Return Trapizoid_Crisp(Value) | | |
|