Skip to content

Feature/elen thresholding#152

Open
abdullahelen wants to merge 2 commits intoluispedro:mainfrom
abdullahelen:feature/threshold-elen
Open

Feature/elen thresholding#152
abdullahelen wants to merge 2 commits intoluispedro:mainfrom
abdullahelen:feature/threshold-elen

Conversation

@abdullahelen
Copy link

Summary

This pull request adds a new global thresholding function, elen(), based on the method proposed by Elen & Dönmez (2024). It is implemented in thresholding.py and designed to align with Mahotas' thresholding interface.


Changes Made

  • ✅ Added elen() function to thresholding.py
  • ✅ Included unit test in test_thresholding.py
  • ✅ Updated __all__ list to expose the new method

Method Description

The method works by:

  • Computing the global mean and standard deviation of the image histogram
  • Defining an α-region: [mean − std, mean + std]
  • Computing average intensities of α and β (peripheral) regions
  • Setting the threshold as the mean of the α and β regional averages

Example Usage

import mahotas
t = mahotas.elen(image)
binary = (image > t)

Add elen thresholding method based on Elen & Donmez (2024)
Add unit test for elen thresholding method.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant