Skip to content

Commit

Permalink
more tweaking transform_affine_color_correction.md
Browse files Browse the repository at this point in the history
  • Loading branch information
HaleySchuhl authored May 20, 2024
1 parent 89fc51d commit 80706f9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/transform_affine_color_correction.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Euclidean distance between the transformed source color values and the target co

- **Parameters:**
- rgb_img - an RGB image with color chips visualized
- source_matrix - array of RGB color values (intensity in the range [0-1]) from the image to be corrected where each row is one color reference and the columns are organized as index,R,G,B; likely created with [plantcv.transform.get_color_matrix](get_color_matrix.md) or [plantcv.transform.detect_color_card](transform_detect_color_card.md)).
- source_matrix - array of RGB color values (intensity in the range [0-1]) from the image to be corrected where each row is one color reference and the columns are organized as index,R,G,B; likely created with [plantcv.transform.get_color_matrix](get_color_matrix.md).
- target_matrix - array of target RGB color values (intensity in the range [0-1]) where each row is one color reference and the columns are organized as index,R,G,B; likely created with [plantcv.transform.std_color_matrix](std_color_matrix.md).
- **Example use:**
- [Color Correction Tutorial](tutorials/transform_color_correction_tutorial.md)
Expand All @@ -34,9 +34,10 @@ from plantcv import plantcv as pcv
pcv.params.debug = 'plot'

# the source matrix needs to be computed form the RGB image, see the functions
# plantcv.transform.create_color_card_mask and plantcv.transform.get_color_matrix
# plantcv.transform.detect_color_card to make a mask and
# plantcv.transform.get_color_matrix to make a matrix from that mask

# using standard color values for the color card
# using standard color values for the target
tgt_matrix = pcv.transform.std_color_matrix(pos=2)

corrected_img = pcv.transform.affine_color_correction(rgb_img=img,
Expand Down

0 comments on commit 80706f9

Please sign in to comment.