Skip to content

AMIRMAHMOUDINIA/plant-cell-pattern-image-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quantitative Image Analysis of Plant Cell and Tissue Patterning

This project is a small Python workflow for analysing plant cell and tissue patterning from microscopy-style images. The goal is to move from a visual description of tissue organisation to measurable features such as cell area, circularity, eccentricity, orientation, and local cell density.

I built this as a compact image-analysis project connected to plant developmental biology and regeneration. In regeneration studies, cellular organisation matters: cell size, shape, orientation, local density, and spatial patterning can all provide clues about how tissues reorganise after a developmental or experimental stimulus. This repository does not claim to detect regeneration directly. It demonstrates a reproducible workflow for extracting cell- and tissue-level descriptors that could be useful when analysing plant microscopy images.

The example images included here are synthetic microscopy-style plant tissue images. I used synthetic data deliberately so that the complete project can run without proprietary microscopy data. The same workflow can be adapted to real plant tissue images by replacing the files in data/raw/.

Project aims

The project demonstrates how to:

  • preprocess plant tissue images,
  • segment cell-like regions,
  • extract morphology and spatial-patterning features,
  • visualise cell area, shape, orientation, and local density,
  • organise outputs in a reproducible GitHub-style workflow.

Biological motivation

Plant regeneration is not only a molecular process. It also involves changes in cellular organisation, tissue patterning, and developmental state. When microscopy images are available, image analysis can help quantify these patterns instead of relying only on visual inspection.

The features extracted here are simple but biologically interpretable:

Feature Interpretation
Area Approximate cell size
Perimeter Boundary complexity / cell outline length
Circularity How close the object is to a circular shape
Eccentricity How elongated the object is
Orientation Main axis direction of elongated objects
Local density Number of nearby cells within a defined radius
Centroid position Spatial location of each segmented cell

These features are not sufficient on their own to explain regeneration, but they can support downstream analysis of tissue organisation, cellular patterning, and treatment-level differences.

Repository structure

plant-cell-pattern-image-analysis/
│
├── README.md
├── requirements.txt
├── environment.yml
├── LICENSE
├── .gitignore
│
├── data/
│   ├── raw/
│   │   ├── synthetic_regular_tissue.png
│   │   ├── synthetic_polarized_tissue.png
│   │   └── synthetic_dense_patch_tissue.png
│   └── processed/
│       ├── cell_features_all_images.csv
│       └── feature_summary_by_image.csv
│
├── figures/
│   ├── preprocessing_steps.png
│   ├── segmentation_overlay.png
│   ├── cell_area_distribution.png
│   ├── orientation_distribution.png
│   ├── local_density_map.png
│   └── feature_summary_panel.png
│
├── notebooks/
│   ├── 01_image_preprocessing.ipynb
│   ├── 02_segmentation_and_features.ipynb
│   └── 03_pattern_visualisation.ipynb
│
├── scripts/
│   └── run_all.py
│
└── src/
    └── plant_cell_analysis/
        ├── __init__.py
        ├── synthetic_data.py
        ├── image_processing.py
        ├── feature_extraction.py
        └── plotting.py

Notebooks

1. Image preprocessing

The first notebook loads a synthetic plant tissue image and applies basic preprocessing steps:

  • grayscale conversion,
  • contrast enhancement,
  • denoising,
  • thresholding,
  • cleaning of small objects.

This notebook is mainly about understanding how preprocessing affects the quality of segmentation.

2. Segmentation and feature extraction

The second notebook segments cell-like regions and extracts quantitative features for each object. The resulting feature table includes area, perimeter, circularity, eccentricity, orientation, centroid coordinates, and local density.

The output is saved as:

data/processed/cell_features_all_images.csv

3. Pattern visualisation

The third notebook visualises the extracted features and compares three synthetic tissue patterns:

  • regular tissue,
  • polarized / elongated tissue,
  • tissue with a dense local patch.

The purpose is to show how image-derived features can describe differences in tissue organisation.

How to run the project

Create an environment and install the required packages:

pip install -r requirements.txt

Then regenerate all raw images, processed tables, and figures:

python scripts/run_all.py

Alternatively, open the notebooks in order:

notebooks/01_image_preprocessing.ipynb
notebooks/02_segmentation_and_features.ipynb
notebooks/03_pattern_visualisation.ipynb

Main outputs

Running the project creates synthetic raw plant tissue images, segmentation overlays, cell-level feature tables, summary statistics by image, and feature visualisations for area, orientation, and local density.

Image preprocessing workflow

Image preprocessing workflow

This figure shows the main preprocessing steps used before segmentation: original image, contrast enhancement, denoising, binary mask generation, and labelled cell-like regions.

Segmentation overlay

Segmented cell-like regions

The red outlines show the segmented cell-like regions overlaid on the original microscopy-style image. This is useful for checking whether the segmentation is biologically reasonable before interpreting numerical features.

Cell area distribution

Cell-like region area distribution

This plot shows the distribution of segmented region areas. It provides a quick check of whether detected objects fall within a plausible size range or whether the segmentation produced many small artefacts.

Feature summary across synthetic tissue patterns

Feature summary panel

This panel compares the three synthetic tissue examples: regular tissue, polarized tissue, and tissue with a dense local patch. The comparison is based on the number of segmented regions, mean area, mean eccentricity, and mean local density.

Spatial map of local density

Spatial map of local density

This map shows local cell density based on centroid positions. It is included as a simple example of how spatial organisation can be quantified beyond individual cell shape.

Orientation distribution

Orientation distribution

This histogram summarises the orientation of elongated cell-like regions. Orientation can be useful when studying directional tissue organisation or polarity-like patterning.

What I learned from this project

This project helped me practise turning biological image information into structured quantitative data. The most useful part was seeing how strongly preprocessing choices influence downstream segmentation and feature extraction. It also made clear that image analysis should be interpreted carefully: a clean feature table does not automatically mean the biological interpretation is correct.

For plant regeneration research, this type of workflow could be useful as a first step before more advanced analyses using real microscopy images, reporter lines, cell-lineage information, or experimental treatment comparisons.

Limitations

This is a demonstration workflow, not a validated biological analysis pipeline. Important limitations include:

  • the example images are synthetic, not real microscopy data,
  • segmentation is based on classical image processing rather than a trained model,
  • cell boundaries are simplified,
  • no real regeneration treatment is analysed,
  • no gene-expression or hormone-reporter data are included,
  • feature values should be interpreted qualitatively.

Possible extensions

Future versions could include:

  • analysis of real confocal or bright-field plant tissue images,
  • comparison between control and regeneration-induced tissues,
  • integration with Cellpose or other deep-learning segmentation tools,
  • 2D spatial statistics of cell organisation,
  • tracking of cell division patterns over time,
  • coupling image features with hormone-reporter intensity,
  • automated quality control for segmentation results.

Project context

This repository is part of my effort to strengthen my computational image-analysis skills for plant developmental biology and regeneration-related research.

About

A Python workflow for quantifying plant cell and tissue patterning features from microscopy-style images.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors