-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Addresses issue #5. Slicing image.shape with [0:1] only selects the first dimension. So all four elements of the corners array were always scaled by the first dimension of the image, resulting in a potentially incorrect value for maxRadius depending on the center, which also leads to different image sizes for the polar image. Slicing with [0:2] uses both image dimensions and creates accurate corners values and fixes these issues. I created a test, TestPolarConversion.test_final_radius(), that fails with the old slicing and succeeds with the new. With this particular image, the center used in test_default ([401, 365]) leads to the same value independent of slicing, so I used an arbitrary center of [350, 365] instead. I noticed all of the tests were failing because the "horizontalLines.png" and "checkerboard.png" images are not included in the repository, so I commented those out. Also, the indentation of the main function call in "test_polarTransform.py" was indented under theTestPointConversion class, so I don't think all of the tests were running. I changed that as well.
- Loading branch information
1 parent
87459ca
commit 0216611
Showing
2 changed files
with
25 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters