# A Color Distance Model Based on Visual Recognition

Authors: Jingqin Lv; Jiangxiong Fang
Journal: Mathematical Problems in Engineering
 (2018)

---

## Abstract

In computer vision, Euclidean Distance is generally used to measure the color distance between two colors. And how to deal with illumination change is still an important research topic. However, our evaluation results demonstrate that Euclidean Distance does not perform well under illumination change. Since human eyes can recognize similar or irrelevant colors under illumination change, a novel color distance model based on visual recognition is proposed. First, we find that various colors are distributed complexly in color spaces. We propose to divide the HSV space into three less complex subspaces, and study their specific distance models. Then a novel hue distance is modeled based on visual recognition, and the chromatic distance model is proposed in line with our visual color distance principles. Finally, the gray distance model and the dark distance model are studied according to the natures of their subspaces, respectively. Experimental results show that the proposed model outperforms Euclidean Distance and the related methods and achieves a good distance measure against illumination change. In addition, the proposed model obtains good performance for matching patches of pedestrian images. The proposed model can be applied to image segmentation, pedestrian reidentification, visual tracking, and patch or superpixel-based tasks.


---

## Body

## 1. Introduction

Nowadays, computer vision has achieved great progress and gives people many useful technologies, such as image segmentation, image retrieval, object tracking, and video surveillance. In many applications, illumination change happens frequently as shown in Figure1 (selected from the Berkeley segment dataset [1] and the CUHK01 Pedestrian Dataset [2]). However, illumination change is still a difficulty which is not well resolved [2–4].Figure 1
Illustration of objects under illumination variations. The mean HSV saturations and values of the patches are given.Generally, color distances are computed by Euclidean Distance in RGB or CIELAB [5–8]. In order to evaluate its performance, a simple test is carried out. First, we generate four chromatic color pairs and six gray colors as shown in Figure 2. Every chromatic color pair that has h1 = h2, s1 = 0.7, v1 = 0.4, s2 = 1, and v2 = 0.7 in HSV space are assumed to be coming from the same object under a moderate illumination change. Then the distances between each chromatic color and all the other thirteen colors are calculated by Euclidean Distances in RGB and CIELAB, respectively, that is, DRGB and DLAB. For each chromatic color the corresponding thirteen distances are sorted in ascending order. Figure 2 shows the front seven distances corresponding to the dark orange color and the yellow color, respectively. We observe that the distance between the colors of the yellow or orange pair is not the shortest one or even larger than six irrelevant color distances. Therefore, we think that Euclidean Distance cannot work well under illumination change. In addition, the results of the proposed color distance model based on visual recognition (VR) DVR are given for comparison. Obviously, DVR measures the distances between these colors effectively.Figure 2
Illustration of the front color distances. A value in blue is the distance of its corresponding color pair.A few researchers proposed different distance measure methods, aiming at their specific goals, respectively. Since the nice perceptual uniformity of LAB space remains in effect only within a radius of a few just-noticeable differences, Sharma et al. [9] devised a very sophisticated metric CIEDE2000, which provides a closer fit to perceptual judgments. Mojsilović [10] proposed a complicated distance metric for naming input colors by eye. In order to achieve shading invariance, Wesolkowski and Fieguth [11] proposed a vector angle based distance measure in RGB, which decreases the weights of shaded colors. However, the distance between two pixels becomes smaller when either one is shaded. Vertan et al. [12] studied a parallel coordinate distance in RGB for edge detection, in which the differences of the three channels are used. Lee and Plataniotis [13] combined a hue direction comparison term with a chroma comparison term in LAB for computing image difference. Their comparison terms are computed by using the product and the quadratic sum of two hue or chroma values.For these patch or superpixel-based methods [14, 15], the color distance between two patches can be measured by using their histogram distance. Given a pixel corresponding to a bin, if the illumination changes, usually it will vote for another bin. Therefore color distance is strongly influenced by the illumination. To obtain illumination invariance, many color descriptors are proposed, such as the opponent histograms [16], the color moment invariants [16], and the shape context based-color signatures [17]. The color name method [18], which assigns a color to a language term, also displays a certain amount of photometric invariance. However, these descriptors and color names are utilized for feature description or image recognition and are not suitable to measure color distance. On the other hand, the state-of-the-art LOMO feature [15] applies the multiscale Retinex algorithm to preprocess pedestrian images before extracting color histograms. The Retinex algorithm processing both the color constancy and dynamic range compression automatically is useful to handle illumination variations to some extent.Since human eyes can simply recognize similar or irrelevant colors under illumination change, a novel color distance model based on visual recognition is proposed. First, we find that various colors are distributed complexly in color spaces. Thus, a single model cannot achieve a good color distance. Therefore, we propose to divide the HSV space into three less complex subspaces. Three specific distance models need to be studied. In addition, the principles of our visual color distance are introduced, while the related works [11–13] are proposed without explicit principles. Then a novel hue distance is modeled and trained based on visual recognition. And the chromatic distance model is proposed in line with the introduced principles. Finally, the gray distance model and the dark distance model are studied according to the natures of their subspaces, respectively. Experimental results show that the proposed model outperforms Euclidean Distance and the related methods and achieves a good distance measure against illumination change. In addition, our DVR obtains good performance for matching patches of pedestrian images under illumination variations.


