mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-02 09:04:31 +08:00
Move template matching to feature subpackage
This commit is contained in:
@@ -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 +0,0 @@
|
||||
from template import match_template
|
||||
@@ -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())
|
||||
)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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':
|
||||
|
||||
Reference in New Issue
Block a user