Checking a Color Card

We have added a function to help identify problems with color chips. One frequent issue that can happen is a color chip that is fully saturated, and would be better off excluded from analysis . A quick way to examine this is by plotting the source matrix value against the target matrix value for all color chips masked in the color card.

plantcv.transform.quick_color_check(source_matrix, target_matrix, num_chips)

returns Altair chart

  • Parameters

    • source_matrix - a 22x4 matrix containing the average red value, average green value, and average blue value for each color chip of the source image
    • target_matrix - a 22x4 matrix containing the average red value, average green value, and average blue value for each color chip of the target image
    • num_chips - the number of color card chips included in the matrices (integer)
  • Context:


from plantcv import plantcv as pcv

chart = pcv.transform.quick_color_check(source_matrix=s_matrix,
                                        target_matrix=t_matrix,
                                        num_chips=24)

Perfect Color Correlation

Screenshot

Problematic

Screenshot

Source Code: Here