synced with hermes
basic algorithm for view testing
algorithm for image comparision changed