## 2. The Proposed Method

If every color belongs to the same category, it would be an easy task to measure the similarities or distances between colors. However, colors are visually perceived as various categories. The primary color categories include white, gray, black, red, orange, yellow, green, cyan, blue, and purple. Furthermore, in the color space most colors are distributed between two or more primary colors, such as yellowish green, dark red, light cyan, and gray-blue. On the other hand, colors are represented with only three values. Therefore we consider that various colors are distributed complexly in a three-dimensional color space. Thus, it should be difficult to recognize arbitrary two colors as similar or irrelevant by linear distance models and three color channels. Consequently, Euclidean Distances in RGB or CIELAB cannot measure color distance correctly as shown in Figure2.As everyone knows, human eyes can recognize similar colors and discriminate various colors under illumination change. This kind of ability can be helpful to many computer vision technologies, such as object segmentation, visual tracking, and pedestrian reidentification. We propose to study a color distance model based on visual recognition. Thus we begin with a definition of nonmetric visual color distance. The visual distanceD(c1,c2) between two colors c1 and c2 should satisfy the following principles as well as possible:(1) Ifc1 and c2 look more similar than c1 and c3, D(c1,c2) should be less than D(c1,c3).(2) Ifc1 and c2 look completely different, D(c1,c2) should be equal to the maximum Dmax or larger than Dmax.(3) Ifc1 and c2 belonging to the same object are under a moderate or strong illumination change, D(c1,c2) should be less than Dmax.In HSV space, the hueh describes various chromatic colors. The value v=max⁡(r,g,b) defines the intensity of a color. And the saturation s=1-min⁡(r,g,b)/v defines the chromatic degree of a color. Since the HSV space is intuitive to humans and available for color description, arbitrary two colors can be recognized as similar or irrelevant by using hue, saturation, and value. We prefer to study our human visual recognition based-color distance model in the HSV space. The primary color categories can be grouped into chromatic ones and achromatic ones. If the illumination is heavily decreased, many chromatic colors may appear black to some extent. For an undertint color with low s, it may resemble a gray or a white color.To reduce the complexity and achieve a desirable distance model, the HSV space is simply divided into three overlapped subspaces according to the above analyses as shown in Figure3. For each subspace, a specific color distance model needs to be studied. The chromatic subspace is composed of general colors, undertint colors, and dusky colors. If the hue values of some colors in this subspace are close enough, they will look similar, or may belong to the same object. For this subspace, the key ability of its model is to discriminate various hues.Figure 3
Illustration of the specific subspaces.On the other two sides, the gray subspace and the dark subspace focus on near-gray colors and near-dark colors, respectively. Each subspace includes a focused region and an adjacent region which overlaps the chromatic subspace. Apparently, colors in an adjacent region may look similar to colors in the corresponding focused region. The distance model of each subspace is expected to be able to compute the distance between colors from its focused region and the adjacent one, respectively.


## 3. The Chromatic Distance Model

