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

deskew confidence? #413

Open
DiTo97 opened this issue Jun 5, 2023 · 7 comments
Open

deskew confidence? #413

DiTo97 opened this issue Jun 5, 2023 · 7 comments
Labels
pull request welcome A pull request is welcome to fix this issue

Comments

@DiTo97
Copy link

DiTo97 commented Jun 5, 2023

Hi @sbrunner,

Is there a way to retrieve the deskew confidence?

It would make it much easier to avoid rotating the image when the confidence in the skew angle is low.

@sbrunner
Copy link
Owner

sbrunner commented Jun 5, 2023

Good question,

Currently, there is nothing like it, but it will be a great improvement :-)

@sbrunner sbrunner added the pull request welcome A pull request is welcome to fix this issue label Jun 5, 2023
@DiTo97
Copy link
Author

DiTo97 commented Jun 5, 2023

Do you have any pointers on how such a confidence should be implemented?

I may imagine something like the rate of adherence of the maximum peak's frequency against that of all other peaks...

@DiTo97
Copy link
Author

DiTo97 commented Jun 5, 2023

I guess a softmax on the freqs dictionary will do it for now, turning the number of occurrences into probabilities

@sbrunner
Copy link
Owner

sbrunner commented Jun 5, 2023

Or an addition of the dist on the same angle?
https://github.com/sbrunner/deskew/blob/master/deskew/__init__.py#L48

@DiTo97
Copy link
Author

DiTo97 commented Jun 5, 2023

Or an addition of the dist on the same angle? https://github.com/sbrunner/deskew/blob/master/deskew/__init__.py#L48

Do you mean summing the distances for each angle instead of summing ones as you do in the freqs array? Then, softmax?

What is the rationale behind summing distances and confidence, tho?

@sbrunner
Copy link
Owner

sbrunner commented Jun 5, 2023

Yes, if the line concerned is long, it's more confident than if it's short, not?

@DiTo97
Copy link
Author

DiTo97 commented Jun 5, 2023

I just don't see how the $\rho$ parameters (the dists array) of the lines parameterized as $(\rho, \theta)$ in Hough space, or their magnitude (short or long), would relate to the detection confidence of the skew angle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pull request welcome A pull request is welcome to fix this issue
Projects
None yet
Development

No branches or pull requests

2 participants