image-rs / imageproc

Image processing operations
MIT License
758 stars 149 forks source link

Add `delta` parameter to `adaptive_threshold` #637

Closed Dantsz closed 6 months ago

Dantsz commented 6 months 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 6 months 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 6 months 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 6 months ago

Thanks!