Implemented new checksum algorithm and made contour_detector save results

Signed-off-by: Tushar Pankaj <tushar.s.pankaj@gmail.com>