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 separate apply and calculate threshold methods #59

Open
volks73 opened this issue Jan 12, 2023 · 0 comments
Open

Add separate apply and calculate threshold methods #59

volks73 opened this issue Jan 12, 2023 · 0 comments

Comments

@volks73
Copy link
Contributor

volks73 commented Jan 12, 2023

The image processing threshold methods are defined as traits for the ArrayBase and Image types that use the Otsu and Mean algorithms for calculating a threshold value and immediately applying the threshold. It could be useful to break out the one defined method into an "apply" and "calculate" methods, so that the threshold value could be calculated and obtained without immediately applying it to the image or array.

For example, the fn threshold_otsu would become:

...
fn threshold_calculate_otsu(&self) -> Result<f64, Error>;

fn threshold_apply_otsu(&self) -> Result<Self::Output, Error>;
...

The threshold_apply_otsu would be the same as the current threshold_otsu method, but the threshold_calculate_otsu method would simply return the threshold value, which could be used to do additional image processing or explicitly applied to an image using the new-ish threshold_apply method from PR #56.

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

No branches or pull requests

1 participant