| Algorithm 1 Heterogeneous region extraction |
| Input: Ml (the source lesion matrix with size m × n.) |
| Output: SR (the subregion mask matrix list.) |
| 0: function HeterRegionEx(Ml) |
| 0: SR ← null, L ← null, T SR ← null |
| for p in Ml do |
| 0: L.append((x, y, p))/*x and y are the location*/ |
| 0: end for |
| 1: (C1, C2, ···, Ck) ← clustering with elbow rule on data L |
| 2: T SR.append(C1, C2, ···, Ck) |
| for Ci in T SR do |
| if Ci is not a connectivity area then |
| 3: (Ci1, Ci2, ···, Cir) ← splitting r connective clusters on Ci |
| 4: T SR.append(Ci1, Ci2, ···, Cir) |
| T SR.remove(Ci) |
| end if |
| 0: if size of Ci > 10 then |
| 0: SR.append(Ci) |
| 0: end if |
| 0: end for |
| end function=0 |