-
Notifications
You must be signed in to change notification settings - Fork 164
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 implementation of Hough transforms #512
Conversation
a79214f
to
b07c37e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@simmplecoder Here is my first round of comments to this PR. See also my question on Slack
2e951d2
to
ec8ed46
Compare
@mloskot, TravisCI seems a bit confused due to force push (I accidentally confused diffusion branch with Hough transform). The changes did pass tests on my repo: https://travis-ci.org/github/simmplecoder/gil/builds/721137117 |
I re-started builds on Travis CI and AzP. I am not able to restart builds on AppVeyor (it's owned by @stefanseefeld and I'm still not a member there :-)). Let's see how the restarted ones go. You could make a dummy change, a comment or re-format (e.g. east-const cleanup) and push to kickstart rebuild. |
e12a64a
to
f34e5c5
Compare
@simmplecoder Looks like recent merges created some conflicts for this PR. Would you be able to resolve them? If not, I can do it, just let me know. Other than that, I think it's ready to be merged. |
@mloskot Turns out I have been mistaken. I rebased off of current develop, shouldn't have problems with merge now. |
Support construction from step_size, step_count, and a function for angles
Implement angle and radious version of Hough line transform and adds a demo with static line that goes over secondary diagonal
Also account for case of zero coefficient
Naive and incremental algorithms were removed because they are supposed to produce the same results anyway. The reason for diverging results is inaccuracy of floating point numbers
Trigonometric circle rasterizer does not follow circle equation, but still produces very round shapes. A new testing methodology needs to be devised for this rasterizer
Fix improper mirroring in rasterization Fix overflow bug Implement proper image sizing
The line test used old free function version of the rasterization
The new version accepts start and points inclusively and tries to use canonic representation during computations
Slope decided to be is (diff_y + 1) / (diff_x + 1). License headers were also added
01e70b0
to
e517864
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @simmplecoder for your great efforts!
Support construction from step_size, step_count, and a function for angles Implement angle and radious version of Hough line transform and adds a demo with static line that goes over secondary diagonal. Implement incremental line raster Implement naive line raster Implement Bresenham line raster Leave only Bresenham line rasterization Naive and incremental algorithms were removed because they are supposed to produce the same results anyway. The reason for diverging results is inaccuracy of floating point numbers Add circle rendering through trigonometric functions, using arctan(1 / (radius + 1)) as minimal angle step. Trigonometric circle rasterizer does not follow circle equation, but still produces very round shapes. A new testing methodology needs to be devised for this rasterizer. The new version accepts start and points inclusively and tries to use canonic representation during computations. Slope decided to be is (diff_y + 1) / (diff_x + 1).
Support construction from step_size, step_count, and a function for angles Implement angle and radious version of Hough line transform and adds a demo with static line that goes over secondary diagonal. Implement incremental line raster Implement naive line raster Implement Bresenham line raster Leave only Bresenham line rasterization Naive and incremental algorithms were removed because they are supposed to produce the same results anyway. The reason for diverging results is inaccuracy of floating point numbers Add circle rendering through trigonometric functions, using arctan(1 / (radius + 1)) as minimal angle step. Trigonometric circle rasterizer does not follow circle equation, but still produces very round shapes. A new testing methodology needs to be devised for this rasterizer. The new version accepts start and points inclusively and tries to use canonic representation during computations. Slope decided to be is (diff_y + 1) / (diff_x + 1).
Description
Adds Hough line, circle and ellipse transforms. Also adds support for line and circle rasterization
References
http://groups.csail.mit.edu/graphics/classes/6.837/F02/lectures/6.837-7_Line.pdf
https://en.wikipedia.org/wiki/Hough_transform#:~:text=The%20Hough%20transform%20is%20a,shapes%20by%20a%20voting%20procedure.
Tasklist
- [ ] Implement Hough ellipse transform[ ] Test Hough ellipse transform