Node Script to calculate SAD, SSD or ZNCC between two matrices