Skip to content

Commit

Permalink
img before objects in order, start adding doc page
Browse files Browse the repository at this point in the history
  • Loading branch information
HaleySchuhl committed Jul 14, 2020
1 parent 5bc499f commit 31616ca
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
24 changes: 24 additions & 0 deletions docs/analyze_stem.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## Analyze Stem Objects

Primary, or stem, objects identified during workflows that examine the [mmorphology](morphology_tutorial.md) of
plants or plant organs can have specific characteristics measured about the stem segments of a skeleton. These measurement

**plantcv.morphology.analyze_stem**(*img, obj, mask*)

**returns** analysis_image

- **Parameters:**
- img - RGB or grayscale image data for plotting.
- obj - Single or grouped contour object.
- mask - Binary image to use as mask for moments analysis.
- **Context:**
- Used to output shape characteristics of an image, including height, object area, convex hull, convex hull area,
perimeter, extent x, extent y, longest axis, centroid x coordinate, centroid y coordinate, in bounds QC (if object
touches edge of image, image is flagged).
- **Example use:**
- [Use In VIS Tutorial](vis_tutorial.md)


- **Output data stored:** Data ('stem_angle', 'stem_height', and 'stem_length')
automatically gets stored to the [`Outputs` class](outputs.md) when this function is ran.
These data can always get accessed during a workflow. For more detail about data output see [Summary of Output Observations](output_measurements.md#summary-of-output-observations)
6 changes: 3 additions & 3 deletions plantcv/plantcv/morphology/analyze_stem.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@
from plantcv.plantcv import print_image


def analyze_stem(stem_objects, rgb_img):
def analyze_stem(rgb_img, stem_objects):
""" Calculate angle of segments (in degrees) by fitting a linear regression line to segments.
Inputs:
stem_objects = List of stem segments (output from segment_sort function)
rgb_img = RGB image to plot debug image
stem_objects = List of stem segments (output from segment_sort function)
Returns:
labeled_img = Stem analysis debugging image
:param stem_objects: list
:param rgb_img: numpy.ndarray
:param stem_objects: list
:return labeled_img: numpy.ndarray
"""

Expand Down

0 comments on commit 31616ca

Please sign in to comment.