Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add delta parameter to adaptive_threshold #637

Merged
merged 6 commits into from
May 23, 2024

Conversation

Dantsz
Copy link
Contributor

@Dantsz Dantsz commented May 22, 2024

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.

src/contrast.rs Outdated Show resolved Hide resolved
src/contrast.rs Outdated Show resolved Hide resolved
@theotherphil
Copy link
Contributor

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.

@Dantsz Dantsz changed the title Add adaptive_threshold_with_delta Add delta parameter to adaptive_threshold May 22, 2024
@theotherphil
Copy link
Contributor

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 :-)

@Dantsz Dantsz force-pushed the adaptive_threshold_with_delta branch from 4477632 to d37e988 Compare May 23, 2024 06:34
@theotherphil theotherphil merged commit 167efd0 into image-rs:master May 23, 2024
15 checks passed
@theotherphil
Copy link
Contributor

Thanks!

@Dantsz Dantsz deleted the adaptive_threshold_with_delta branch May 24, 2024 06:30
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.

3 participants