Simple program to detect image similarity written in Java with Multi-Threading