Added function to compute the confusion matrix for a ground truth and predicted image pair