-
Notifications
You must be signed in to change notification settings - Fork 265
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1346 from danforthcenter/release-4.0
Release 4.0
- Loading branch information
Showing
544 changed files
with
12,790 additions
and
7,584 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
## Interactive Point Annotation Tool | ||
|
||
Using [Jupyter Notebooks](jupyter.md) it is possible to interactively click to collect coordinates from an image, which can be used in various downstream applications. Left click on the image to collect a point. Right click removes the | ||
closest collected point. | ||
|
||
**plantcv.Points**(*img, figsize=(12, 6)*) | ||
|
||
**returns** interactive image class | ||
|
||
- **Parameters:** | ||
- img - Image data | ||
- figsize - Interactive plot figure size (default = (12,6)) | ||
|
||
- **Attributes:** | ||
- points - Coordinates (x,y) of the collected points as a list of tuples | ||
|
||
- **Context:** | ||
- Used to define a list of coordinates of interest. | ||
- For example the [`pcv.roi.custom`](roi_custom.md) function defines a polygon Region of Interest based on a list of vertices, which can be labor intensive to define but is streamlined with the ability to click for point collection. | ||
- The list of vertices output has also shown to be helpful while using [pcv.roi.multi](roi_multi.md) in cases where centers are defined with a custom list of vertices. | ||
- **Example use:** | ||
- Below | ||
|
||
|
||
```python | ||
from plantcv import plantcv as pcv | ||
|
||
# Create an instance of the Points class | ||
marker = pcv.Points(img=img, figsize=(12,6)) | ||
|
||
# Click on the plotted image to collect coordinates | ||
|
||
# Use the identified coordinates to create a custom polygon ROI | ||
roi_contour, roi_hierarchy = pcv.roi.custom(img=img, vertices=marker.points) | ||
|
||
``` | ||
|
||
**Selecting Coordinates** | ||
|
||
![screen-gif](img/documentation_images/annotate_Points/custom_roi.gif) | ||
|
||
**Resulting ROI** | ||
|
||
![Screenshot](img/documentation_images/annotate_Points/custom_roi.jpg) | ||
|
||
|
||
**Source Code:** [Here](https://github.com/danforthcenter/plantcv/blob/master/plantcv/plantcv/classes.py) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.