Skip to content

Commit 5bd2e14

Browse files
authored
Merge pull request #1415 from danforthcenter/updated_color_correction_tutorial
Updated color correction tutorial
2 parents 7c7b4ec + c476da5 commit 5bd2e14

6 files changed

+31
-22
lines changed

docs/analyze_grayscale.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ the values out to the [Outputs class](outputs.md). Can also return/plot/print ou
1818
- **Example use:**
1919
* [Grayscale Image Tutorial](tutorials/grayscale_tutorial.md)
2020

21-
- **Output data stored:** Data ('gray_frequencies', 'gray_mean', 'gray_median', 'nir_stdev') automatically gets stored to
21+
- **Output data stored:** Data ('gray_frequencies', 'gray_mean', 'gray_median', 'gray_stdev') automatically gets stored to
2222
the [`Outputs` class](outputs.md) when this function is ran. These data can always get accessed during a workflow (example
2323
below). For more detail about data output see [Summary of Output Observations](output_measurements.md#summary-of-output-observations)
2424

docs/get_color_matrix.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Computes the average *R*, *G*, *B* values for each region in the RGB image denot
88

99
- **Parameters**
1010
- rgb_img - RGB image with color chips visualized
11-
- mask - a gray-scale img with unique values for each segmented space, representing unique, discrete color chips.
11+
- mask - a gray-scale img with unique values for each segmented space, representing unique, discrete color chips. Likely created with [`pcv.transform.detect_color_card`](transform_detect_color_card.md).
1212

1313
- **Returns**
1414
- color_matrix - a *n* x 4 matrix containing the average red value, average green value, and average blue value for each color chip.

docs/output_measurements.md

+22-19
Original file line numberDiff line numberDiff line change
@@ -147,32 +147,35 @@ suggestions for additional metadata we should track that would be useful to you,
147147

148148
Functions that automatically store data to the [`Outputs` class](outputs.md) are
149149
[analyze.bound_horizontal](analyze_bound_horizontal2.md),
150-
[analyze.bound_vertical](analyze_bound_vertical2.md),
151-
[analyze.color](analyze_color2.md),
152-
[analyze.grayscale](analyze_grayscale.md),
153-
[analyze.size](analyze_size.md),
154-
[analyze.spectral_index](analyze_spectral_index.md),
155-
[analyze.spectral_reflectance](analyze_spectral_reflectance.md),
156-
[analyze.thermal](analyze_thermal.md),
150+
[analyze.bound_vertical](analyze_bound_vertical2.md),
151+
[analyze.color](analyze_color2.md),
152+
[analyze.grayscale](analyze_grayscale.md),
153+
[analyze.size](analyze_size.md),
154+
[analyze.spectral_index](analyze_spectral_index.md),
155+
[analyze.spectral_reflectance](analyze_spectral_reflectance.md),
156+
[analyze.thermal](analyze_thermal.md),
157157
[analyze.yii](analyze_yii.md),
158-
[analyze.npq](analyze_npq.md),
159-
[homology.landmark_reference_pt_dist](homology_landmark_reference_pt_dist.md),
158+
[analyze.npq](analyze_npq.md),
159+
[homology.acute](homology_landmark_reference_pt_dist.md),
160+
[homology.landmark_reference_pt_dist](homology_landmark_reference_pt_dist.md),
160161
[homology.x_axis_pseudolandmarks](homology_x_axis_pseudolandmarks.md),
161-
[homology.y_axis_pseudolandmarks](homology_y_axis_pseudolandmarks.md),
162-
[morphology.check_cycles](check_cycles.md),
162+
[homology.y_axis_pseudolandmarks](homology_y_axis_pseudolandmarks.md),
163+
[morphology.analyze_stem](analyze_stem.md),
164+
[morphology.check_cycles](check_cycles.md),
163165
[morphology.fill_segments](fill_segments.md),
164-
[morphology.find_tips](find_tips.md),
166+
[morphology.find_tips](find_tips.md),
165167
[morphology.find_branch_pts](find_branch_pts.md),
166-
[morphology.segment_angle](segment_angle.md),
168+
[morphology.segment_angle](segment_angle.md),
167169
[morphology.segment_curvature](segment_curvature.md),
168-
[morphology.segment_euclidean_length](segment_euclidean_length.md),
170+
[morphology.segment_euclidean_length](segment_euclidean_length.md),
169171
[morphology.segment_insertion_angle](segment_insertion_angle.md),
170-
[morphology.segment_path_length](segment_pathlength.md),
171-
[morphology.segment_tangent_angle](segment_tangent_angle.md),
172-
[report_size_marker_area](report_size_marker.md),
173-
[transform.find_color_card](find_color_card.md),
172+
[morphology.segment_path_length](segment_pathlength.md),
173+
[morphology.segment_tangent_angle](segment_tangent_angle.md),
174+
[report_size_marker_area](report_size_marker.md),
175+
[transform.find_color_card](find_color_card.md),
176+
[transform.detect_color_card](transform_detect_color_card.md)
174177
[watershed_segmentation](watershed.md), and
175-
[within_frame](within_frame.md)
178+
[within_frame](within_frame.md).
176179

177180
All of these functions include an optional `label` parameter
178181
that allows users to append custom prefixes to the unique variable identifier.

docs/transform_affine_color_correction.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ Euclidean distance between the transformed source color values and the target co
1515
- rgb_img - an RGB image with color chips visualized
1616
- 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
1717
- 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
18-
18+
- **Example use:**
19+
- [Color Correction Tutorial](tutorials/transform_color_correction_tutorial.md)
1920

2021
**Reference Images**
2122

docs/transform_detect_color_card.md

+4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Automatically detects a color card and creates a labeled mask.
1515
- radius - Radius of circle to make the color card labeled mask (default = 20).
1616
- **Returns**
1717
- labeled_mask - Labeled color card mask (useful downstream of this step in `pcv.transform.get_color_matrix` and `pcv.transform.correct_color`)
18+
- **Example use:**
19+
- [Color Correction Tutorial](tutorials/transform_color_correction_tutorial.md)
1820

1921
!!! note
2022
Color chip size can only be used reasonably as a scaling factor (converting pixels to a known real world scale like cms)
@@ -31,6 +33,8 @@ rgb_img, path, filename = pcv.readimage("target_img.png")
3133
cc_mask = pcv.transform.detect_color_card(rgb_img=rgb_img)
3234

3335
avg_chip_size = pcv.outputs.observations['default']['median_color_chip_size']['value']
36+
avg_chip_w = pcv.outputs.observations['default']['median_color_chip_width']['value']
37+
avg_chip_h = pcv.outputs.observations['default']['median_color_chip_height']['value']
3438

3539
```
3640

plantcv/plantcv/photosynthesis/reassign_frame_labels.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"""Reassign PSII frame labels based on induction curve"""
12
import numpy as np
23
from plantcv.plantcv import fatal_error
34
from plantcv.plantcv.classes import PSII_data

0 commit comments

Comments
 (0)