You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/users_guide/modules/apples/scald_rating.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ Prior to running this module, :ref:`Step 2: Run Segmentation` must be performed
16
16
17
17
Rate Superficial Scald
18
18
----------------------
19
-
Inside of your Granny project directory (created in the :ref:`Step 1: Project Setup`), you should performed the segmentation step before proceeding with scald analysis. Now, you will run the `scald` analysis on the command-line. Like the segmentation step, you must provide several arguments. The following table lists the arguments needed for the `scald` analysis:
19
+
Inside of your Granny project directory (created in the :ref:`Step 1: Project Setup`), you should have performed the segmentation step before proceeding with scald analysis. Now, you will run the `scald` analysis on the command-line. Like the segmentation step, you must provide several arguments. The following table lists the arguments needed for the `scald` analysis:
Copy file name to clipboardExpand all lines: docs/users_guide/modules/apples/starch_rating.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ Prior to running this module, :ref:`Step 2: Run Segmentation` must be performed
16
16
17
17
Rate Starch Clearing
18
18
--------------------
19
-
Inside of your Granny project directory (created in the :ref:`Step 1: Project Setup`), you should performed the segmentation step before proceeding with starch analysis. Now, you will run the `starch` analysis on the command-line. Like the segmentation step, you must provide several arguments. The following table lists the arguments needed for the `starch` analysis:
19
+
Inside of your Granny project directory (created in the :ref:`Step 1: Project Setup`), you should have performed the segmentation step before proceeding with starch analysis. Now, you will run the `starch` analysis on the command-line. Like the segmentation step, you must provide several arguments. The following table lists the arguments needed for the `starch` analysis:
Copy file name to clipboardExpand all lines: docs/users_guide/modules/pears/pear_color_rating.rst
+66-14Lines changed: 66 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,27 +1,60 @@
1
1
Rating Color in Pears
2
2
=====================
3
3
4
-
.. attention::
5
-
6
-
:ref:`Step 2: Run Segmentation` must be performed before using this rating module.
7
4
8
-
This module will determine the color on a piece of fruit. The module will output the results as a ``results.csv`` file that can be opened in Microsoft Excel or another spreadsheet program. The results include: the color vs total fruit area (rating) for each individual piece of fruit. Granny's color rating module will also report an average tray level color rating.
5
+
This module will determine the color on a piece of fruit.
9
6
10
-
Example of starch rating command line usage:
7
+
Segmentation for Pear Color Rating
8
+
----------------------------------
9
+
10
+
Prior to running this module, :ref:`Step 2: Run Segmentation` must be performed so that pears on the tray can be separated into individual images. To follow along with this tutorial, you can use the following image:
Inside of your Granny project directory (created in the :ref:`Step 1: Project Setup`), you should have performed the segmentation step before proceeding with pear color analysis. Now, you will run the `color` analysis on the command-line. Like the segmentation step, you must provide several arguments. The following table lists the arguments needed for the `color` analysis:
22
+
23
+
.. csv-table::
24
+
:header: "Granny Options", "Description"
25
+
:widths: auto
26
+
27
+
"``-i cli``", "Indicates you want to use the command-line interface."
28
+
"``--analysis color``", "Indicates you want to run the color analysis."
29
+
"``--input``", "The directory where the segmented images of apple cross-sections, stained with iodine are kept."
30
+
31
+
Similar to the segmentation step, when you specify the ``--input`` argument, you can drag and drop the folder where the images from the segmentation are stored. This will be the ``segmented_images`` folder created during the `segmentation` step. For example if the results from segmentation are in this location ``/home/johns_smith/results/segmentation/2024-07-12-09-05/segmented_images`` then your command line will look like the following:
11
32
12
33
.. code:: bash
13
34
14
-
granny -i cli --action color --image_dir ./results/segmentation/<date_and_time_of_run>
35
+
granny -i cli --analysis color --input /home/john_smith/demo/results/segmentation/2024-07-12-09-05/segmented_images
Similar to the segmentation step, a new folder named ``color`` will be created in the ``results`` results folder. It too will have a sub folder with the date the analysis was run. Inside this folder will be the results file named ``results.csv`` and images of each pear.
The ``results.csv`` file can be opened using Microsoft Excel or another spreadsheet program. The file includes the segmented image name and several rating values.
The following provides the meaning of each column in ``results.csv`` file:
83
+
84
+
- **Name**: The name of the segmented image. A single pear is contained in each image.
85
+
- **bin**: Granny will estimate a color that best approximates the rating in the color card that is commonly used for pear color rating. An image of the color card can be found below.
86
+
- **score**: The granny color score rating. The score ranges from 0 to 1, where 1 indicates more yellow fruit and lower numbers more greenish fruit. Formally, this score is the distance along the line that passes through the color card colors in LAB color space. Please see the published `Granny manuscript <https://www.biorxiv.org/content/10.1101/2024.04.03.588000v1.full>`_ for more detailed information about how this score is calculated.
87
+
- **distance**: This value indicates the distance from the line that passes through the color card colors in LAB color space. Because the color card can not include the color of every pear, this number is meant to indicate how "off" the color might be from a traditional color card rating. The closer to 0 the less "off" it is.
88
+
- **location**: Indicates if the distance value is above (1 value) or below (-1 value) the line.
89
+
- **l**: The "L" channel value in the LAB color space.
90
+
- **a**: The "A" channel value in the LAB color space.
91
+
- **b**: The "B" channel value in the LAB color space.
92
+
- **TrayName**: The name of the original tray image.
93
+
94
+
The following is an image of the color card that is commonly used to rate pear color. Each color on the card has a unique number from 0.5 (most green) to 5 (most yellow).
Each segemented image with a mask of the color is located in ``/results/color/<date and time of run>`` directory, users can navigate to this directory to check what is being used in the color rating. This is also where the color rating ``results.csv`` file (shown in table above) will be output.
0 commit comments