Added some optimizations, pick a random pixel to initialize, tweaked threshold and resized image size