In the chromatic subspace, every color is visually recognized with its hue, saturation, and value. Given two colorsc1 and c2, the differences of their features, that is, Δh, Δs, and Δv, are natural distance measures. However, Euclidean Distance, which combines these differences, does not perform well for the above test (see Figure 2). Obviously, saturation and value are simple features for discriminating against white, gray, or dark colors and colors with different saturations. Hue is the key feature for recognizing various chromatic colors. We notice that the maximum of Δh=min⁡h1-h2,1-h1-h2 is 0.5, while there are seven primary hues and many mixed hues. Consequently, Δh cannot effectively tell us that two hues are similar or different.As human can recognize various hues, we propose to train a novel hue distancedVR(Δh) based on visual recognition, which is a regression task. First, Dmax is set to 1, because we consider that two colors with Δs=1 or Δv=1 should be recognized as completely different. About seven hundred hue pairs with Δh<0.15 are generated by randomly sampling in the whole hue range. Since it is a difficult job to give a distance value to a hue pair, a rough distance value di (i.e., 0.2, 0.4, 0.6, 0.8, 1.1, or 1.4) is obtained by eye for each hue pair as shown in Figure 4. These default distance values correspond to similar hue pairs (di < 1, yi = 1) or irrelevant hue pairs (di > 1, yi = −1).Figure 4
Illustration of some training hue pairs(Δhi,di).To achieve good hue recognition performance, a logistic function, which is utilized to model the activation of a neuron in neural network, is adopted to model the visual perception of hue distance(1)dVRΔh=a1+exp⁡-w1Δh+w0⁡+b.The parameter a is set to an appropriate constant due to Dmax = 1. Thus b can be determined by enforcing dVR(0) = 0. In the whole hue range, the primary hues are not distributed linearly with respect to human perception. Thus, a hinge loss function is utilized to learn the parameters w0 and w1 by gradient descent.(2)L=∑imax⁡yidVRΔhi-di,02.Then the color distance can be calculated as(3)Dc1,c2=dVRΔh2+Δs2+Δv2.However, D(c1,c2) does not keep in line with the third principle, because usually Δv becomes large when the illumination change is heavy, and Δs is also increased to some extent. In fact, irrelevant colors can be discriminated by the most discrepant dVR(Δh) or Δs. The color distance is improved as follows:(4)DVRcc1,c2=max⁡dVRΔh,Δs2+Dc1,c222.Consequently, DVRcc1,c2 can give us an effective color distance under illumination change in the chromatic subspace.


## 4. The Gray Distance Model and the Dark Distance Model

In the other two subspaces, achromatic categories, that is, white, gray, or black, are added. Their complexities are much larger than the pure chromatic subspace’s. Therefore, it is more difficult to measure color distances in these two subspaces. For example, the distances between the dark orange and some grays are lower than the orange pair’s distance in Figure2.Obviously, a gray or a white only look similar to colors withs<ms, where ms is a low saturation. Then the gray color distance DVRgc1,c2 is introduced by combining DVRcc1,c2 with Δs for all the colors in the gray subspace.(5)DVRgc1,c2=wgΔs2ms2+Δv22+1-wgDVRcc1,c22.The key of this distance model is how to compute an appropriate gray weight wg. For a chromatic color, its saturation may vary under illumination change, and DVRcc1,c2 is effective. While the saturation of a gray-like color is limited within a very small and low range. Therefore, wg is calculated with the lower saturation of two colors.(6)wg=max⁡1-min⁡s1,s2rs,0,where rs is the parameter to define the range of the gray-like colors.For a black, the chromatic and saturation information is lost, and itsh and s will be influenced by the noises. Thus Δh and Δs should be neglected when measuring the distance between a black color and other colors. In the dark subspace, the color distance is modeled as(7)DVRdc1,c2=wdΔv2mv2+1-wdDVRgc1,c22,where mv is set to v of an appropriate dark color. Like the above wg, the dark weight wd is defined in the same manner(8)wd=max⁡1-min⁡v1,v2rv,0,where rv is the parameter to define the range of the dark colors.


## 5. Experimental Results

The related methods [11–13] are evaluated for their specific goals instead of color distance measure, such as image segmentation, edge detection, or computing image difference. Obviously, it is difficult and impossible to give appropriate distance values for most color pairs. Hence, we carry out two experiments by comparing the distances of the related color pairs with the distances between various irrelevant colors. In addition, we test our model by matching patches of pedestrian images. In our model, the parameter a can be in the range [1.7,2.5], as Dmax = 1 and dVR(Δh) should not be much larger than Dmax for DVRg or DVRd. Evidently, the other four parameters, that is, ms, rs, mv, and rv, should be in the range [0.1,0.25]. In the following experiments, a, ms, rs, mv, and rv are simply set to 2, 0.15, 0.2, 0.15, and 0.15, respectively.


### 5.1. Tests for the Chromatic Distance Model

