1. A method of re-identifying a first object in a first test image, the method comprising the steps of: during a training mode, a computer receiving pairs of training images, each pair having corresponding first and second training images, each first training image in the pairs being captured by a first camera during the training mode, including an object O i , and having a first lighting condition, and each second training image in the pairs being captured by a second camera during the training mode, including an object O j , and having a second lighting condition; during the training mode, the computer determining H i (B i ), which is a first normalized cumulative histogram of brightness values in the object O i , and determining H j (B j ), which is a second normalized cumulative histogram of brightness values in the object O j , so that H i (B i ) =H j (B j ), so that a percentage of brightness values less than or equal to a brightness value B i in the object O i is equal to the percentage of brightness values less than or equal to a brightness value B j in the object O j ; during the training mode, the computer determining brightness transfer functions (BTFs) H i j by determining H j −1 (H i (B i )), which is an inverted cumulative histogram, so that B j =H i j (B i )which transfers the brightness value B i in the object O i to the corresponding brightness value B j in the object O j ; during a testing mode subsequent to a completion of the training mode, the computer receiving the first test image and subsequently determining respective measures of similarity between the first test image and each of the first training images captured by the first camera by (i) estimating a foreground region and a background region of the first test image by segmenting the first test image into segments by using normalized cuts on the first test image in which the first object is centered, the foreground region being initialized using first segments that lie in a center of the first test image and the background region being initialized using second segments that do not lie in the center of the first test image and (ii) determining Bhattacharyya distances between feature representations of the estimated background region of the first test image and respective feature representations of background regions of the first training images, the first test image being captured by the first camera during the testing mode; based on the Bhattacharyya distances, the computer determining weights of the first training images captured by the first camera, the weights corresponding to the BTFs; based on the Bhattacharyya distances, the computer determining a weighted brightness transfer function (WBTF) by weighting the BTFs by the corresponding weights and combining the weighted BTFs; based on the Bhattacharyya distances and the WBTF and subsequent to the first test image being captured by the first camera, the computer transforming the first test image which results in a transformed first test image having a brightness that (1) is different from a brightness of the first test image captured by the first camera and (2) matches a brightness of the training images captured by the second camera, so that an appearance of the transformed first test image resembles an appearance of a capture of the first test image by the second camera, the transformed first test image including the first object which is in the first test image which was captured by the first camera; the computer performing comparisons between the transformed first test image and each of test images captured by the second camera; based on the comparisons between the transformed first test image and each of the test images captured by the second camera, the computer identifying one of the test images captured by the second camera that is closer in appearance to the transformed first test image than other test images captured by the second camera; and the computer designating a second object in the identified test image as a re-identification of the first object in the first test image.