Releases: danforthcenter/plantcv
Releases · danforthcenter/plantcv
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).
PlantCV v3.8.0
- Fixed a few missing pages and broken links within the documentation.
- Add
plantcv.hyperspectral.analyze_index
- This function now accepts min/maximum bin labels, or can auto-calculate bins based on image data range.
- Collects frequency data for all integrated indices (mean, median, std, frequency).
- Optionally plots a histogram of frequency values.
- Add links to source code throughout documentation pages. This allows users to more easily find the raw, source code for those interested in learning more of the mechanics of a function than the documentation page provides.
- Adds a
border_width
parameter toplantcv.within_frame
.- Allows the user to specify how many pixels from the image edge they want to consider for detecting out-of-frame objects.
- The default is 1 px, which maintains the previous default behavior.
- Made some updates to the documentation based on usage on Windows.
- Update dependencies in
requirements.txt
- Add
plantcv.roi.roi2mask
which allows user to create a binary mask from any contour. - Added
plantcv.plantcv.visualize.colorspaces
which- Used to quickly view all potential colorspaces, that are often used for thresholding/object segmentation steps.
- Plots out an image will all potential colorspaces, labeled with which colorspace each is, next to the original image.
- Add indices to the
plantcv.hyperspectral.extract_index
function- Add PRI (Photochemical reflectance index)
- Add ARI (anthocyanin reflectance index)
- Add ACI (anthocyanin content index)
- Add and update
plantcv.hyperspectral.analyze_spectral
function- Was storing out information, mainly about the global statistics like the maximum reflectance value for the entire datacube.
- Average reflectance per band was the only per-band measurement that we had been doing but really most of the stats could be per-band rather than global.
- Modify various .npz test data files in code tests (avoid using Numpy object arrays and the pickle module)
- In plantcv.transform.create_color_card_mask() the exclude input option required users to input excluded color chip IDs in descending numerical order.
- Adds
plantcv.threshold.saturation
function for masking saturated pixels.- Any channel at or above a certain threshold
- All channels at or above a certain threshold.
- The user can also pick this threshold (default = 255).
PlantCV v3.7.0
- Dropped Python v2.7 support (https://python3statement.org/).
- Added a Hyperspectral tool sub-package:
- Read in ENVI hyperspectral data with new option for the existing
plantcv.readimage
function. While reading in hyperspectral data a pseudo-rgb image is also created. - Calibrate raw hyperspectral image data with white and dark reference images with
plantcv.hyperspectral.calibrate
. - Calculate indices (e.g. NDVI) from a hyperspectral datacube with
plantcv.hyperspectral.extract_index
. - Extract bands from a hyperspectral datacube that are the closest to user defined wavelengths with
plantcv.hyperspectral.extract_wavelength
. - Add functionality to the existing function
plantcv.apply_mask
that allows users to mask hyperspectral images. - Add documentation pages and edit existing documentation pages to reflect all additions.
- Add a hyperspectral workflow tutorial.
- Read in ENVI hyperspectral data with new option for the existing
- Add documentation
- Underlying functions used in
plantcv-workflow
. - Information about updating PlantCV.
- Underlying functions used in
- Minor update to
plantcv.morphology.segment_sort
to ensure the function is robust. - Enhance various region of interest
plantcv.roi.*
functions to draw the debug image before hitting the fatal error when an ROI extends beyond the image boundaries and start printing a warning if a user defined grid causes ROI's to overlap
PlantCV v3.6.2
- Documentation updates.
- Coerce n to be an integer in
plantcv.util.sample_images
function. - Add regex metadata parsing option to PlantCV workflow.
- Add ISO standard for timestamp separator.
- Minor bug fixes.
PlantCV v3.6.1
- Add a new template for opening an issue for discussions, requesting a new feature, and for reporting an issue/requesting help.
- Give more detail in documentation (how to change version of documentation, types of images compatible with workflow parallelization, example batch script for windows).
- Updates to
plantcv.analyze_color
. Users are given the option to create histograms from data about all available colorspaces or just a subset but data was getting stored out for all channels regardless of the selected colorspace. Update so that only data requested gets saved out (since color frequency data is verbose). - Update method for
plantcv.apply_mask
to make it more robust to the types of data that can get masked. - Bugfix with
plantcv.cluster_contours
to allow number of row and/or columns to exceed 9. - Update method for
plantcv.roi_objects
since the old algorithm fails when a ROI is small enough to be fully enclosed by a contour. - Bugfix for the sorting algorithm within
plantcv.morphology.segment_insertion_angle
since it was overly sensitive. - Update docker.
PlantCV v3.6.0
PlantCV v3.6.0 adds new functionality and fixes several bugs.
Summary of changes
- Updated
pcv.visualize.pseudocolor
to stop scaling the background values - Add image dataset random sampling tool
plantcv-utils.py sample_images
- Added custom ROI polygon tool
pcv.roi.custom
- Added grayscale image value rescaling function
pcv.transform.rescale
- Fixed bug in
pcv.roi_objects
for evaluating the largest contour - Fixed bugs in documentation
- Added function for correcting for non-uniform illumination
pcv.nonuniform_illumination
- Restricted scikit-image dependency to v0.14.2 to bypass an issue with v0.14.3 in Windows
- Added function to generate kernel structuring elements
- Added pip to conda environment dependencies in
environment.yml
- Added improvements to
pcv.morphology
functions- Make it optional for the first segment to be classified as stem regardless in the segment_sort function
- Update method for sorting through segments in the segment_insertion_angle function, makes it quicker and more robust to measuring every leaf.
- Update plotting method for segment_id since the previous method can give a weird artifact when plotting segments that have been combined.
- Update pruning function
- Removing old warnings that aren't really relevant anymore