def highlight_threshold(image, img_data, threshold, color=(255, 0, 0)):
    """
    Given an array of values for an image, highlights pixels whose value is greater than the given threshold.
    :param image: The image to highlight
    :param img_data: The values to use
    :param threshold: The threshold above which pixels should the highlighted
    :param color: The color to highlight pixels with
    :return: The image, with high-value pixels highlighted
    """
    out_pixels = list(image)
    for i in range(len(image)):
        p, e = image[i], img_data[i]
        if e > threshold:
            out_pixels[i] = color
    return out_pixels
Given an array of values for an image, highlights pixels whose value is greater than the given threshold.
    :param image: The image to highlight
    :param img_data: The values to use
    :param threshold: The threshold above which pixels should the highlighted
    :param color: The color to highlight pixels with
    :return: The image, with high-value pixels highlighted