 
package pl.gda.biomed.jwr.color;

/**
 *
 * @author jwr
 */
public class ColorSimilarityMeasure {
    
    public static double getEuclSimilarity(int []rgbR, int[]rgbDB){
        double sim=0.0;
        sim=Math.sqrt( (rgbR[0]-rgbDB[0])*(rgbR[0]-rgbDB[0]) +(rgbR[1]-rgbDB[1])*(rgbR[1]-rgbDB[1])+(rgbR[2]-rgbDB[2])*(rgbR[2]-rgbDB[2]));
        sim=Math.exp(-sim/256);
        return sim;
    }

}
