leaf-image-segmentation icon indicating copy to clipboard operation
leaf-image-segmentation copied to clipboard

Leaf Image Segmentation

Leaf Image Segmentation

Objective

  • Implement a technique that can segment(extract) leaf from an image containing leaf

Resources

Usage

  • python3 segment.py

Command structure

usage: segment [-h] [-m MARKER_INTENSITY] [-f {no,flood,threshold,morph}] [-s]
               [-d DESTINATION]
               image_source

positional arguments:
  image_source          A path of image filename or folder containing images

optional arguments:
  -h, --help            show this help message and exit
  -m MARKER_INTENSITY, --marker_intensity MARKER_INTENSITY
                        Output image will be as black background and
                        foreground with integer value specified here
  -f {no,flood,threshold,morph}, --fill {no,flood,threshold,morph}
                        Change hole filling technique for holes appearing in
                        segmented output
  -s, --smooth          Output image with smooth edges
  -d DESTINATION, --destination DESTINATION
                        Destination directory for output image. If not
                        specified destination directory will be input image
                        directory

Examples:

Command used: python3 segment.py 'some file or folder'

Input Images

alt Healthy Apple Leaf alt Apple Leaf with Black Rot

Output Images

alt Segmented Healthy Apple Leaf alt Segmented Apple Leaf with Black Rot