image-rs / imageproc

Image processing operations
MIT License
735 stars 145 forks source link

Add threshold mode for image contrast like opencv threshold #574

Closed spartajet closed 4 months ago

spartajet commented 4 months ago

I can add more threshold mode like opencv threashold method.

https://docs.opencv.org/4.x/d7/d1b/group__imgproc__misc.html#gaa9e58d2860d4afa658ef70a9b1115576

cospectrum commented 4 months ago

In addition to ThresholdType, there are also maxval and adaptiveMethod arguments, and besides this, it looks like not all ThresholdType options that are allowed in threshold are allowed by adaptiveThreshold (only THRESH_BINARY or THRESH_BINARY_INV), which will already violate the totality of the pattern matching.

First we need to agree on what the function signatures and types will look like, and only then move on to implementation.

spartajet commented 4 months ago

I have apply a pull request, #575

theotherphil commented 4 months ago

Implemented in https://github.com/image-rs/imageproc/pull/575