changes to output filtering for CompareContours