mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-13 12:40:24 +08:00
Added forward and inverse 2-D Finite Radon Transform
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import numpy as np
|
||||
from numpy.testing import *
|
||||
|
||||
from scikits.image.transform import *
|
||||
|
||||
def test_frt():
|
||||
SIZE = 59
|
||||
try:
|
||||
import sympy.ntheory as sn
|
||||
assert sn.isprime(SIZE) == True
|
||||
except ImportError:
|
||||
sn = False
|
||||
|
||||
# Generate a test image
|
||||
L = np.tri(SIZE, dtype=np.int32) + np.tri(SIZE, dtype=np.int32)[::-1]
|
||||
f = frt2(L)
|
||||
fi = ifrt2(f)
|
||||
assert len(np.nonzero(L-fi)[0]) == 0
|
||||
Reference in New Issue
Block a user