NematodeMorphoAnalyzer
𧬠Nematode morpho analysis tool
NematodeMorphoAnalyzer is an open-source Python project designed to automatically analyze nematode images and extract morphological features such as body length, width, and tail shape. The pipeline applies specific procedures depending on the coiling level (Level 1, Level 2, or Level 3) assigned to each sample.
π― Highlights
π Feature | π§Ύ Description |
---|---|
π§ Morphological Analysis | Automatically detects morphological features from raw images |
π Coiling Level Handling | Applies different analysis routines for each nematode coiling level |
π Precise Measurements | Calculates length, width, area, tail geometry, and more |
πΌοΈ Image Processing | Uses OpenCV , skimage , PIL , and matplotlib for preprocessing and visualization |
π Structured Export | Saves results as structured tables using pandas |
βοΈ Workflow Overview
- Image Loading: Reads input images and associated metadata (e.g. coiling level).
- Preprocessing: Inversion, binarization, skeletonization, and morphological cleanup.
- Feature Detection: Measures width, length, area, tail shape, and more.
- Conditional Processing: Applies analysis routines based on coiling level.
- Output & Export: Generates CSV summaries and optionally annotated images.
π Project Structure
nematode_morpho_analyzer/
βββ data/ # Input images and metadata
β βββ level1/
β βββ level2/
β βββ level3/
βββ outputs/ # Results (CSV files, annotated images)
βββ src/ # Main source code
β βββ main.py # Main entry point
βββ assets/ # Documentation assets (e.g., images)
β βββ img/
βββ requirements.txt # Python dependencies
βββ README.md
π₯οΈ Sample Output Table
Image ID | Coiling Level | Length (px) | Avg Width (px) | Tail Shape | Area (pxΒ²) |
---|---|---|---|---|---|
sample001.png | Level 1 | 435 | 28.5 | tapered | 8120 |
sample002.png | Level 3 | 310 | 35.2 | rounded | 8904 |