| function Calculate_(image) |
| begin |
| Scale image to 64 × 64 |
| Initialize an image matrix, original_img, of 64 × 64 |
| Initialize an image matrix, imageMtrx, of (2 × 64) × (2 × 64) |
| Set imageMtrx to original_img |
| Initialize , a random number between 0 and 64 |
| Initialize , a random number between 0 and 64 |
| Shift each position in imageMtrx to position (, ) |
| Set array to pixels of imageMtrx |
| //Create _vector of image matrix including array followed by array,…, |
| followed by array (as in Figure 3) |
| Initialize _vector to null |
| _vector = |
| for to 6 |
| Set to sum of each 4-neighbour elements of multiplied by side length |
| _vector = _vector + |
| end for |
| return _vector |
| end |
| function Calculate_Embedded EMD(image 1, image 2) |
| begin |
| Initialize _vector 1 |
| Initialize _vector 2 |
| Initialize EEMD |
| Set _vector 1 to Calculate_(image 1) |
| Set _vector 2 to Calculate_(image 2) |
| Subtract each pair of corresponding elements of _vector 1 and _vector 2 |
| Add all subtractions into EEMD and display it |
| end |