Esempio n. 1
0
    def test_ellipse_fitting_Halir1998(self):
        """
        Tests :func:`colour.algebra.geometry.ellipse_fitting_Halir1998`
        definition.
        """

        np.testing.assert_almost_equal(ellipse_fitting_Halir1998(
            np.array([[2, 0], [0, 1], [-2, 0], [0, -1]])),
                                       np.array([
                                           0.24253563,
                                           0.00000000,
                                           0.97014250,
                                           0.00000000,
                                           0.00000000,
                                           -0.97014250,
                                       ]),
                                       decimal=7)
Esempio n. 2
0
    def test_ellipse_fitting_Halir1998(self):
        """
        Tests :func:`colour.algebra.geometry.ellipse_fitting_Halir1998`
        definition.
        """

        np.testing.assert_almost_equal(
            ellipse_fitting_Halir1998(
                np.array([[2, 0], [0, 1], [-2, 0], [0, -1]])),
            np.array([
                0.24253563,
                0.00000000,
                0.97014250,
                0.00000000,
                0.00000000,
                -0.97014250,
            ]),
            decimal=7)