Skip to content

Commit

Permalink
Merge branch 'release-4.0' into rename_to_ksize
Browse files Browse the repository at this point in the history
  • Loading branch information
HaleySchuhl authored Aug 10, 2023
2 parents f8eee9b + 3cad879 commit d1cc78c
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion docs/tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,36 @@ where it is created by running `plantcv.parallel.process_results` on a directory
[hierarchical data structure](output_measurements.md) is convenient for flexible data processing but not for downstream
analysis. The tool creates an output CSV file. The format of this table is one row per value/label (i.e. R long format).

#### Tabulate Naive Bayes Classes

`plantcv-utils tabulate_bayes_classes` is a command-line tool for organizing pixel RGB values into a table for naive Bayes
training with the command.

```
usage: plantcv-utils tabulate_bayes_classes [-h] -i INFILE -o OUTFILE
options:
-h, --help show this help message and exit
-i INFILE, --infile INFILE
Input text file.
-o OUTFILE, --outfile OUTFILE
Output tab-delimited table file.
```

The input file should have class names preceded by the "#" character. RGB values can be pasted directly from ImageJ without
reformatting. E.g.:

```
#plant
96,154,72 95,153,72 91,155,71 91,160,70 90,155,67 92,152,66 92,157,70
54,104,39 56,104,38 59,106,41 57,105,43 54,104,40 54,103,35 56,101,39 58,99,41 59,99,41
#background
114,127,121 117,135,125 120,137,131 132,145,138 142,154,148 151,166,158 160,182,172
115,125,121 118,131,123 122,132,135 133,142,144 141,151,152 150,166,158 159,179,172
```

**Source Code:** [Here](https://github.com/danforthcenter/plantcv/blob/main/plantcv/utils/converters.py)


Expand Down Expand Up @@ -101,4 +131,3 @@ process metadata and execute custom workflows on each image in a dataset. More d
[Workflow Parallelization Tutorial](pipeline_parallel.md).

**Source Code:** [Here](https://github.com/danforthcenter/plantcv/blob/main/plantcv/parallel/cli.py)

0 comments on commit d1cc78c

Please sign in to comment.