From af6882ad3963380a451ebed1dacfdf878f1479be Mon Sep 17 00:00:00 2001 From: HaleySchuhl Date: Tue, 14 Jun 2022 09:39:55 -0500 Subject: [PATCH 01/21] update code examples in doc page --- docs/rgb2cmyk.md | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/docs/rgb2cmyk.md b/docs/rgb2cmyk.md index 4d4e505ab..31dedee46 100644 --- a/docs/rgb2cmyk.md +++ b/docs/rgb2cmyk.md @@ -26,9 +26,8 @@ from plantcv import plantcv as pcv # or "plot" (Jupyter Notebooks or X11) pcv.params.debug = "print" -# image converted from RGB to LAB, channels are then split. -# Lightness ('l') channel is output -l_channel = pcv.rgb2gray_cmyk(rgb_img=rgb_img, channel='Y') +# image converted from RGB to CMYK, channels are then split. +y_channel = pcv.rgb2gray_cmyk(rgb_img=rgb_img, channel='Y') ``` @@ -38,8 +37,8 @@ l_channel = pcv.rgb2gray_cmyk(rgb_img=rgb_img, channel='Y') ```python -# Green-Magenta ('a') channel is output -a_channel = pcv.rgb2gray_cmyk(rgb_img=rgb_img, channel='C') +# Cyan ('c') channel is output +c_channel = pcv.rgb2gray_cmyk(rgb_img=rgb_img, channel='C') ``` @@ -49,8 +48,8 @@ a_channel = pcv.rgb2gray_cmyk(rgb_img=rgb_img, channel='C') ```python -# Green-Magenta ('a') channel is output -a_channel = pcv.rgb2gray_cmyk(rgb_img=rgb_img, channel='M') +# Magenta ('m') channel is output +m_channel = pcv.rgb2gray_cmyk(rgb_img=rgb_img, channel='M') ``` @@ -60,8 +59,8 @@ a_channel = pcv.rgb2gray_cmyk(rgb_img=rgb_img, channel='M') ```python -# Green-Magenta ('a') channel is output -a_channel = pcv.rgb2gray_cmyk(rgb_img=rgb_img, channel='Y') +# Yellow ('a') channel is output +y_channel = pcv.rgb2gray_cmyk(rgb_img=rgb_img, channel='Y') ``` @@ -71,7 +70,7 @@ a_channel = pcv.rgb2gray_cmyk(rgb_img=rgb_img, channel='Y') ```python -# Green-Magenta ('a') channel is output -a_channel = pcv.rgb2gray_cmyk(rgb_img=rgb_img, channel='K') +# Black ('k') channel is output +k_channel = pcv.rgb2gray_cmyk(rgb_img=rgb_img, channel='K') ``` From b1235af349f83a6a843caf4336227162cba4d3e2 Mon Sep 17 00:00:00 2001 From: HaleySchuhl Date: Tue, 14 Jun 2022 09:41:12 -0500 Subject: [PATCH 02/21] add link to source code --- docs/rgb2cmyk.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/rgb2cmyk.md b/docs/rgb2cmyk.md index 31dedee46..55fbb50b2 100644 --- a/docs/rgb2cmyk.md +++ b/docs/rgb2cmyk.md @@ -74,3 +74,5 @@ y_channel = pcv.rgb2gray_cmyk(rgb_img=rgb_img, channel='Y') k_channel = pcv.rgb2gray_cmyk(rgb_img=rgb_img, channel='K') ``` + +**Source Code:** [Here](https://github.com/danforthcenter/plantcv/blob/master/plantcv/plantcv/rgb2gray_cmyk.py) From 902fe7e2056f70f6f43d9eab0f32dc5764ccc37b Mon Sep 17 00:00:00 2001 From: HaleySchuhl Date: Tue, 14 Jun 2022 09:53:35 -0500 Subject: [PATCH 03/21] fix code block comments in otsu_threshold --- docs/otsu_threshold.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/otsu_threshold.md b/docs/otsu_threshold.md index 67b077930..a64f7e7b1 100644 --- a/docs/otsu_threshold.md +++ b/docs/otsu_threshold.md @@ -28,8 +28,8 @@ from plantcv import plantcv as pcv pcv.params.debug = "print" # Create binary image from a gray image based on threshold values. -# Targeting light objects in the image. -threshold_light = pcv.threshold.otsu(gray_img=gray_img, max_value=255, object_type='dark') +# Targeting dark objects in the image. +threshold_dark = pcv.threshold.otsu(gray_img=gray_img, max_value=255, object_type='dark') ``` @@ -44,8 +44,8 @@ threshold_light = pcv.threshold.otsu(gray_img=gray_img, max_value=255, object_ty ```python # Create binary image from a gray image based on threshold values. -# Targeting dark objects in the image. -threshold_dark = pcv.threshold.otsu(gray_img=gray_img, max_value=255, object_type='light') +# Targeting light objects in the image. +threshold_light = pcv.threshold.otsu(gray_img=gray_img, max_value=255, object_type='light') ``` From 586542686425f6ae2e0af0bd20691bbc53b65b9e Mon Sep 17 00:00:00 2001 From: HaleySchuhl Date: Tue, 14 Jun 2022 09:57:18 -0500 Subject: [PATCH 04/21] remove broken link in texture_threshold.md --- docs/texture_threshold.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/texture_threshold.md b/docs/texture_threshold.md index a6773abe0..c277f5fef 100644 --- a/docs/texture_threshold.md +++ b/docs/texture_threshold.md @@ -24,7 +24,7 @@ texture calculation for thresholding. - **Note:** - This function is computationally expensive and will likely take several minutes to run (even longer if images are large). - **Example use:** - - [Interactive Documentation](https://mybinder.org/v2/gh/danforthcenter/plantcv-binder.git/master?filepath=notebooks%2Fthreshold.ipynb) + - Below **Original image (lightness channel)** From d3157eff4fcb49f49c15aec23a0583556b162665 Mon Sep 17 00:00:00 2001 From: HaleySchuhl Date: Tue, 14 Jun 2022 10:26:33 -0500 Subject: [PATCH 05/21] add link to source code in color correction --- docs/transform_correct_color.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/transform_correct_color.md b/docs/transform_correct_color.md index 3c586c305..477aa9dd0 100644 --- a/docs/transform_correct_color.md +++ b/docs/transform_correct_color.md @@ -58,3 +58,4 @@ target_matrix, source_matrix, transformation_matrix, corrected_img = pcv.transfo ![Screenshot](img/documentation_images/correct_color_imgs/hstack.jpg) +**Source Code:** [Here](https://github.com/danforthcenter/plantcv/blob/master/plantcv/plantcv/transform/color_correction.py) From 390b70fce9acfd82b6a686296181a36dbfc92fa7 Mon Sep 17 00:00:00 2001 From: HaleySchuhl Date: Tue, 14 Jun 2022 13:38:36 -0500 Subject: [PATCH 06/21] add link to source code in find_color_card.md --- docs/find_color_card.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/find_color_card.md b/docs/find_color_card.md index f1db3927b..6d40b63fb 100644 --- a/docs/find_color_card.md +++ b/docs/find_color_card.md @@ -51,3 +51,5 @@ avg_chip_size = pcv.outputs.observations['prefix']['color_chip_size']['value'] **Tilted color card** ![Screenshot](img/documentation_images/correct_color_imgs/tilted_color_card.jpg) + +**Source Code:** [Here](https://github.com/danforthcenter/plantcv/blob/master/plantcv/plantcv/transform/color_correction.py) From 2cbe6d50120c082d4e2ec89638df221520ce12c1 Mon Sep 17 00:00:00 2001 From: HaleySchuhl Date: Tue, 14 Jun 2022 13:39:58 -0500 Subject: [PATCH 07/21] add link to source code in create_color_card_mask.md add link --- docs/create_color_card_mask.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/create_color_card_mask.md b/docs/create_color_card_mask.md index 5f0b9fcbc..f33e36055 100644 --- a/docs/create_color_card_mask.md +++ b/docs/create_color_card_mask.md @@ -37,3 +37,5 @@ mask = pcv.transform.create_color_card_mask(rgb_img=img, radius=10, start_coord= **Color card mask** ![Screenshot](img/documentation_images/correct_color_imgs/color_card_mask.jpg) + +**Source Code:** [Here](https://github.com/danforthcenter/plantcv/blob/master/plantcv/plantcv/transform/color_correction.py) From 58c5efffc9e52b67dcaf16c068ad148d341b2087 Mon Sep 17 00:00:00 2001 From: HaleySchuhl Date: Tue, 14 Jun 2022 13:41:14 -0500 Subject: [PATCH 08/21] add link to source code in get_color_matrix.md --- docs/get_color_matrix.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/get_color_matrix.md b/docs/get_color_matrix.md index 34af90a2c..6ccac1d7e 100644 --- a/docs/get_color_matrix.md +++ b/docs/get_color_matrix.md @@ -55,3 +55,4 @@ print(color_matrix) [ 220. 74.632 158.8224 144.3724]] ``` +**Source Code:** [Here](https://github.com/danforthcenter/plantcv/blob/master/plantcv/plantcv/transform/color_correction.py) From 8a0b76ad80a11a8c7c55ad1684b387e17df091f4 Mon Sep 17 00:00:00 2001 From: HaleySchuhl Date: Tue, 14 Jun 2022 13:42:14 -0500 Subject: [PATCH 09/21] add source code link to mp_inverse.md --- docs/mp_inverse.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/mp_inverse.md b/docs/mp_inverse.md index 8677a18bc..b937858fb 100644 --- a/docs/mp_inverse.md +++ b/docs/mp_inverse.md @@ -26,3 +26,4 @@ print(matrix_m) ``` +**Source Code:** [Here](https://github.com/danforthcenter/plantcv/blob/master/plantcv/plantcv/transform/color_correction.py) From 5cb5f2180b03507212e0af0a76863c1d2eecbaa8 Mon Sep 17 00:00:00 2001 From: HaleySchuhl Date: Tue, 14 Jun 2022 13:42:56 -0500 Subject: [PATCH 10/21] add link to transformation_matrix.md --- docs/transformation_matrix.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/transformation_matrix.md b/docs/transformation_matrix.md index 3652548a1..2e3eb11cf 100644 --- a/docs/transformation_matrix.md +++ b/docs/transformation_matrix.md @@ -25,3 +25,4 @@ deviance, transformation_matrix = pcv.transform.calc_transformation_matrix(matri ``` +**Source Code:** [Here](https://github.com/danforthcenter/plantcv/blob/master/plantcv/plantcv/transform/color_correction.py) From b122f8acf7c99da216e2b6aa42789099b1599d34 Mon Sep 17 00:00:00 2001 From: HaleySchuhl Date: Tue, 14 Jun 2022 13:44:31 -0500 Subject: [PATCH 11/21] add link to transformation matrix.md --- docs/apply_transformation_matrix.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/apply_transformation_matrix.md b/docs/apply_transformation_matrix.md index 9dad58468..0e3d1cdff 100644 --- a/docs/apply_transformation_matrix.md +++ b/docs/apply_transformation_matrix.md @@ -40,3 +40,4 @@ corrected_img = pcv.transform.apply_transformation_matrix(source_img=source_img, ![Screenshot](img/documentation_images/correct_color_imgs/hstack.jpg) +**Source Code:** [Here](https://github.com/danforthcenter/plantcv/blob/master/plantcv/plantcv/transform/color_correction.py) From 5bcc79ec3cad6498fc905ffe8199bd11ab770b88 Mon Sep 17 00:00:00 2001 From: HaleySchuhl Date: Tue, 14 Jun 2022 13:44:42 -0500 Subject: [PATCH 12/21] add link to load_matrix.md --- docs/load_matrix.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/load_matrix.md b/docs/load_matrix.md index 1b97d8d36..07796b13b 100644 --- a/docs/load_matrix.md +++ b/docs/load_matrix.md @@ -24,3 +24,4 @@ filename = "test.npz" matrix = pcv.transform.load_matrix(filename=filename) ``` +**Source Code:** [Here](https://github.com/danforthcenter/plantcv/blob/master/plantcv/plantcv/transform/color_correction.py) From 96ee3fe069263c9d8bbceaf87220bf4abeeb207f Mon Sep 17 00:00:00 2001 From: HaleySchuhl Date: Tue, 14 Jun 2022 13:45:47 -0500 Subject: [PATCH 13/21] Update save_matrix.md --- docs/save_matrix.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/save_matrix.md b/docs/save_matrix.md index 2f07f92e1..1ddbbf85d 100644 --- a/docs/save_matrix.md +++ b/docs/save_matrix.md @@ -26,3 +26,5 @@ pcv.transform.save_matrix(matrix=matrix, filename=fname) ``` +**Source Code:** [Here](https://github.com/danforthcenter/plantcv/blob/master/plantcv/plantcv/transform/color_correction.py) + From 4b62b5fab7f3638608c1fd1ccd39a1a5b1be927d Mon Sep 17 00:00:00 2001 From: HaleySchuhl Date: Tue, 14 Jun 2022 14:08:49 -0500 Subject: [PATCH 14/21] update formatting of images in transform_resize.md --- docs/transform_resize.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/transform_resize.md b/docs/transform_resize.md index 461e04180..1a4104c14 100644 --- a/docs/transform_resize.md +++ b/docs/transform_resize.md @@ -69,19 +69,23 @@ resize_img5 = pcv.transform.resize_factor(img=img, factors=(0.1154905775, 0.1154 ``` **Images after resizing** -1st resized image + ![Screenshot](img/documentation_images/resize/19_resize1.jpg) -2nd resized image +**2nd resized image** + ![Screenshot](img/documentation_images/resize/19_resize2.jpg) -3rd resized image (cropping) +**3rd resized image (cropping)** + ![Screenshot](img/documentation_images/resize/19_resize3.jpg) -3rd resized image (zero-padding) +**3rd resized image (zero-padding)** + ![Screenshot](img/documentation_images/resize/19_resize4.jpg) -5th resize image +**Resize by factor image** + ![Screenshot](img/documentation_images/resize/19_resize5.jpg) **Source Code:** [Here](https://github.com/danforthcenter/plantcv/blob/master/plantcv/plantcv/transform/resize.py) From 3491c8a34e0743a0af6f92808886606d83ba72ab Mon Sep 17 00:00:00 2001 From: HaleySchuhl Date: Wed, 15 Jun 2022 08:18:54 -0500 Subject: [PATCH 15/21] fix formatting of imgs and captions --- docs/visualize_pseudocolor.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/visualize_pseudocolor.md b/docs/visualize_pseudocolor.md index 3862182bb..a5089883c 100644 --- a/docs/visualize_pseudocolor.md +++ b/docs/visualize_pseudocolor.md @@ -38,6 +38,7 @@ unaltered, the matplotlib default DPI is 100 pixels per inch. ![Screenshot](img/documentation_images/pseudocolor/mask.jpg) **Mask of "bad" values** + ![Screenshot](img/documentation_images/pseudocolor/bad_mask.png) @@ -109,9 +110,11 @@ pseudo_img_mask_obj_bad_mask = pcv.visualize.pseudocolor(gray_img=img, obj=obg, ![Screenshot](img/documentation_images/pseudocolor/pseudo_onimage_simple.jpg) **Pseudocolored, Pixels With User Defined "bad" Values Marked Using Red Color (no axes or colorbar)** + ![Screenshot](img/documentation_images/pseudocolor/pseudocolored_mask_bad.png) **Pseudocolored, Cropped, background="white", Pixels With User Defined "bad" Values Marked Using Red Color (no axes)** + ![Screenshot](img/documentation_images/pseudocolor/pseudocolored_mask_bad_obj.png) **Source Code:** [Here](https://github.com/danforthcenter/plantcv/blob/master/plantcv/plantcv/visualize/pseudocolor.py) From 9fea50d04a80ce095094cf133cc60331ff1ab580 Mon Sep 17 00:00:00 2001 From: HaleySchuhl Date: Wed, 15 Jun 2022 08:34:35 -0500 Subject: [PATCH 16/21] add link to parallel_config.md --- docs/parallel_config.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/parallel_config.md b/docs/parallel_config.md index 316afbf43..b36ca8e60 100644 --- a/docs/parallel_config.md +++ b/docs/parallel_config.md @@ -207,3 +207,6 @@ Windows you will need to specify the whole path to `plantcv-workflow.py`. ```shell python %CONDA_PREFIX%/Scripts/plantcv-workflow.py --config my_config.json ``` + +**Source Code:** [Here](https://github.com/danforthcenter/plantcv/blob/811e6558a5b4fbf7e5781a9d92834a0b19642bb2/plantcv/parallel/__init__.py) + From 38505c39c718dd65ae55e931aa0a23f774d26773 Mon Sep 17 00:00:00 2001 From: Haley Schuhl <44006936+HaleySchuhl@users.noreply.github.com> Date: Wed, 15 Jun 2022 14:19:33 -0500 Subject: [PATCH 17/21] Update docs/transform_resize.md suggestion Co-authored-by: David Peery --- docs/transform_resize.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/transform_resize.md b/docs/transform_resize.md index 1a4104c14..69900403c 100644 --- a/docs/transform_resize.md +++ b/docs/transform_resize.md @@ -84,7 +84,7 @@ resize_img5 = pcv.transform.resize_factor(img=img, factors=(0.1154905775, 0.1154 ![Screenshot](img/documentation_images/resize/19_resize4.jpg) -**Resize by factor image** +**5th resized image (by factor)** ![Screenshot](img/documentation_images/resize/19_resize5.jpg) From ed0ecc88985431dc2afa87059fdc4d920bcda464 Mon Sep 17 00:00:00 2001 From: Haley Schuhl <44006936+HaleySchuhl@users.noreply.github.com> Date: Wed, 15 Jun 2022 14:19:42 -0500 Subject: [PATCH 18/21] Update docs/transform_resize.md Co-authored-by: David Peery --- docs/transform_resize.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/transform_resize.md b/docs/transform_resize.md index 69900403c..4a63c5bb0 100644 --- a/docs/transform_resize.md +++ b/docs/transform_resize.md @@ -69,6 +69,7 @@ resize_img5 = pcv.transform.resize_factor(img=img, factors=(0.1154905775, 0.1154 ``` **Images after resizing** +**1st resized image (default interpolation) ![Screenshot](img/documentation_images/resize/19_resize1.jpg) From 84e3dd3c3fd155bba0a2f714a37c8edc1ce4a375 Mon Sep 17 00:00:00 2001 From: Haley Schuhl <44006936+HaleySchuhl@users.noreply.github.com> Date: Wed, 15 Jun 2022 14:19:57 -0500 Subject: [PATCH 19/21] Update docs/transform_resize.md Co-authored-by: David Peery --- docs/transform_resize.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/transform_resize.md b/docs/transform_resize.md index 4a63c5bb0..bc2761819 100644 --- a/docs/transform_resize.md +++ b/docs/transform_resize.md @@ -81,7 +81,7 @@ resize_img5 = pcv.transform.resize_factor(img=img, factors=(0.1154905775, 0.1154 ![Screenshot](img/documentation_images/resize/19_resize3.jpg) -**3rd resized image (zero-padding)** +**4th resized image (zero-padding)** ![Screenshot](img/documentation_images/resize/19_resize4.jpg) From 0ebab8b7fb575a8f6700b6dccf7d5027012944a7 Mon Sep 17 00:00:00 2001 From: Haley Schuhl <44006936+HaleySchuhl@users.noreply.github.com> Date: Wed, 15 Jun 2022 14:20:04 -0500 Subject: [PATCH 20/21] Update docs/transform_resize.md Co-authored-by: David Peery --- docs/transform_resize.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/transform_resize.md b/docs/transform_resize.md index bc2761819..1e93b4437 100644 --- a/docs/transform_resize.md +++ b/docs/transform_resize.md @@ -73,7 +73,7 @@ resize_img5 = pcv.transform.resize_factor(img=img, factors=(0.1154905775, 0.1154 ![Screenshot](img/documentation_images/resize/19_resize1.jpg) -**2nd resized image** +**2nd resized image (Interpolation by nearest)** ![Screenshot](img/documentation_images/resize/19_resize2.jpg) From 5507652f5fef9d5f307802ab9430b38d14844b22 Mon Sep 17 00:00:00 2001 From: Haley Schuhl <44006936+HaleySchuhl@users.noreply.github.com> Date: Thu, 16 Jun 2022 13:28:58 -0500 Subject: [PATCH 21/21] fix link --- docs/parallel_config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/parallel_config.md b/docs/parallel_config.md index b36ca8e60..9ecd12b61 100644 --- a/docs/parallel_config.md +++ b/docs/parallel_config.md @@ -208,5 +208,5 @@ Windows you will need to specify the whole path to `plantcv-workflow.py`. python %CONDA_PREFIX%/Scripts/plantcv-workflow.py --config my_config.json ``` -**Source Code:** [Here](https://github.com/danforthcenter/plantcv/blob/811e6558a5b4fbf7e5781a9d92834a0b19642bb2/plantcv/parallel/__init__.py) +**Source Code:** [Here](https://github.com/danforthcenter/plantcv/blob/master/plantcv/parallel/__init__.py)