Skip to main content

A package of image analysis algorithms suited for plants

Project description

LettuceSee

A package with high level functions for analyzing images of plants.

Example case

The following example showcases a miniature pipeline using lettuceSee and scikit-image functions.

Alt text

An image of lettuce affected with necrosis is loaded in as a numpy array. After removing the alpha layer, applying the shw_segmentation function from the segment module removes the background of the image.

from lettuceSee import segment
import skimage
import matplotlib.pyplot as plt

image = skimage.io.imread(
    r"C:\Users\chris\Documents\GitHub\tipburn_quantification\test_images"
    r"\rgb\51-78-Lettuce_Correct_Tray_074-RGB-Original_pos2_LK120.png")
image = skimage.util.img_as_ubyte(skimage.color.rgba2rgb(image))
bg_mask = segment.shw_segmentation(image)

Alt text

The initial segmentation looks decent, however there is still some background noise, as well as other plants intruding from the side. The function canny_central_ob is used to remove objects not attached to the central object, as well as connected objects with very different coloration.

bg_mask = segment.canny_central_ob(image=image, mask=bg_mask, sigma=2.5)

Alt text

After finishing the background segmentation, the function barb_hue is used to segment green from brown tissue through the method described in Barbedo, 2016.

necrosis_mask = segment.barb_hue(image=image, bg_mask=bg_mask, div=3)

Alt text

Installation

The package can be installed from the pypi test distribution trough:

python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ lettuceSee=0.0.12

Anaconda

There is no dedicated lettuceSee installation for anaconda, if you do want to install the package within anaconda the following method is recommended: First create a new environment following the anaconda documentation. Activate your fresh environment and install pip:

conda install pip

Following this run the usual command to install lettuceSee. Note that mixing conda and pip can lead to unexpected errors, as both are package managers. As such it is recommended to do further installations in this environment trough pip.

Recommended extras

For visualization of the images, matplotlib is recommended. LettuceSee handles images as numpy arrays, which can be directly visualized trough matplotlib.pyplot. Matplotlib is not included in the installation of lettuceSee, but can be installed trough:

pip install matplotlib

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lettuceSee-0.0.2.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

lettuceSee-0.0.2-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file lettuceSee-0.0.2.tar.gz.

File metadata

  • Download URL: lettuceSee-0.0.2.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for lettuceSee-0.0.2.tar.gz
Algorithm Hash digest
SHA256 61ed4c3f3cd8fbe3aa7b4d5c5c11b1e4e634835bfb9887920140a6f2ff246801
MD5 50b1342edfdd4db8516282d453dc9440
BLAKE2b-256 ee89537fad80cbf052a9757fce6b6474c257cf3416058dcef933e09239b1049c

See more details on using hashes here.

File details

Details for the file lettuceSee-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: lettuceSee-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for lettuceSee-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 74238819e11a48efa8222aa816dde78100b49a3f22dadd4990975ba31876178b
MD5 55fa84a78778228c6d90f9b8d88433b7
BLAKE2b-256 5ad6f8fe09e3f4df599cfe7dad59c15cebee06d41840f34902b27f48f1bfef68

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page