To evaluate the performance of the chromatic distance model, enough testing colors covering fundamental illumination variations are needed. Usually, the value differenceΔv of an object under illumination change may be significant, while the hue difference Δh is small and limited. In Figure 1, Δh of the five patch pairs are .02, .02, .03, .01, and .01, respectively. Since the illumination change cases of these patch pairs are usual for many computer vision tasks, ten tests of color query are conducted with the (s,v) couples of these patch pairs, respectively.For a test, twelve query colors are generated by using (si,vi) of a patch i and twelve hues sampled uniformly in [0,1] at intervals of 1/12. In addition, for each query color, three related colors are generated by using three hue differences (i.e., Δh=-.02, 0, and .02) and (sj,vj) of the related patch j which belongs to the same object as the patch i. As a result, a query color and its three related colors can be regarded as coming from the same object under illumination variations, while the other 44 colors are different and irrelevant to the query color.The proposed modelDVR, Euclidean Distances in three color spaces (i.e., DRGB, DLAB, and DHSV), and the distance measures [11–13] are evaluated by comparing the distances between each query color and all the other 47 colors of a test. The three related color distances between a query color and its related colors should be shorter than all the 44 irrelevant color distances between the query color and the irrelevant colors. Thus a query error is defined as the number of the irrelevant color distances shorter than a related color distance. Finally, the average query error of all the related colors is employed to evaluate the performance of a test.The average query errors of these ten tests are given in Table1. Most distance measures except the measure [11] and DVR perform badly to different extents. The main reason could be that these distance measures cannot deal with the complexity of their color spaces. The measure [11] based on vector angle in RGB achieves only a few zero query errors. Because a vector angle is dependent on both its saturation and hue, the measure [11] obtains good results when the saturation of the query color is high enough and Δs is low enough. Obviously, our DVR achieves zero query errors under different illumination variations. In DVR, the distances of hue, saturation, and value are all considered properly. And the distance of hue is studied in line with the principles. Therefore the proposed DVR implements a good distance measure under various color variations.Table 1
The testing results corresponding to Figure1.
Methods Car Hat Face Bag Coat D L A B 0.95 1.2 3.1 9.9 12.8 5.3 3.2 10.0 4.85 17.8 D R G B 8.0 8.5 4.5 16.3 20.8 17.4 4.5 16.2 5.5 20.1 D H S V 10.0 10.0 11.0 11.0 10.0 10.0 8.0 8.0 11.0 11.0 PSICDM [11] 2.25 1.6 0 0 7.05 2.1 0.2 2.7 0.8 5.9 PCCD [12] 27.1 18.9 6.7 10.6 29.6 29.8 12.2 22.1 6.2 16.8 NPCDM [13] 0.55 0.55 10.5 11.2 8.0 7.75 11.0 11.5 15.0 15.2 D V R 0 0 0 0 0 0 0 0 0 0


### 5.2. Tests for the Gray Distance Model

Five color query tests are carried out with the five color pairs shown in Figure5, which are gray or undertint color pairs. Thirty hues, ten saturations, and fifteen values are uniformly sampled in the ranges [0,1], [0.2,0.38], and [0.2,0.9] at intervals of 0.033, 0.02, and 0.05, respectively. Then totally 4500 chromatic colors generated with these sampled data are assumed to be dissimilar to all the ten testing colors (si,vi) in Figure 5.Figure 5
Illustration of undertint objects under illumination variations.In each color pair, the color with the smaller saturation is used as a query color. Its distances from its related color and the 4500 chromatic colors are calculated by the proposed modelDVR, the above Euclidean Distances, and the distance measures [11–13], respectively. Then the number of the chromatic color distances smaller than the related color distance is employed as a query error and recorded in Table 2. Since most of the chromatic colors are really irrelevant to each query color, a very small number relative to 4500 can indicate the correctness of a distance measure. In Table 2, the results show that it is difficult for the Euclidean Distances to measure the color distance correctly in the gray subspace.Table 2
The testing results corresponding to Figure5.
Methods Wall Gray Pink Leg Gray Leg D L A B 706 3390 915 873 2372 D R G B 2143 3938 1903 1911 2906 D H S V 637 2401 818 1040 1937 PSICDM [11] 5 0 37 79 0 PCCD [12] 2229 3978 1965 2013 2931 NPCDM [13] 7 176 195 10 3 D V R 0 0 41 65 0Δ h of the five pairs are .01, .18, .28, .11, and .24, respectively. As for the “Pink” and “Leg” pairs, their Δh are large, and their chromatic information, that is, min⁡s1,s2, is relatively nontrivial. Thus, our results of the two pairs are reasonably correct. Though there are four pairs with large Δh, the measure [11] and DVR achieve good performance. Therefore, we consider that our DVR can be applied to measure distance under illumination variations in the gray subspace.


