/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dataBase.search.distance;

import dataBase.subPicture.Pixel;

/**
 *
 * @author Niklas
 */
public class Distance_L2 extends AbstractDistance {

	@Override
	public float getDistance(Pixel p1, Pixel p2) {
		float dist = 0;
		dist += Math.abs(p1.r - p2.r);
		dist += Math.abs(p1.g - p2.g);
		dist += Math.abs(p1.b - p2.b);
		
		return  dist;
	}

}
