Move template matching to feature subpackage

This commit is contained in:
Tony S Yu
2011-12-18 13:37:31 -05:00
parent 01d66fc501
commit e8461e22dd
9 changed files with 6 additions and 35 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ a simple peak extraction algorithm.
"""
import numpy as np
from skimage.detection import match_template
from skimage.feature import match_template
from numpy.random import randn
import matplotlib.pyplot as plt
-1
View File
@@ -1 +0,0 @@
from template import match_template
-31
View File
@@ -1,31 +0,0 @@
#!/usr/bin/env python
import os
from skimage._build import cython
base_path = os.path.abspath(os.path.dirname(__file__))
def configuration(parent_package='', top_path=None):
from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs
config = Configuration('detection', parent_package, top_path)
config.add_data_dir('tests')
cython(['_template.pyx'], working_path=base_path)
config.add_extension('_template', sources=['_template.c'],
include_dirs=[get_numpy_include_dirs()])
return config
if __name__ == '__main__':
from numpy.distutils.core import setup
setup(maintainer = 'scikits-image Developers',
author = 'scikits-image Developers',
maintainer_email = 'scikits-image@googlegroups.com',
description = 'detection',
url = 'https://github.com/scikits-image/scikits-image',
license = 'SciPy License (BSD Style)',
**(configuration(top_path='').todict())
)
+1
View File
@@ -2,3 +2,4 @@ from .hog import hog
from .greycomatrix import greycomatrix, greycoprops
from .peak import peak_local_max
from .harris import harris
from .template import match_template
+3
View File
@@ -12,9 +12,12 @@ def configuration(parent_package='', top_path=None):
config.add_data_dir('tests')
cython(['_greycomatrix.pyx'], working_path=base_path)
cython(['_template.pyx'], working_path=base_path)
config.add_extension('_greycomatrix', sources=['_greycomatrix.c'],
include_dirs=[get_numpy_include_dirs()])
config.add_extension('_template', sources=['_template.c'],
include_dirs=[get_numpy_include_dirs()])
return config
@@ -1,5 +1,5 @@
import numpy as np
from skimage.detection import match_template
from skimage.feature import match_template
from numpy.random import randn
-1
View File
@@ -16,7 +16,6 @@ def configuration(parent_package='', top_path=None):
config.add_subpackage('draw')
config.add_subpackage('feature')
config.add_subpackage('measure')
config.add_subpackage('detection')
def add_test_directories(arg, dirname, fnames):
if dirname.split(os.path.sep)[-1] == 'tests':