Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR addresses 4 issues. They follow the commits accordingly.
a
, and radial distance to a third pointd
, are incorrect.min_size
represents a radius, so it is directly comparable toa
. Perhaps the docstring should also be updated to clearly state this is a radius. As ford
, we should only consider third points which have a radial distance smaller than the presently considered major axisa
.a
andb
when it shouldn't. With updated login in 3, it is simpler to always keepa
the major axis,b
the minor axis, and adjust the orientation after to maintain it within the [-pi/2 : pi/2] interval.Checklist
These updates fail 3 tests.
test_hough_ellipse_zero_angle
I am unsure of the cause of this failure. When I run locally, the function returns the desired y0 position of 15. Error says it returns 17.test_hough_ellipse_non_zero_posangle1
This fails because I actively choose to return orientations in the [-pi/2 : pi/2] range, instead of [-pi : pi]. I think this test should either be updated, or I can adjust the code accordingly.test_hough_ellipse_non_zero_posangle2
This test should be updated. It actively seeks to compare the major axis field to the smaller axis value. The two generated radii are 6 and 12. The test looks for the major axis to be 6. My changes correctly return 12.Examples of other tests I ran locally that exemplify the failure of the current implementation (and necessitate these changes) include ellipses drawn on a
np.zeros([100, 100])
canvas. I used detection parametersmin_size=10
andmax_size=45
ellipse_perimeter(50, 50, 33, 30, -0.28)
ellipse_perimeter(45, 51, 35, 30, 1.42)
ellipse_perimeter(50, 50, 30, 20, 10/np.pi*180)
ellipse_perimeter(50, 50, 30, 20, 45/np.pi*180)
For reviewers
later.
__init__.py
.doc/release/release_dev.rst
.