working histogram comparism using Bhattacharyya distance