最近看image retrieval相关的论文,feature extraction and description是数据采集与表示的基本步骤,其中总是看到有关feature descriptor生成的环节,诸如提取global/local feature之后,采用k-means 进行quantization,然后计算visual distance,有L1 distance, L2 distance, χ2 distance等,总是没搞明白,于是抽时间查找了下。具体如下:
http://www.ece.neu.edu/groups/rcl/projects/kmeans/distance.html
- L1 distance (Manhattan distance): The absolute value of the componentwise difference between the pixel and the class. This is the simplest distance to calculate and may be more robust to outliers.
- L2 distance (Euclidean distance): The square root of the componentwise square of the difference between the pixel and the class. Since we are only comparing the results, you can omit the square root. Computing the L2 distance requires squaring the data, which introduces extra bits of precision into the data. The squaring operation is expensive in hardware. One advantage of this metric is that the distance is a sphere around the centroid.
然后,还有个X2 statistics的距离度量法,用来评估两类数据的相关程度,
具体的算法是
根据数据的离散值及其期望进行计算,X2越大,表明数据间相关性越大。