Research Article

Image Matching Using Dimensionally Reduced Embedded Earth Mover’s Distance

Pseudocode 4

function Calculate_DREAT(image 1, image 2)
begin
 Initialize _vector 1
 Initialize _vector 2
 Initialize index Vector
 Initialize DREAT_Vector 1
 Initialize DREAT_Vector 2
 Initialize DREAT_EMD
 Set _vector 1 to Calculate_ (image 1)
 Set _vector 2 to Calculate_ (image 2)
For   to 7
 Select 10% indexes of randomly
 Put the selected indexes in index Vector
end for
 Select all elements of _vector 1 whose indexes are in index Vector
 Put the elements in DREAT_Vector 1
 Select all elements of _vector 2 whose indexes are in index Vector
 Put the elements in DREAT_Vector 2
 Subtract each pair of corresponding elements in DREAT_Vector 1 and DREAT_Vector 2
 Add all subtractions into DREAT_EMD and display it
end