Re: Error executing plot_circular_hough_transform.py
Hi Stéfan, I tried with the latest version. It worked fine. Thank you. Hi Tony, I did not understand what r's value should be. Could you please elaborate? I am new to skikit-image as well as numpy. Ravi On Saturday, July 27, 2013 6:10:50 AM UTC+5:30, Tony S Yu wrote:
On Jul 26, 2013 8:52 AM, "Stéfan van der Walt" <ste...@sun.ac.za<javascript:>> wrote:
Hi Ravi
On Fri, Jul 26, 2013 at 3:13 PM, Ravi Prakash <praks.p...@gmail.com<javascript:>>
wrote:
Traceback (most recent call last): File "plot_circular_hough_transform.py", line 69, in <module> image[cy, cx] = (220, 20, 20) IndexError: index 102 is out of bounds for axis 0 with size 95
I am at version skimage 0.8.2, Python 2.7.2+, os: Linux Mint 12 Lisa.
Could you try with the latest version from GitHub? It might have been a bug in 0.8.2.
Stéfan
--
Just to expand on Stefan's reply: the old implementation (0.8) searched for any part of the circle in the image, so the center could as much as "r" outside the image. You can convert the 0.8 result to the 0.9 result with
hough_result = hough_result[r:-r, r:-r]
Best, Tony
You received this message because you are subscribed to the Google Groups "scikit-image" group. To unsubscribe from this group and stop receiving emails from it, send an email to scikit-image...@googlegroups.com <javascript:>. For more options, visit https://groups.google.com/groups/opt_out.
Le 27/07/2013 08:58, Ravi Prakash a écrit :
Hi Stéfan,
I tried with the latest version. It worked fine. Thank you.
Hi Tony,
I did not understand what r's value should be. Could you please elaborate? I am new to skikit-image as well as numpy.
r is the larger radius you pass to the function. In the first implementation, it looks for centers everywhere it is possible. You can imagine you have a arc near an edge, the center is 'outside' the frame. If I remember correctly, we changed the API such that this behaviour is not the default one (because the resulting picture has not the same size as the original, but size + 2r), and that's confusing. And I remember I also fixed a bug, but I can't remember if it was before the release or not. I must check the log. -- François Boulogne. http://www.sciunto.org GPG fingerprint: 25F6 C971 4875 A6C1 EDD1 75C8 1AA7 216E 32D5 F22F
Thank you, François. Got it. Ravi On Sunday, July 28, 2013 1:46:27 AM UTC+5:30, François Boulogne wrote:
Le 27/07/2013 08:58, Ravi Prakash a écrit :
Hi Stéfan,
I tried with the latest version. It worked fine. Thank you.
Hi Tony,
I did not understand what r's value should be. Could you please elaborate? I am new to skikit-image as well as numpy.
r is the larger radius you pass to the function. In the first implementation, it looks for centers everywhere it is possible. You can imagine you have a arc near an edge, the center is 'outside' the frame. If I remember correctly, we changed the API such that this behaviour is not the default one (because the resulting picture has not the same size as the original, but size + 2r), and that's confusing. And I remember I also fixed a bug, but I can't remember if it was before the release or not. I must check the log.
-- François Boulogne. http://www.sciunto.org GPG fingerprint: 25F6 C971 4875 A6C1 EDD1 75C8 1AA7 216E 32D5 F22F
participants (2)
-
François Boulogne
-
Ravi Prakash