seems to be working
can find closest duplicate pixel in a grey scale image names noise.bmp placed next to the script