### 5.3. Matching Patches for Pedestrian Reidentification

As shown in Figure6, 128 pairs of 9 × 9 patches uniform in color are cropped from 128 pairs of pedestrian images from the CUHK01 Dataset [2]. Many pairs are under strong illumination change, while more pairs are under moderate illumination variations. We give a hue label to each pair. The labels include pink, red, orange, yellow, green, cyan, and blue.Figure 6
Two patch pairs and their matching results.For every query patchi, it is matched with all the other 255 patches by calculating their color distances by many color histogram distances and our DVR, respectively. These distances are sorted in ascending order. Then a threshold is used to exclude patches dissimilar to patch i and reserve patches with the same label of patch i. In each patch list in Figure 6, a query patch highlighted by a dark yellow hoop is shown at the left. All the reserved patches are listed after the query patch. The related patch of a query patch is highlighted by a yellow hoop. A patch with a hue label different to the query patch’s is viewed as a wrong match highlighted by a red hoop. The recall is defined as the rate that the related patch of every query patch i is reserved. The error rate is computed from all the matching lists.OurDVR, LOMO [15], and other color histograms used by recent pedestrian reidentification works [19, 20] are evaluated. LOMO is one of the state-of-the-art features and adopted by many current works [21, 22]. Although it extracts color histograms and texture features and does a postprocess to address viewpoint changes of pedestrians, only a HSV8×8×8 histogram is extracted as the color feature for a single patch. In our experiments, we found that for every color histogram the Retinex preprocess of LOMO [15] improves its matching performance. Thus, the results of the histograms named with a (R) or (LOMO), for which the Retinex preprocess is applied, are given in Table 3. In other words, only HSV8×8×8 and our DVR are tested without the Retinex preprocess.Table 3
The results of the matching tests.
Method Threshold Recall Error L A B 8 × 3 ( R ) 1.30 78 61% 52% L A B 8 × 8 × 8 ( R ) 1.99 84 66% 34% R G B 8 × 3 ( R ) 1.30 62 48% 54% R G B 8 × 8 × 8 ( R ) 1.99 74 58% 33% H S V 8 × 3 ( R ) 1.20 101 79% 53% H S V 8 × 8 × 8 1.99 30 23% 39% HSV (LOMO) 1.80 44 34% 39% HSV (LOMO) 1.99 76 59% 43% D V R 0.50 124 97% 23% D V R 0.70 128 100% 33%For a histogram, the input data is discretized into one of 8 or 512 bins. If the illumination changes, colors usually turn to other bins. Thus, the related HSV (LOMO) distance of a patch pair may be very large or even equal to the maximum value 2 as shown in Figure7. On the other hand, colors with different primary hues may vote to the same bin, which will lead to matching mistakes. For example, in Figure 6, the two HSV (LOMO) lists include two red patches and three cyan ones, respectively. Although the illumination variations are handled by the Retinex preprocess, the best recall of these histograms is 66% at the error rate of 34%. Therefore, color histograms are not good at measuring color distance and sensitive to illumination change.Figure 7
The distributions of the related color distances of the 128 patch pairs.Obviously, ourDVR achieves desirable performance on this test. In Figure 7, the related DVR distances, which are all lower than 0.7, indicate that the distances of the three channels are effectively combined, and DVR keeps in line with the third principle. Since the hue labels given to the testing patch pairs are discretized outputs, a few matching mistakes will be inevitable. Consequently, we consider that DVR can be an effective color distance measure for pedestrian reidentification.


## 5.1. Tests for the Chromatic Distance Model

