Releases: danforthcenter/plantcv
Releases · danforthcenter/plantcv
PlantCV v3.13.2
What's Changed
- Scale color correction matrices to 0-255 in quick color check by @JorgeGtz in #831
- Fix bug in channel order in color correction by @JorgeGtz in #832
- Trigger GitHub Actions deployment workflow when a release is published by @nfahlgren in #833
Full Changelog: v3.13.1...v3.13.2
PlantCV v3.13.1
What's Changed
- Fix line endings when switching between macOS/Linux and Windows by @nfahlgren in #811
- Increase flexibility for processing hyperspectral ENVI header files by @typelogic in #813
- Configure most functions to use the _debug module by @dschneiderch in #807
- Cast contour tuple as a list in find_objects by @JorgeGtz in #830
- Fix bug in color correction by @JorgeGtz in #829
New Contributors
- @typelogic made their first contribution in #813
Full Changelog: v3.13.0...v3.13.1
PlantCV v3.13.0
PlantCV Version 3.13 Updates
- Update imports to discontinue the deprecation warnings in
pcv.watershed
- Update
scikit-image
requirement toscikit-image>=0.13
- Reorganizes our tutorials in several ways:
- There is now a main tutorials page that is organized as a gallery of tutorial "cards" that can be filtered by keyword tags. Each card has a launch Binder button to access the interactive tutorial and a link to the static tutorial.
- The tutorial card images and links to notebooks are remote and can be hosted from any GitHub (or other) repository.
- The static tutorial pages are now grouped in a directory called "tutorials."
- The static tutorial pages now only have a launch Binder button and render the complete Jupyter notebooks using nbviewer, rather than having a page that recreates the workflow and has a script version of the workflow.
- Added
pcv.transform.gamma_correct
which performs gamma correction on the input image (wrapper of the skimage gamma correction function). - Updated the
debug
method in the backend within more miscellaneous functions. - Expand the functionality of the metadata matcher portion of
plantcv-workflow
to support the matching of multiple metadata values.- Syntax at the command line
(--match id:1,id:2,id:3)
- Also supports lists in configuration file based parallelization
- Syntax at the command line
- Updates plantcv.hyperspectral.read_data to support Band Sequential (BSQ) in addition to Band Interleaved by Line (BIL) raw data formats for ENVI type multi/hyperspectral datasets.
- Adds
pcv.visualize.obj_sizes
function for annotating the sizes of separate objects onto a visualization. - Add
pcv.visualize. obj_size_ecdf
for a new way to visualize: empirical cumulative distribution function (eCDF). - Converted to base python classes
int
andbool
since numpy is deprecatingnp.int
andnp.bool
datatypes. - Update the fill_segments function in the morphology sub-package
- The added observations are corrected.
- Also return the
filled_mask
(which is a label image as an output) along with thefilled_image
as outputs. - The
filled_img
is generate by calling the addedcolorize_label_img
visualization function.
PlantCV v3.12.1
PlantCV Version 3.12.1 Updates
-
Bugfix (from #770 ) for an update since
OpenCV
functionpointPolygonTest
was impacting 3 analysis functions from PCV. -
Numpy is deprecating
np.int
andnp.bool
; converted these to base python classes int and bool.
PlantCV v3.12.0
PlantCV Version 3.12 Updates
- Updated the
pcv.apply_mask()
, changed thergb_img
parameter toimg
since the function is now able to handle grayscale, NIR, and hyperspectral data. - Add json datatype check in the
add_observation
method. - Started to move some internal code within functions across the package to start using a debug module rather than having repetitive code for plotting/printing debugging images.
- Extend the
pcv.cluster_contours_splitimg
functionality to grayscale images. - Added a
bounding
parameter topcv.clustered_contours()
function so circles can be turned on or off (default behavior as on). - Added a
pcv.deprecation_warning
function for warning statements internal use within functions.- Add a "verbose" variable to pcv.params such that users have the option to turn off (deprecation) warnings by setting it to "False".
- Update and resolve a bug within the
random_sample
utility function so that it works as intended on datasets with subdirectories. - Added a new method (save_results) to the Outputs class.
outputs.save_results
supports two output formats, JSON and CSV. The code fromplantcv.print_results
was moved to the save_results method and a deprecation warning is now printed via print_results. When run with outformat = "json",outputs.save_results
has the same functionality asplantcv.print_results
. When run with outformat = "csv", a single CSV table in "long" format is produced that is compatible with use in R. CSV format is useful for a user who runs workflows only in Jupyter or wants to utilize data for testing from Jupyter. The output format JSON must be used for parallel workflows as before.- Users will need to migrate workflows from
pcv.print_results(args.result)
topcv.outputs.save_results(args.result)
beforepcv.print_results
is removed.
- Users will need to migrate workflows from
- Addition of RGB2CMYK function to PlantCV to allow the conversion of images from the RGB colour space to CMYK colour space and split the channels.
- Updated the way PlantCV handles subdaily timestamps for parallelization. Now will work with months and days even where there are no years.
Version 3.12.0 breaking changes
pcv.apply_mask()
, changed thergb_img
parameter toimg
pcv.cluster_contours_splitimg
, changed thergb_img
parameter toimg
PlantCV v3.11.1
Release v3.11.1
This release is an update of v3.11.0 to correctly trigger a deployment to PyPI and conda-forge.
PlantCV v3.11.0
3.11.0 updates
- Added a
label
parameter to all PlantCV functions that save observations. Thelabel
parameter can be used to set asample
name when saving observations. Multiple samples can be saved per image now, allowing for repeated measurements, which simplifies workflows that measure multiple objects or regions of interest - Added a
sample
parameter toOutputs.add_observation
.Outputs
class observations are now organized undersample
names so that multiple samples can be associated with a single workflow. - Add function
pcv.transform.warp
to fuse images that have different size/scale/proportions, e.g. from two (different) cameras in different locations. The function accepts 2 images and 4 pairs of points in order to compute a perspective transformation matrix so the images overlay nicely. - Update the function
pcv.hyperspectral.analyze_index
to be more robust to NaN values and to also only consider finite values when calculating index statistics even when values range to positive or negative infinity. - Documentation updates
- Prioritize the conda-forge channel in environment.yml
- Minor updates/bug fixes
- Add conda-forge badge to README
- Set
.gitattributes
to use Linux line endings on all platforms - A handful of minor changes to functions inside the morphology sub-package.
- Segment insertion angle was failing on skeleton structures that should have been successful, so a tweak to the part of the algorithm that combines the stem segments into a single object helps.
- Branch and tip points should be integers.
- Bugfix within
pcv.canny_edge_detect function
where the debug parameter had no effect when the line thickness is set. - Replaced MAINTAINER command in Dockerfile with LABEL because MAINTAINER is deprecated
- The workflow parallelization was duplicating the name of the image for the metadata "image". Removed the concatenation of the path (including name) and the name.
- Moved
pcv.resize
to the transform sub-packed. Also extended the functionality into the newpcv.transform.resize
andpcv.transform.resize_factor
.
Version 3.11.0 breaking changes
- A new
sample
input was added to theOutputs.add_observations
class method. - Observations stored in
Outputs
class instances have an extra hierarchical layer to account for sample names. To access an observation, the sample name needs to be included, for example: pcv.resize
deprecated and replaced withpcv.transform.resize
andpcv.transform.resize_factor
pcv.outputs.observations["sample_name"]["variable_name"]
PlantCV v3.10.1
3.10.1 updates:
- Updates
plantcv.plot_image
and various other plotting methods to create a new figure for each plot. PlantCV now works better with the%matplotlib notebook
plotting method in Jupyter. - Fixes an issue where
plantcv.visualize.pseudocolor
plotted the image even when debug mode was disabled. - Various documentation updates, corrections, and reformatting.
PlantCV v3.10.0
3.10 updates:
- Integration with GitHub actions.
- More specifically, makes the deploy packaging Actions job dependent on the proceeding build job. I.e. we should only upload packages to PyPI if tests pass.
- Update plantcv.auto_crop to allow users to separately parameterize the padding.
- This edit allows users to add custom padding to the top, bottom, left, and right of a cropped image.
‘padding_x’ and ‘padding_y’ can both accept tuples (optionally)
- This edit allows users to add custom padding to the top, bottom, left, and right of a cropped image.
- Modified the Dockerfile to install dependencies (other than OpenCV) from the requirements.txt file (Dockerfile had previously hardcoded dependencies for PlantCV). The Docker container is now built with the correct dependencies each time without manually updating the Dockerfile.
- Python multiprocessing was local parallelization (i.e. computing took place where the program plantcv-workflow.py was run). This functionality is maintained by using the dask.distributed LocalCluster option. However, using dask-jobqueue, we now support remote, distributed computing using cluster options available through dask-jobqueue, currently: HTCondorCluster, LSFCluster, MoabCluster, OARCluster, PBSCluster, SGECluster, and SLURMCluster.
- Add and revise testing to bring code coverage to 100%!
- Added plantcv.morphology.fill_segments
- This function propogates the labels of a segmented skeleton to fill a mask, using a watershed algorithm. Data about the area of each filled segments automatically gets store to Outputs.
- Added a photosynthesis sub-package
- Refactored plantcv.fluor_fvfm which is now plantcv.photosynthesis.analyze_fvfm to be consistent with the naming of other analysis functions. Also fixed a bug within this function. Previously, the function returned the Fm image to users. Now corrected so that Fv/Fm image is getting returned.
- Added support for CropReported fluorescence image data. This was achieved by adding a new function, called plantcv.photosynthesis.read_cropreporter, that reads in, reshapes, and pulls out fdark, fmin, and fmax from a .DAT file which also utilizing the metadata recorded about image data in the corresponding .INF file.
Version 3.10 breaking changes:
- Refactored plantcv.fluor_fvfm which is now plantcv.photosynthesis.analyze_fvfm to be consistent with the naming of other analysis functions. Input parameters are unchanged.
PlantCV v3.9.0
Version 3.9 updates:
plantcv.morphology.find_tips
andplantcv.morphology.find_branch_pts
now saves observations (a list of coordinates of the relevant points identified from a skeleton image) to the Outputs class.- Reworked the
plantcv.color_palette
function to use matplotlib colormaps instead, so users now have a wide range of coloring options.- Added three new parameters to
pcv.params
to controlcolor_palette
(and functions that use it). The parameters arecolor_scale
: the name of the colormap,color_sequence
: "sequential" or "random", andsaved_color_scale
: stores the last color scale. The latter is important for the morphology functions to plot results correctly as the colors of the segments need to get reused to match up from function to function.
- Added three new parameters to
- Add
plantcv.morphology.analyze_stem
- This function measures stem height, length, and angle from sorted segments of a skeletonized plant.
- Plots debug image that shows detected height and angle
- Internal updates to the
plantcv.transform.find_color_card
function- Updates to the contour sorting algorithm to compensate for changes in the outputs of the OpenCV function
cv2.minAreaRect
in version 3.4.10. Their updates were having implications in the sensitivity of the PlantCV algorithm and causing colorcards to stop being identified in example images. - This function now also stores observations to the Outputs class for the mean/median (user defined) color chip area, height, and width. This functionality should remove the need to to include a size marker for scaling measurements in images that already have a color card.
- Updates to the contour sorting algorithm to compensate for changes in the outputs of the OpenCV function
- Updates the documentation and README file to fix a few typos/formatting issues and update some content for relevance to the current version of PlantCV.
- Update/bugfix to
plantcv.hyperspectral.calibrate
- There was a mistake in the calibration code that resulted in the actual algorithm differing slightly from the proposed (raw-dark)/(white-dark).
- Now also truncate any negative values to 0
- PEP8 and other miscellaneous code cleanup to clear the way for GitHub Actions
- Replace prior continuous integration platform with GitHub Actions
- Add
plantcv.spatial_clustering
- New function that segments features of images based on their distance from each other.
- Takes a binary mask, minimum number of clusters, which algorithm to use (either “DBSCAN” or “OPTICS”), the maximum distance between two pixels before they can be considered part of the same cluster, and outputs a clustered image as well as the masks of each cluster.
- Update Dockerfile recipe to fix missing libGL dependency, which was causing an ImportError
- Update
plantcv.hyperspectral.read_data
, which is used ifmode=”ENVI”
duringplantcv.readimage
so that we now set a default wavelength units to “nm” to enable more flexibility in the image files that we can read in. - Bugfix to the data getting saved out to the
hue_circular_std
observation while runningplantcv.analyze_color
. - Add summary statistics to the observations recorded while running
plantcv.analyze_nir
so they now include mean, median, and stdev observations in the Outputs class while running NIR workflows. - Update the order of debug images plotted to match the order of outputs in
plantcv.rectangle_mask
andplantcv.threshold.*
. - Updated and improved documentation for the machine learning tutorial.
- Update
plantcv.threshold.custom_range
to be R,G,B instead of B,G,R - Added many new indices and completely restructured the spectral index family of options into their own functions beneath the
spectral_index
sub-package.- See here for the latest list of supported spectral indices.
- Add
plantcv.visualize.auto_threshold_methods
which aims to assist in streamlining workflow development. - Update input parameter in the function
plantcv.threshold.custom_range
fromrgb_img
toimg
since the function also works on grayscale images. - Internal enhancements to the
plantcv.hyperspectral.extract_index
to significantly increase speed and decrease memory needed for hyperspectral workflows. - Add
plantcv.stdev_filter
- Creates a grayscale image of pixel-wise standard deviation from a grayscale input image
- Made two small updates to
plantcv.utils.sample_images
- Removes newline characters from each row of
SnapshotInfo.csv
- Only appends rows of
SnapshotInfor.csv
to a list for random sampling if the row has image data records
- Removes newline characters from each row of
- Removed a Non-ascii character causing an error.
Version 3.9 breaking changes:
- Update input parameter in the function
plantcv.threshold.custom_range
fromrgb_img
toimg
since the function also works on grayscale images. - Removed
plantcv.hyperspectral.extract_index
and replaced it with theplantcv.spectral_index
subpackage (see above).