Skip to content

Conversation

@bioinformatist
Copy link

Hey dears,

I enhanced the adaptive_threshold() function by introducing a new method, which is consistent with OpenCV's ADAPTIVE_THRESH_GAUSSIAN_C.

It seems the existing adaptive_threshold() function is equivalent to OpenCV's ADAPTIVE_THRESH_MEAN_C case. While effective, it weights all pixels in the neighborhood equally. This can be suboptimal for images with varying illumination or complex textures. For instance, I'm working on an app for segmenting pineapple fruitlets:

A pineapple's surface is composed of many small hexagonal segments, known as "fruitlets". Due to the pineapple's naturally bumpy texture, lighting across the surface is often uneven. When processing images of pineapples, a challenge emerged: the protrusions inside the fruitlets were difficult to distinguish from the puddles at the boundary, and the fruitlets were mistakenly separated.

The new method addresses my requirement very well: it results in a much cleaner and more accurate segmentation of the fruitlets, as it is better at preserving the true boundaries.

I believe the feature is general enough: adding it will also provides a powerful tool for all imageproc users who work with images containing textured surfaces or uneven illumination 😎

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