-
Notifications
You must be signed in to change notification settings - Fork 29
Hough_Line_Probabilistic Added #49
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
base: master
Are you sure you want to change the base?
Conversation
Thank you for taking the time to make a contribution. I've downloaded the paper so I can follow the code better. |
Codecov Report
@@ Coverage Diff @@
## master #49 +/- ##
==========================================
+ Coverage 97.28% 98.35% +1.07%
==========================================
Files 10 10
Lines 405 792 +387
==========================================
+ Hits 394 779 +385
- Misses 11 13 +2
Continue to review full report at Codecov.
|
I have updated the code adding comments and reference. Can you please review this PR? |
6e3580b
to
6638323
Compare
Could you also add some tests for this function please? Thanks for adding the comments---they will make it easier to verify the implementation. I haven't had the time yet to think about this more deeply, but at first glance your function seems very long and hence difficult to parse visually. Perhaps some of the steps ought to go into separate "helper" functions? |
@zygmuntszpak |
For the most basic validation you could organise your test so that there is only one line segment and maybe a few other scattered random points. You can seed the random number generator with a particular seed so that every time the experiment is run the same set of random points are generated. Presumably the algorithm should always find the only line segment in the example? You could then try another test with two line segments. Also, instead of |
de2ebab
to
e3b1a08
Compare
@zygmuntszpak I have added the required helper functions along with few test cases, as suggested. |
Thank you Rahul. Could you please move the functions that are currently defined inside |
@zygmuntszpak Sure, I can do that. But that will increase the number of arguments, I think. How about adding a separate file as "hough_line_submodules.jl" ? I can import required data and functions from there only. There is one more function in hough_line_standard written in nested form. |
I'm not sure I fully understand your separate file idea. I don't know to how best to resolve this, but I do feel that the code is one very long piece which gets in the way of interpreting its intent. Perhaps you could group some of the parameters in a Type if you feel the argument list to the helper functions is getting too long? |
@zygmuntszpak I have moved the nested functions outside, passing the arguments after wrapping the various parameters. |
I've checked your branch out and used the "Traceur.jl" package to check for Type stability. In particular, I ran The
Note, for example, the lines:
The problem is that In a nutshell, you don't want to to be changing the Type of a variable and furthermore, you don't want a variable to be identified as Thank you for your valuable time and effort. |
@zygmuntszpak Thanks for the info. I didn't know about this trace command. |
Hmm..not sure what is going on there. Did you do
|
@zygmuntszpak Yes, I did exactly the same thing. It's Traceur v0.1.1 here. I don't know why it's showing the same error with hough_transform_standard as well. |
That's odd, I am using the same version of Traceur and it works for me. The latest output is:
You can also try But the output of that in your case is very long. It does pick up that |
Implemented Hough_Line_Probabilistic in hough_transform.jl as proposed in the following paper:
Link.
Following are some of the results:



