Bug in regionprops

Tony Yu tsyu80 at gmail.com
Sat Aug 4 10:42:15 EDT 2012


On Thu, Aug 2, 2012 at 9:28 PM, Tony Yu <tsyu80 at gmail.com> wrote:

>
>
> On Tue, Jul 31, 2012 at 4:42 AM, Stéfan van der Walt <stefan at sun.ac.za>wrote:
>
>> Hi Jeff
>>
>> On Jul 31, 2012 9:07 AM, "jeff witz" <witzjean at gmail.com> wrote:
>> >
>> > I must use regionprops in order to identify a lot of el
>>
>>> Hello,
>>>
>>> I must use regionprops in order to identify a lot of ellipse in a
>>> picture. I have constated a mistake in the implementation of the
>>> 'Orientation' identification.
>>> in skimage/measure/_regionprops.py at line 298 the function atan is used
>>> to recover the angle. In my case I constate that a lot of the ellipse are
>>> correctly identified using atan, but in some cases the 'MinorAxisLength'
>>> and the 'MajorAxisLength' are swapped. You can solve this issue using the
>>> atan2 function that take into account the trigonometric quadrant.
>>>
>>> Best Regards,
>>>
>>>
>>>
>>> Hi Jeff,
>
> Thanks for the bug report. Johannes just added a PR to fix this issue:
>
> https://github.com/scikits-image/scikits-image/pull/238
>
> Do you have a short, self-contained example that you could submit as a
> test. If you're comfortable with git, you can submit a PR to his branch
> with the test. If not, maybe you could just post the example to this list,
> and one of us can add it to the PR?
>
> Thanks,
> -Tony
>

For some reason, Johannes's emails aren't showing up on the list, so I'll
follow up to prevent duplicate work: Johannes added a test, and PR 238 has
been merged.

Cheers,
-Tony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20120804/42bfbb8c/attachment.html>


More information about the scikit-image mailing list