image-rs / imageproc

Image processing operations
MIT License
723 stars 144 forks source link

Add `delta` parameter to `adaptive_threshold` #637

Closed Dantsz closed 1 month ago

Dantsz commented 1 month ago

For #532 The opencv implementation seems to take the delta as float and rounds it differently based on if the thresholding is inverted or not, we don't have an inverted mode for this so passing delta as i32 should be fine.

theotherphil commented 1 month ago

Thanks! I think it would be better to just add the delta parameter to the existing function - it’s a breaking change but a trivial one for users to deal with.

theotherphil commented 1 month ago

We run nightly clippy and it looks like you’ve fallen foul of a newly added lint triggering on old code. However, the fix it recommends is trivial so please can you make the edit suggested and then I’ll merge this PR. Thanks for the PR :-)

theotherphil commented 1 month ago

Thanks!