Research Article
A Linear Approximate Algorithm for Earth Mover's Distance with Thresholded Ground Distance
Input: , : histogram; : threshold; : qualified bins | of original point. | Output: Distance between and | (1) ; | (2) ; | // Part 1, corresponding bin | (3) foreach do | (4) if corresponding exists then | (5) ; // : weight of bin | (6) ; | (7) ; | (8) ; | (9) if then | (10) remove from ; | (11) if then | (12) remove from ; | // Part 2, cross bin | (13) for to do | (14) foreach do | (15) if th qualified bin exists then | (16) ; | (17) ; | (18) ; | (19) , ; | (20) if then | (21) remove from ; | (22) if then | (23) remove from ; | // Part 3, compute the | (24) ; |
|