Incorporate compareImageColors into jointEntropy function