//Created by: T. Hengl (hengl@pfos.hr), last update June 2004. //Input parameters: %1-%6 - membership maps; representation values are in the table "HSI_RGB"; //Purpose: Calculation of the R G B bands based on the membership values and representation values; use zero map for missing maps: zero.mpr=iff(isundef(%1),?,0); no need to calculate the sumMB if it is = 1 sumR= %1*TBLVALUE(HSI_RGB, "R", 1)+%2*TBLVALUE(HSI_RGB, "R", 2)+%3*TBLVALUE(HSI_RGB, "R", 3)+%4*TBLVALUE(HSI_RGB, "R", 4)+%5*TBLVALUE(HSI_RGB, "R", 5)+%6*TBLVALUE(HSI_RGB, "R", 6) sumG= %1*TBLVALUE(HSI_RGB, "G", 1)+%2*TBLVALUE(HSI_RGB, "G", 2)+%3*TBLVALUE(HSI_RGB, "G", 3)+%4*TBLVALUE(HSI_RGB, "G", 4)+%5*TBLVALUE(HSI_RGB, "G", 5)+%6*TBLVALUE(HSI_RGB, "G", 6) sumB= %1*TBLVALUE(HSI_RGB, "B", 1)+%2*TBLVALUE(HSI_RGB, "B", 2)+%3*TBLVALUE(HSI_RGB, "B", 3)+%4*TBLVALUE(HSI_RGB, "B", 4)+%5*TBLVALUE(HSI_RGB, "B", 5)+%6*TBLVALUE(HSI_RGB, "B", 6) sumMB = %1+%2+%3+%4+%5+%6 // Calculate separate R G B band from as the average value from the representations cont_R{domain=image}= sumR / sumMB cont_G{domain=image}= sumG / sumMB cont_B{domain=image}= sumB / sumMB calc cont_?.* // calculate final mixed colors map cont_RGB=color(cont_R, cont_G, cont_B) cont_RGB_H=clrhue(cont_RGB) cont_RGB_S=clrsat(cont_RGB) CI_S{dom=Value, vr=0.000:1.000:0.001}=1-cont_RGB_S/210 cont_map=colorhsi(cont_RGB_H, cont_RGB_S, (120+135*CI_S)) calc cont_RGB.mpr breakdep cont_RGB.mpr -force calc cont_RGB_?.mpr calc CI_S.mpr // add whiteness to visualise the uncertainty cont_map=colorhsi(cont_RGB_H, cont_RGB_S, (120+135*CI_S)) calc cont_map.mpr del sum?.mpr -force del cont_?.mpr -force del sumMB.mpr -force