To evaluate the performance of the chromatic distance model, enough testing colors covering fundamental illumination variations are needed. Usually, the value differenceΔv of an object under illumination change may be significant, while the hue difference Δh is small and limited. In Figure 1, Δh of the five patch pairs are .02, .02, .03, .01, and .01, respectively. Since the illumination change cases of these patch pairs are usual for many computer vision tasks, ten tests of color query are conducted with the (s,v) couples of these patch pairs, respectively.For a test, twelve query colors are generated by using (si,vi) of a patch i and twelve hues sampled uniformly in [0,1] at intervals of 1/12. In addition, for each query color, three related colors are generated by using three hue differences (i.e., Δh=-.02, 0, and .02) and (sj,vj) of the related patch j which belongs to the same object as the patch i. As a result, a query color and its three related colors can be regarded as coming from the same object under illumination variations, while the other 44 colors are different and irrelevant to the query color.The proposed modelDVR, Euclidean Distances in three color spaces (i.e., DRGB, DLAB, and DHSV), and the distance measures [11–13] are evaluated by comparing the distances between each query color and all the other 47 colors of a test. The three related color distances between a query color and its related colors should be shorter than all the 44 irrelevant color distances between the query color and the irrelevant colors. Thus a query error is defined as the number of the irrelevant color distances shorter than a related color distance. Finally, the average query error of all the related colors is employed to evaluate the performance of a test.The average query errors of these ten tests are given in Table1. Most distance measures except the measure [11] and DVR perform badly to different extents. The main reason could be that these distance measures cannot deal with the complexity of their color spaces. The measure [11] based on vector angle in RGB achieves only a few zero query errors. Because a vector angle is dependent on both its saturation and hue, the measure [11] obtains good results when the saturation of the query color is high enough and Δs is low enough. Obviously, our DVR achieves zero query errors under different illumination variations. In DVR, the distances of hue, saturation, and value are all considered properly. And the distance of hue is studied in line with the principles. Therefore the proposed DVR implements a good distance measure under various color variations.Table 1
The testing results corresponding to Figure1.
Methods Car Hat Face Bag Coat D L A B 0.95 1.2 3.1 9.9 12.8 5.3 3.2 10.0 4.85 17.8 D R G B 8.0 8.5 4.5 16.3 20.8 17.4 4.5 16.2 5.5 20.1 D H S V 10.0 10.0 11.0 11.0 10.0 10.0 8.0 8.0 11.0 11.0 PSICDM [11] 2.25 1.6 0 0 7.05 2.1 0.2 2.7 0.8 5.9 PCCD [12] 27.1 18.9 6.7 10.6 29.6 29.8 12.2 22.1 6.2 16.8 NPCDM [13] 0.55 0.55 10.5 11.2 8.0 7.75 11.0 11.5 15.0 15.2 D V R 0 0 0 0 0 0 0 0 0 0


## 5.2. Tests for the Gray Distance Model

Five color query tests are carried out with the five color pairs shown in Figure5, which are gray or undertint color pairs. Thirty hues, ten saturations, and fifteen values are uniformly sampled in the ranges [0,1], [0.2,0.38], and [0.2,0.9] at intervals of 0.033, 0.02, and 0.05, respectively. Then totally 4500 chromatic colors generated with these sampled data are assumed to be dissimilar to all the ten testing colors (si,vi) in Figure 5.Figure 5
Illustration of undertint objects under illumination variations.In each color pair, the color with the smaller saturation is used as a query color. Its distances from its related color and the 4500 chromatic colors are calculated by the proposed modelDVR, the above Euclidean Distances, and the distance measures [11–13], respectively. Then the number of the chromatic color distances smaller than the related color distance is employed as a query error and recorded in Table 2. Since most of the chromatic colors are really irrelevant to each query color, a very small number relative to 4500 can indicate the correctness of a distance measure. In Table 2, the results show that it is difficult for the Euclidean Distances to measure the color distance correctly in the gray subspace.Table 2
The testing results corresponding to Figure5.
Methods Wall Gray Pink Leg Gray Leg D L A B 706 3390 915 873 2372 D R G B 2143 3938 1903 1911 2906 D H S V 637 2401 818 1040 1937 PSICDM [11] 5 0 37 79 0 PCCD [12] 2229 3978 1965 2013 2931 NPCDM [13] 7 176 195 10 3 D V R 0 0 41 65 0Δ h of the five pairs are .01, .18, .28, .11, and .24, respectively. As for the “Pink” and “Leg” pairs, their Δh are large, and their chromatic information, that is, min⁡s1,s2, is relatively nontrivial. Thus, our results of the two pairs are reasonably correct. Though there are four pairs with large Δh, the measure [11] and DVR achieve good performance. Therefore, we consider that our DVR can be applied to measure distance under illumination variations in the gray subspace.


