Created
January 17, 2019 23:10
-
-
Save stefanv/63625caa6850f69ebf28da0fb65bd14b to your computer and use it in GitHub Desktop.
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
===================================================================================== FAILURES ====================================================================================== | |
______________________________________________________________________________ test_minor_axis_length _______________________________________________________________________________ | |
def test_minor_axis_length(): | |
length = regionprops(SAMPLE)[0].minor_axis_length | |
# MATLAB has different interpretation of ellipse than found in literature, | |
# here implemented as found in literature | |
> assert_almost_equal(length, 9.739302807263) | |
E AssertionError: | |
E Arrays are not almost equal to 7 decimals | |
E ACTUAL: 11.489125293076057 | |
E DESIRED: 9.739302807263 | |
src/scikit-image/skimage/measure/tests/test_regionprops.py:265: AssertionError | |
________________________________________________________________________________ test_min_intensity _________________________________________________________________________________ | |
def test_min_intensity(): | |
intensity = regionprops(SAMPLE, intensity_image=INTENSITY_SAMPLE | |
)[0].min_intensity | |
> assert_almost_equal(intensity, 1) | |
E AssertionError: | |
E Arrays are not almost equal to 7 decimals | |
E ACTUAL: 0 | |
E DESIRED: 1 | |
src/scikit-image/skimage/measure/tests/test_regionprops.py:258: AssertionError | |
________________________________________________________________________________ test_equiv_diameter ________________________________________________________________________________ | |
def test_equiv_diameter(): | |
diameter = regionprops(SAMPLE)[0].equivalent_diameter | |
# determined with MATLAB | |
> assert_almost_equal(diameter, 9.57461472963) | |
E AssertionError: | |
E Arrays are not almost equal to 7 decimals | |
E ACTUAL: 15.138795132120961 | |
E DESIRED: 9.57461472963 | |
src/scikit-image/skimage/measure/tests/test_regionprops.py:172: AssertionError | |
_________________________________________________________________________________ test_orientation __________________________________________________________________________________ | |
def test_orientation(): | |
orientation = regionprops(SAMPLE, coordinates='xy')[0].orientation | |
# determined with MATLAB | |
> assert_almost_equal(orientation, 0.10446844651921) | |
E AssertionError: | |
E Arrays are not almost equal to 7 decimals | |
E ACTUAL: -0.0 | |
E DESIRED: 0.10446844651921 | |
src/scikit-image/skimage/measure/tests/test_regionprops.py:299: AssertionError | |
_______________________________________________________________________________ test_moments_central ________________________________________________________________________________ | |
def test_moments_central(): | |
mu = regionprops(SAMPLE)[0].moments_central | |
# determined with OpenCV | |
> assert_almost_equal(mu[2, 0], 436.00000000000045) | |
E AssertionError: | |
E Arrays are not almost equal to 7 decimals | |
E ACTUAL: 1485.0 | |
E DESIRED: 436.00000000000045 | |
src/scikit-image/skimage/measure/tests/test_regionprops.py:99: AssertionError | |
______________________________________________________________________________ test_major_axis_length _______________________________________________________________________________ | |
def test_major_axis_length(): | |
length = regionprops(SAMPLE)[0].major_axis_length | |
# MATLAB has different interpretation of ellipse than found in literature, | |
# here implemented as found in literature | |
> assert_almost_equal(length, 16.7924234999) | |
E AssertionError: | |
E Arrays are not almost equal to 7 decimals | |
E ACTUAL: 20.752509888364507 | |
E DESIRED: 16.7924234999 | |
src/scikit-image/skimage/measure/tests/test_regionprops.py:240: AssertionError | |
____________________________________________________________________________ test_two_connectivity_holes ____________________________________________________________________________ | |
def test_two_connectivity_holes(): | |
expected = np.array([[0, 0, 0, 0, 0, 0, 1, 0, 0, 0], | |
[0, 1, 1, 1, 1, 1, 0, 0, 0, 0], | |
[0, 1, 0, 0, 1, 1, 0, 0, 0, 0], | |
[0, 1, 1, 1, 0, 1, 0, 0, 0, 0], | |
[0, 1, 1, 1, 1, 1, 0, 0, 0, 0], | |
[0, 0, 0, 0, 0, 0, 0, 1, 1, 1], | |
[0, 0, 0, 0, 0, 0, 0, 1, 1, 1], | |
[0, 0, 0, 0, 0, 0, 0, 1, 1, 1]], np.bool_) | |
observed = remove_small_holes(test_holes_image, area_threshold=3, | |
connectivity=2) | |
> assert_array_equal(observed, expected) | |
E AssertionError: | |
E Arrays are not equal | |
E | |
E (mismatch 3.75%) | |
E x: array([[False, False, False, False, False, False, True, False, False, | |
E False], | |
E [False, True, True, True, True, True, False, False, False,... | |
E y: array([[False, False, False, False, False, False, True, False, False, | |
E False], | |
E [False, True, True, True, True, True, False, False, False,... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment