Algorithm to detect hand draw forms