## 5.3. Matching Patches for Pedestrian Reidentification

As shown in Figure6, 128 pairs of 9 × 9 patches uniform in color are cropped from 128 pairs of pedestrian images from the CUHK01 Dataset [2]. Many pairs are under strong illumination change, while more pairs are under moderate illumination variations. We give a hue label to each pair. The labels include pink, red, orange, yellow, green, cyan, and blue.Figure 6
Two patch pairs and their matching results.For every query patchi, it is matched with all the other 255 patches by calculating their color distances by many color histogram distances and our DVR, respectively. These distances are sorted in ascending order. Then a threshold is used to exclude patches dissimilar to patch i and reserve patches with the same label of patch i. In each patch list in Figure 6, a query patch highlighted by a dark yellow hoop is shown at the left. All the reserved patches are listed after the query patch. The related patch of a query patch is highlighted by a yellow hoop. A patch with a hue label different to the query patch’s is viewed as a wrong match highlighted by a red hoop. The recall is defined as the rate that the related patch of every query patch i is reserved. The error rate is computed from all the matching lists.OurDVR, LOMO [15], and other color histograms used by recent pedestrian reidentification works [19, 20] are evaluated. LOMO is one of the state-of-the-art features and adopted by many current works [21, 22]. Although it extracts color histograms and texture features and does a postprocess to address viewpoint changes of pedestrians, only a HSV8×8×8 histogram is extracted as the color feature for a single patch. In our experiments, we found that for every color histogram the Retinex preprocess of LOMO [15] improves its matching performance. Thus, the results of the histograms named with a (R) or (LOMO), for which the Retinex preprocess is applied, are given in Table 3. In other words, only HSV8×8×8 and our DVR are tested without the Retinex preprocess.Table 3
The results of the matching tests.
Method Threshold Recall Error L A B 8 × 3 ( R ) 1.30 78 61% 52% L A B 8 × 8 × 8 ( R ) 1.99 84 66% 34% R G B 8 × 3 ( R ) 1.30 62 48% 54% R G B 8 × 8 × 8 ( R ) 1.99 74 58% 33% H S V 8 × 3 ( R ) 1.20 101 79% 53% H S V 8 × 8 × 8 1.99 30 23% 39% HSV (LOMO) 1.80 44 34% 39% HSV (LOMO) 1.99 76 59% 43% D V R 0.50 124 97% 23% D V R 0.70 128 100% 33%For a histogram, the input data is discretized into one of 8 or 512 bins. If the illumination changes, colors usually turn to other bins. Thus, the related HSV (LOMO) distance of a patch pair may be very large or even equal to the maximum value 2 as shown in Figure7. On the other hand, colors with different primary hues may vote to the same bin, which will lead to matching mistakes. For example, in Figure 6, the two HSV (LOMO) lists include two red patches and three cyan ones, respectively. Although the illumination variations are handled by the Retinex preprocess, the best recall of these histograms is 66% at the error rate of 34%. Therefore, color histograms are not good at measuring color distance and sensitive to illumination change.Figure 7
The distributions of the related color distances of the 128 patch pairs.Obviously, ourDVR achieves desirable performance on this test. In Figure 7, the related DVR distances, which are all lower than 0.7, indicate that the distances of the three channels are effectively combined, and DVR keeps in line with the third principle. Since the hue labels given to the testing patch pairs are discretized outputs, a few matching mistakes will be inevitable. Consequently, we consider that DVR can be an effective color distance measure for pedestrian reidentification.


## 6. Conclusion

In this paper, a color distance model based on visual recognition is proposed. To reduce its complexity, the HSV space is divided into three subspaces. Then a novel hue distance is modeled based on visual recognition, and the chromatic distance model is studied in line with the principles. Finally, the gray distance model and the dark distance model are proposed according to their natures, respectively. Experimental results show that the proposed model outperforms Euclidean Distance and the related methods and achieves a good distance measure against illumination change. Therefore, the proposed model can be applied to image segmentation, color based detection, and image retrieval. In addition, ourDVR obtains good performance for matching patches of pedestrian images. As many patches or superpixels consist of two or three kinds of colors, an effective color clustering method is needed to be studied for future work, so that the proposed model can be applied to pedestrian reidentification, visual tracking, and other patch or superpixel-based tasks.



---

*Source: 4652526-2018-05-20.xml*