示例#1
0
def test_edge_nan():
    img = np.zeros((10, 10))
    img[:5] = 1
    img[0] = np.NaN
    grad_mag, edge_mask = _edge_detect(img)
    np.testing.assert_almost_equal(img[4], 1)
    assert (grad_mag[0] > 2).all()
def test_edge_nan():
    img = np.zeros((10, 10))
    img[:5] = 1
    img[0] = np.NaN
    grad_mag, edge_mask = _edge_detect(img)
    np.testing.assert_almost_equal(img[4], 1)
    assert_true((grad_mag[0] > 2).all())
示例#3
0
def test_edge_detect():
    img = np.zeros((10, 10))
    img[:5] = 1
    _, edge_mask = _edge_detect(img)
    np.testing.assert_almost_equal(img[4], 1)
示例#4
0
def test_edge_detect():
    img = np.zeros((10, 10))
    img[:5] = 1
    _, edge_mask = _edge_detect(img)
    np.testing.assert_almost_equal(img[4], 1)