A multi-scale ridge detector for identifying curvilinear structures in images
Project description
Multi-Scale Ridge Detector
Overview
This repository contains the Python implementation of a multi-scale ridge detector designed for identifying and measuring curvilinear structures in images across various fields including medical imaging and remote sensing. For more detailed information, please refer to the following literature:
[1] Steger, Carsten. "An unbiased detector of curvilinear structures." IEEE Transactions on Pattern Analysis and Machine Intelligence, 20(2), pp. 113-125, 1998.
[2] Lindeberg, Tony. "Edge detection and ridge detection with automatic scale selection." International Journal of Computer Vision, 30, pp. 117-156, 1998.
[3] Sato, Yoshinobu, et. al. "Three-dimensional multi-scale line filter for segmentation and visualization of curvilinear structures in medical images." Medical Image Analysis, 2(2), pp. 143-168, 1998.
This Python implementation offers a multi-scale adaptation of the ImageJ ridge detection plugin. The detection is more accuracy compared to the ImageJ plugin (in almost all cases we have tested :)) and faster than another Python implementation ridge-detection.
Installation
Prerequisites
- Python 3.8 or higher
- Opencv & scikit-image
Install via pip:
pip install ridge-detector
or
pip install git+https://github.com/lxfhfut/ridge-detector.git
Usage:
from ridge_detector import RidgeDetector
det = RidgeDetector(line_width=[1, 2, 3], # Line widths to detect
low_contrast=100, # Lower bound of intensity contrast
high_contrast=200, # Higher bound of intensity contrast
min_len=10, # Ignore ridges shorter than this length
max_len=0, # Ignore ridges longer than this length, set to 0 for no limit
dark_line=True, # Set to True if detecting black ridges in white background, False otherwise
estimate_width=True, # Estimate width for each detected ridge point
extend_line=True, # Tend to preserve ridges near junctions if set to True
correct_pos=False, # Correct ridge positions with asymmetric widths if set to True
)
det.detect_lines("path_to_image_or_image_data_in_numpy_array")
det.show_results()
det.save_results("directory_to_store_results") # Comment out if you want to save the detection results
Demonstrations
| Original | Ridges & Widths | Binary Ridges | Binary Widths |
|---|---|---|---|
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ridge_detector-0.1.3.tar.gz.
File metadata
- Download URL: ridge_detector-0.1.3.tar.gz
- Upload date:
- Size: 43.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8be7415f3a5ea916c2fca36732f123ba07a9dd682492435f30c2b376d532caeb
|
|
| MD5 |
292c6db09cf44939ba9f159a8ef1e292
|
|
| BLAKE2b-256 |
05df835efd662b127135efa8d3956f629e092269c024bd693515f9336d2a38e0
|
File details
Details for the file ridge_detector-0.1.3-py3-none-any.whl.
File metadata
- Download URL: ridge_detector-0.1.3-py3-none-any.whl
- Upload date:
- Size: 42.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
548606573f439609b3b7398fe4ace8a50988643ffd76e15b5e63056979cef6a3
|
|
| MD5 |
ff0c352e355827250204122327e03181
|
|
| BLAKE2b-256 |
6cfbaee4d9834ebe474e9157439ad561163d022657be4d8626a07f4b0d58d56c
|