vtool-ibeis 2.2.1__py3-none-any.whl → 2.3.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- vtool_ibeis/__init__.py +1 -1
- vtool_ibeis/blend.py +1 -1
- vtool_ibeis/coverage_grid.py +2 -2
- vtool_ibeis/coverage_kpts.py +17 -16
- vtool_ibeis/demodata.py +3 -3
- vtool_ibeis/features.py +3 -4
- vtool_ibeis/geometry.py +3 -9
- vtool_ibeis/histogram.py +2 -2
- vtool_ibeis/image.py +38 -38
- vtool_ibeis/image_filters.py +10 -6
- vtool_ibeis/inspect_matches.py +2 -2
- vtool_ibeis/matching.py +13 -9
- vtool_ibeis/nearest_neighbors.py +4 -2
- vtool_ibeis/patch.py +11 -23
- vtool_ibeis/quality_classifier.py +2 -2
- vtool_ibeis/segmentation.py +1 -1
- vtool_ibeis/spatial_verification.py +4 -6
- vtool_ibeis-2.3.0.dist-info/METADATA +561 -0
- vtool_ibeis-2.3.0.dist-info/RECORD +42 -0
- {vtool_ibeis-2.2.1.dist-info → vtool_ibeis-2.3.0.dist-info}/WHEEL +1 -1
- vtool_ibeis-2.2.1.dist-info/METADATA +0 -435
- vtool_ibeis-2.2.1.dist-info/RECORD +0 -42
- {vtool_ibeis-2.2.1.dist-info → vtool_ibeis-2.3.0.dist-info}/LICENSE +0 -0
- {vtool_ibeis-2.2.1.dist-info → vtool_ibeis-2.3.0.dist-info}/top_level.txt +0 -0
vtool_ibeis/__init__.py
CHANGED
|
@@ -5,7 +5,7 @@ Autogenerate Command:
|
|
|
5
5
|
mkinit vtool_ibeis -i
|
|
6
6
|
"""
|
|
7
7
|
# flake8: noqa
|
|
8
|
-
__version__ = '2.
|
|
8
|
+
__version__ = '2.3.0'
|
|
9
9
|
__author__ = 'Jon Crall, Avi Weinstock, Chuck Stewart, Hendrik Weideman, Jason Parham, Zackary Rutfield'
|
|
10
10
|
__author_email__ = 'erotemic@gmail.com'
|
|
11
11
|
__url__ = 'https://github.com/Erotemic/vtool_ibeis'
|
vtool_ibeis/blend.py
CHANGED
|
@@ -5,7 +5,7 @@ import ubelt as ub
|
|
|
5
5
|
|
|
6
6
|
def testdata_blend(scale=128):
|
|
7
7
|
import vtool_ibeis as vt
|
|
8
|
-
img_fpath = ut.grab_test_imgpath('
|
|
8
|
+
img_fpath = ut.grab_test_imgpath('astro')
|
|
9
9
|
img1 = vt.imread(img_fpath)
|
|
10
10
|
rng = np.random.RandomState(0)
|
|
11
11
|
img2 = vt.perlin_noise(img1.shape[0:2], scale=scale, rng=rng)[None, :].T
|
vtool_ibeis/coverage_grid.py
CHANGED
|
@@ -34,7 +34,7 @@ def make_grid_coverage_mask(kpts, chipsize, weights, pxl_per_bin=4,
|
|
|
34
34
|
>>> from vtool_ibeis.coverage_grid import * # NOQA
|
|
35
35
|
>>> import vtool_ibeis as vt
|
|
36
36
|
>>> # build test data
|
|
37
|
-
>>> kpts, chipsize, weights = coverage_kpts.testdata_coverage('
|
|
37
|
+
>>> kpts, chipsize, weights = coverage_kpts.testdata_coverage('tsukuba_l')
|
|
38
38
|
>>> pxl_per_bin = 4
|
|
39
39
|
>>> grid_steps = 2
|
|
40
40
|
>>> # execute function
|
|
@@ -323,7 +323,7 @@ def gridsearch_coverage_grid_mask():
|
|
|
323
323
|
"""
|
|
324
324
|
import plottool_ibeis as pt
|
|
325
325
|
cfgdict_list, cfglbl_list = get_coverage_grid_gridsearch_configs()
|
|
326
|
-
kpts, chipsize, weights = coverage_kpts.testdata_coverage('
|
|
326
|
+
kpts, chipsize, weights = coverage_kpts.testdata_coverage('astro')
|
|
327
327
|
gridmask_list = [
|
|
328
328
|
255 * make_grid_coverage_mask(kpts, chipsize, weights, **cfgdict)
|
|
329
329
|
for cfgdict in ub.ProgIter(cfgdict_list, desc='coverage grid')
|
vtool_ibeis/coverage_kpts.py
CHANGED
|
@@ -37,7 +37,7 @@ def make_kpts_heatmask(kpts, chipsize, cmap='plasma'):
|
|
|
37
37
|
>>> from vtool_ibeis.coverage_kpts import * # NOQA
|
|
38
38
|
>>> import vtool_ibeis as vt
|
|
39
39
|
>>> import pyhesaff
|
|
40
|
-
>>> img_fpath = ut.grab_test_imgpath('carl
|
|
40
|
+
>>> img_fpath = ut.grab_test_imgpath('carl')
|
|
41
41
|
>>> (kpts, vecs) = pyhesaff.detect_feats(img_fpath)
|
|
42
42
|
>>> chip = vt.imread(img_fpath)
|
|
43
43
|
>>> kpts = kpts[0:100]
|
|
@@ -129,7 +129,7 @@ def make_kpts_coverage_mask(
|
|
|
129
129
|
>>> import vtool_ibeis as vt
|
|
130
130
|
>>> import plottool_ibeis as pt
|
|
131
131
|
>>> import pyhesaff
|
|
132
|
-
>>> img_fpath = ut.grab_test_imgpath('carl
|
|
132
|
+
>>> img_fpath = ut.grab_test_imgpath('carl')
|
|
133
133
|
>>> (kpts, vecs) = pyhesaff.detect_feats(img_fpath)
|
|
134
134
|
>>> kpts = kpts[::10]
|
|
135
135
|
>>> chip = vt.imread(img_fpath)
|
|
@@ -210,7 +210,7 @@ def warp_patch_onto_kpts(
|
|
|
210
210
|
>>> from vtool_ibeis.coverage_kpts import * # NOQA
|
|
211
211
|
>>> import vtool_ibeis as vt
|
|
212
212
|
>>> import pyhesaff
|
|
213
|
-
>>> img_fpath = ut.grab_test_imgpath('carl
|
|
213
|
+
>>> img_fpath = ut.grab_test_imgpath('carl')
|
|
214
214
|
>>> (kpts, vecs) = pyhesaff.detect_feats(img_fpath)
|
|
215
215
|
>>> kpts = kpts[::15]
|
|
216
216
|
>>> chip = vt.imread(img_fpath)
|
|
@@ -434,7 +434,8 @@ def gridsearch_kpts_coverage_mask():
|
|
|
434
434
|
"""
|
|
435
435
|
import plottool_ibeis as pt
|
|
436
436
|
cfgdict_list, cfglbl_list = get_coverage_kpts_gridsearch_configs()
|
|
437
|
-
kpts, chipsize, weights = testdata_coverage('easy1.png')
|
|
437
|
+
# kpts, chipsize, weights = testdata_coverage('easy1.png')
|
|
438
|
+
kpts, chipsize, weights = testdata_coverage('astro')
|
|
438
439
|
imgmask_list = [
|
|
439
440
|
255 * make_kpts_coverage_mask(kpts, chipsize, weights,
|
|
440
441
|
return_patch=False, **cfgdict)
|
|
@@ -459,18 +460,18 @@ def testdata_coverage(fname=None):
|
|
|
459
460
|
# build test data
|
|
460
461
|
kpts, vecs = vt.demodata.get_testdata_kpts(fname, with_vecs=True)
|
|
461
462
|
# HACK IN DISTINCTIVENESS
|
|
462
|
-
if fname is not None:
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
else:
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
463
|
+
# if fname is not None:
|
|
464
|
+
# from ibeis.algo.hots import distinctiveness_normalizer
|
|
465
|
+
# cachedir = ub.ensure_app_cache_dir('ibeis', 'distinctiveness_model')
|
|
466
|
+
# species = 'zebra_plains'
|
|
467
|
+
# dstcnvs_normer = distinctiveness_normalizer.DistinctivnessNormalizer(species, cachedir=cachedir)
|
|
468
|
+
# dstcnvs_normer.load(cachedir)
|
|
469
|
+
# weights = dstcnvs_normer.get_distinctiveness(vecs)
|
|
470
|
+
# else:
|
|
471
|
+
kpts = np.vstack((kpts, [0, 0, 1, 1, 1, 0]))
|
|
472
|
+
kpts = np.vstack((kpts, [0.01, 10, 1, 1, 1, 0]))
|
|
473
|
+
kpts = np.vstack((kpts, [0.94, 11.5, 1, 1, 1, 0]))
|
|
474
|
+
weights = np.ones(len(kpts))
|
|
474
475
|
chipsize = tuple(vt.iceil(vt.get_kpts_image_extent(kpts)[2:4]).tolist())
|
|
475
476
|
return kpts, chipsize, weights
|
|
476
477
|
|
vtool_ibeis/demodata.py
CHANGED
|
@@ -633,7 +633,7 @@ def get_testdata_kpts(fname=None, with_vecs=False):
|
|
|
633
633
|
return kpts
|
|
634
634
|
|
|
635
635
|
|
|
636
|
-
def testdata_ratio_matches(fname1='
|
|
636
|
+
def testdata_ratio_matches(fname1='tsukuba_r', fname2='tsukuba_l', **kwargs):
|
|
637
637
|
r"""
|
|
638
638
|
Runs simple ratio-test matching between two images.
|
|
639
639
|
Technically this is not demodata data.
|
|
@@ -659,8 +659,8 @@ def testdata_ratio_matches(fname1='easy1.png', fname2='easy2.png', **kwargs):
|
|
|
659
659
|
>>> # xdoctest: +REQUIRES(module:pyhesaff)
|
|
660
660
|
>>> from vtool_ibeis.demodata import * # NOQA
|
|
661
661
|
>>> import vtool_ibeis as vt
|
|
662
|
-
>>> fname1 = ut.get_argval('--fname1', type_=str, default='
|
|
663
|
-
>>> fname2 = ut.get_argval('--fname2', type_=str, default='
|
|
662
|
+
>>> fname1 = ut.get_argval('--fname1', type_=str, default='tsukuba_l')
|
|
663
|
+
>>> fname2 = ut.get_argval('--fname2', type_=str, default='tsukuba_r')
|
|
664
664
|
>>> default_dict = vt.get_extract_features_default_params()
|
|
665
665
|
>>> default_dict['ratio_thresh'] = .625
|
|
666
666
|
>>> kwargs = ut.argparse_dict(default_dict)
|
vtool_ibeis/features.py
CHANGED
|
@@ -41,7 +41,7 @@ def extract_features(img_or_fpath, feat_type='hesaff+sift', **kwargs):
|
|
|
41
41
|
>>> from vtool_ibeis.features import * # NOQA
|
|
42
42
|
>>> import vtool_ibeis as vt
|
|
43
43
|
>>> # build test data
|
|
44
|
-
>>> img_fpath = ut.grab_test_imgpath(ut.get_argval('--fname', default='
|
|
44
|
+
>>> img_fpath = ut.grab_test_imgpath(ut.get_argval('--fname', default='astro'))
|
|
45
45
|
>>> imgBGR = vt.imread(img_fpath)
|
|
46
46
|
>>> feat_type = ub.argval('--feat_type', default='hesaff+sift')
|
|
47
47
|
>>> import pyhesaff
|
|
@@ -109,8 +109,7 @@ def detect_opencv_keypoints():
|
|
|
109
109
|
import vtool_ibeis as vt
|
|
110
110
|
import numpy as np # NOQA
|
|
111
111
|
|
|
112
|
-
|
|
113
|
-
img_fpath = ut.grab_test_imgpath(ub.argval('--fname', default='zebra.png'))
|
|
112
|
+
img_fpath = ut.grab_test_imgpath(ub.argval('--fname', default='astro'))
|
|
114
113
|
imgBGR = vt.imread(img_fpath)
|
|
115
114
|
imgGray = cv2.cvtColor(imgBGR, cv2.COLOR_BGR2GRAY)
|
|
116
115
|
|
|
@@ -251,7 +250,7 @@ def test_mser():
|
|
|
251
250
|
info = {key: list(ub.compress(val, flags)) for key, val in self.info.items()}
|
|
252
251
|
return Keypoints(subarr, info)
|
|
253
252
|
|
|
254
|
-
img_fpath = ut.grab_test_imgpath(ub.argval('--fname', default='
|
|
253
|
+
img_fpath = ut.grab_test_imgpath(ub.argval('--fname', default='astro'))
|
|
255
254
|
imgBGR = vt.imread(img_fpath)
|
|
256
255
|
imgGray = cv2.cvtColor(imgBGR, cv2.COLOR_BGR2GRAY)
|
|
257
256
|
# http://docs.opencv.org/master/d3/d28/classcv_1_1MSER.html#gsc.tab=0
|
vtool_ibeis/geometry.py
CHANGED
|
@@ -23,9 +23,6 @@ def verts_from_bbox(bbox, close=False):
|
|
|
23
23
|
Returns:
|
|
24
24
|
list: verts
|
|
25
25
|
|
|
26
|
-
CommandLine:
|
|
27
|
-
python -m vtool_ibeis.geometry --test-verts_from_bbox
|
|
28
|
-
|
|
29
26
|
Example:
|
|
30
27
|
>>> # ENABLE_DOCTEST
|
|
31
28
|
>>> from vtool_ibeis.geometry import * # NOQA
|
|
@@ -66,14 +63,11 @@ def draw_border(img_in, color=(0, 128, 255), thickness=2, out=None):
|
|
|
66
63
|
thickness (int):
|
|
67
64
|
out (None):
|
|
68
65
|
|
|
69
|
-
CommandLine:
|
|
70
|
-
python -m vtool_ibeis.geometry --test-draw_border --show
|
|
71
|
-
|
|
72
66
|
Example:
|
|
73
67
|
>>> # ENABLE_DOCTEST
|
|
74
68
|
>>> from vtool_ibeis.geometry import * # NOQA
|
|
75
69
|
>>> import vtool_ibeis as vt
|
|
76
|
-
>>> img_in = vt.imread(ut.grab_test_imgpath('carl
|
|
70
|
+
>>> img_in = vt.imread(ut.grab_test_imgpath('carl'))
|
|
77
71
|
>>> color = (0, 128, 255)
|
|
78
72
|
>>> thickness = 20
|
|
79
73
|
>>> out = None
|
|
@@ -121,7 +115,7 @@ def draw_verts(img_in, verts, color=(0, 128, 255), thickness=2, out=None):
|
|
|
121
115
|
>>> import plottool_ibeis as pt
|
|
122
116
|
>>> import vtool_ibeis as vt
|
|
123
117
|
>>> # build test data
|
|
124
|
-
>>> img_in = vt.imread(ut.grab_test_imgpath('carl
|
|
118
|
+
>>> img_in = vt.imread(ut.grab_test_imgpath('carl'))
|
|
125
119
|
>>> verts = ((10, 10), (10, 100), (100, 100), (100, 10))
|
|
126
120
|
>>> color = (0, 128, 255)
|
|
127
121
|
>>> thickness = 2
|
|
@@ -143,7 +137,7 @@ def draw_verts(img_in, verts, color=(0, 128, 255), thickness=2, out=None):
|
|
|
143
137
|
>>> import plottool_ibeis as pt
|
|
144
138
|
>>> import vtool_ibeis as vt
|
|
145
139
|
>>> # build test data
|
|
146
|
-
>>> img_in = vt.imread(ut.grab_test_imgpath('carl
|
|
140
|
+
>>> img_in = vt.imread(ut.grab_test_imgpath('carl'))
|
|
147
141
|
>>> verts = ((10, 10), (10, 100), (100, 100), (100, 10))
|
|
148
142
|
>>> color = (0, 128, 255)
|
|
149
143
|
>>> thickness = 2
|
vtool_ibeis/histogram.py
CHANGED
|
@@ -975,8 +975,8 @@ def show_ori_image_ondisk():
|
|
|
975
975
|
>>> pt.show_if_requested()
|
|
976
976
|
"""
|
|
977
977
|
#if img_fpath is not None:
|
|
978
|
-
# img_fpath = ut.get_argval('--fpath', type_=str, default=ut.grab_test_imgpath('
|
|
979
|
-
# img_fpath = ut.get_argval('--fpath', type_=str, default=ut.grab_test_imgpath('
|
|
978
|
+
# img_fpath = ut.get_argval('--fpath', type_=str, default=ut.grab_test_imgpath('astro'))
|
|
979
|
+
# img_fpath = ut.get_argval('--fpath', type_=str, default=ut.grab_test_imgpath('astro'))
|
|
980
980
|
# img = vt.imread(img_fpath)
|
|
981
981
|
# ori_img_fpath = ut.get_argval('--fpath-ori', type_=str,
|
|
982
982
|
# default=ut.augpath(img_fpath, '_ori'))
|
vtool_ibeis/image.py
CHANGED
|
@@ -289,12 +289,12 @@ def imread(img_fpath, grayscale=False, orient=False, flags=None,
|
|
|
289
289
|
Example:
|
|
290
290
|
>>> # ENABLE_DOCTEST
|
|
291
291
|
>>> from vtool_ibeis.image import * # NOQA
|
|
292
|
-
>>> img_fpath = ut.grab_test_imgpath('
|
|
292
|
+
>>> img_fpath = ut.grab_test_imgpath('astro')
|
|
293
293
|
>>> imgBGR1 = imread(img_fpath, grayscale=False)
|
|
294
294
|
>>> imgBGR2 = imread(img_fpath, grayscale=True)
|
|
295
295
|
>>> imgBGR3 = imread(img_fpath, orient=True)
|
|
296
|
-
>>> assert imgBGR1.shape == (
|
|
297
|
-
>>> assert imgBGR2.shape == (
|
|
296
|
+
>>> assert imgBGR1.shape == (512, 512, 3)
|
|
297
|
+
>>> assert imgBGR2.shape == (512, 512)
|
|
298
298
|
>>> assert np.all(imgBGR1 == imgBGR3)
|
|
299
299
|
>>> # xdoctest: +REQUIRES(--show)
|
|
300
300
|
>>> import plottool_ibeis as pt
|
|
@@ -332,7 +332,7 @@ def imread(img_fpath, grayscale=False, orient=False, flags=None,
|
|
|
332
332
|
(2736, 3648, 3)
|
|
333
333
|
|
|
334
334
|
Example:
|
|
335
|
-
>>> #
|
|
335
|
+
>>> # xdoctest +SKIP("networking")
|
|
336
336
|
>>> from vtool_ibeis.image import * # NOQA
|
|
337
337
|
>>> url = 'http://www.sherv.net/cm/emo/funny/2/big-dancing-banana-smiley-emoticon.gif'
|
|
338
338
|
>>> img_fpath = ut.grab_file_url(url)
|
|
@@ -540,10 +540,10 @@ def imwrite(img_fpath, imgBGR, fallback=False):
|
|
|
540
540
|
>>> from vtool_ibeis.image import * # NOQA
|
|
541
541
|
>>> import vtool_ibeis as vt
|
|
542
542
|
>>> import utool as ut
|
|
543
|
-
>>> img_fpath1 = ut.grab_test_imgpath('
|
|
543
|
+
>>> img_fpath1 = ut.grab_test_imgpath('astro')
|
|
544
544
|
>>> imgBGR = vt.imread(img_fpath1)
|
|
545
545
|
>>> img_dpath = ub.ensure_app_cache_dir('vtool_ibeis', 'testwrite')
|
|
546
|
-
>>> img_fpath2 = ut.unixjoin(img_dpath, '
|
|
546
|
+
>>> img_fpath2 = ut.unixjoin(img_dpath, 'astro.png')
|
|
547
547
|
>>> fallback = False
|
|
548
548
|
>>> imwrite(img_fpath2, imgBGR, fallback=fallback)
|
|
549
549
|
>>> imgBGR2 = vt.imread(img_fpath2)
|
|
@@ -555,7 +555,7 @@ def imwrite(img_fpath, imgBGR, fallback=False):
|
|
|
555
555
|
if fallback:
|
|
556
556
|
try:
|
|
557
557
|
imwrite_fallback(img_fpath, imgBGR)
|
|
558
|
-
except Exception
|
|
558
|
+
except Exception:
|
|
559
559
|
pass
|
|
560
560
|
msg = '[vt.image] ERROR writing: %s' % (img_fpath,)
|
|
561
561
|
ut.printex(ex, msg, keys=['imgBGR.shape'])
|
|
@@ -657,11 +657,11 @@ def open_image_size(image_fpath):
|
|
|
657
657
|
|
|
658
658
|
Doctest:
|
|
659
659
|
>>> from vtool_ibeis.image import * # NOQA
|
|
660
|
-
>>> image_fpath = ut.grab_test_imgpath('
|
|
660
|
+
>>> image_fpath = ut.grab_test_imgpath('carl')
|
|
661
661
|
>>> size = open_image_size(image_fpath)
|
|
662
662
|
>>> result = ('size = %s' % (str(size),))
|
|
663
663
|
>>> print(result)
|
|
664
|
-
size = (
|
|
664
|
+
size = (328, 448)
|
|
665
665
|
|
|
666
666
|
Ignore:
|
|
667
667
|
# Confirm that Image.open is a lazy load
|
|
@@ -730,7 +730,7 @@ def warpAffine(img, Aff, dsize, assume_float01=True):
|
|
|
730
730
|
>>> # DISABLE_DOCTEST
|
|
731
731
|
>>> from vtool_ibeis.image import * # NOQA
|
|
732
732
|
>>> import vtool_ibeis as vt
|
|
733
|
-
>>> img_fpath = ut.grab_test_imgpath('carl
|
|
733
|
+
>>> img_fpath = ut.grab_test_imgpath('carl')
|
|
734
734
|
>>> img = vt.imread(img_fpath)
|
|
735
735
|
>>> Aff = vt.rotation_mat3x3(TAU / 8)
|
|
736
736
|
>>> dsize = vt.get_size(img)
|
|
@@ -1106,7 +1106,7 @@ def rotate_image_ondisk(img_fpath, theta, out_fpath=None, **kwargs):
|
|
|
1106
1106
|
>>> # DISABLE_DOCTEST
|
|
1107
1107
|
>>> from vtool_ibeis.image import * # NOQA
|
|
1108
1108
|
>>> # build test data
|
|
1109
|
-
>>> img_fpath = ut.grab_test_imgpath('
|
|
1109
|
+
>>> img_fpath = ut.grab_test_imgpath('astro')
|
|
1110
1110
|
>>> theta = TAU * 3 / 8
|
|
1111
1111
|
>>> # execute function
|
|
1112
1112
|
>>> out_fpath = None
|
|
@@ -1422,9 +1422,9 @@ def convert_colorspace(img, colorspace, src_colorspace='BGR'):
|
|
|
1422
1422
|
>>> # DISABLE_DOCTEST
|
|
1423
1423
|
>>> from vtool_ibeis.image import * # NOQA
|
|
1424
1424
|
>>> import vtool_ibeis as vt
|
|
1425
|
-
>>> img_fpath = ut.
|
|
1426
|
-
>>> img_fpath = ut.
|
|
1427
|
-
>>> img_fpath = ut.grab_test_imgpath('
|
|
1425
|
+
>>> #img_fpath = ut.grab_file_url('http://itsnasb.com/wp-content/uploads/2013/03/lisa-frank-logo1.jpg')
|
|
1426
|
+
>>> #img_fpath = ut.grab_test_imgpath('carl')
|
|
1427
|
+
>>> img_fpath = ut.grab_test_imgpath('pm5644')
|
|
1428
1428
|
>>> img = vt.imread(img_fpath)
|
|
1429
1429
|
>>> img_float = vt.rectify_to_float01(img, np.float32)
|
|
1430
1430
|
>>> colorspace = 'LAB'
|
|
@@ -1508,9 +1508,9 @@ def padded_resize(img, target_size=(64, 64), interpolation=None):
|
|
|
1508
1508
|
>>> # ENABLE_DOCTEST
|
|
1509
1509
|
>>> from vtool_ibeis.image import * # NOQA
|
|
1510
1510
|
>>> import vtool_ibeis as vt
|
|
1511
|
-
>>> imgA = vt.imread(ut.grab_test_imgpath('carl
|
|
1512
|
-
>>> imgB = vt.imread(ut.grab_test_imgpath('
|
|
1513
|
-
>>> imgC = vt.imread(ut.grab_test_imgpath('carl
|
|
1511
|
+
>>> imgA = vt.imread(ut.grab_test_imgpath('carl'))
|
|
1512
|
+
>>> imgB = vt.imread(ut.grab_test_imgpath('astro'))
|
|
1513
|
+
>>> imgC = vt.imread(ut.grab_test_imgpath('carl'), grayscale=True)
|
|
1514
1514
|
>>> #target_size = (64, 64)
|
|
1515
1515
|
>>> target_size = (1024, 1024)
|
|
1516
1516
|
>>> img3_list = [padded_resize(img, target_size) for img in [imgA, imgB, imgC]]
|
|
@@ -1554,7 +1554,7 @@ def embed_in_square_image(img, target_size, img_origin=(.5, .5),
|
|
|
1554
1554
|
>>> # DISABLE_DOCTEST
|
|
1555
1555
|
>>> from vtool_ibeis.image import * # NOQA
|
|
1556
1556
|
>>> import vtool_ibeis as vt
|
|
1557
|
-
>>> img_fpath = ut.grab_test_imgpath('carl
|
|
1557
|
+
>>> img_fpath = ut.grab_test_imgpath('carl')
|
|
1558
1558
|
>>> img = vt.imread(img_fpath)
|
|
1559
1559
|
>>> target_size = tuple(np.array(vt.get_size(img)) * 3)
|
|
1560
1560
|
>>> img_origin = (.5, .5)
|
|
@@ -1707,7 +1707,7 @@ def resize_to_maxdims(img, max_dsize=(64, 64),
|
|
|
1707
1707
|
>>> # ENABLE_DOCTEST
|
|
1708
1708
|
>>> from vtool_ibeis.image import * # NOQA
|
|
1709
1709
|
>>> import vtool_ibeis as vt
|
|
1710
|
-
>>> img_fpath = ut.grab_test_imgpath('carl
|
|
1710
|
+
>>> img_fpath = ut.grab_test_imgpath('carl')
|
|
1711
1711
|
>>> img = vt.imread(img_fpath)
|
|
1712
1712
|
>>> max_dsize = (1024, 1024)
|
|
1713
1713
|
>>> img2 = resize_to_maxdims(img, max_dsize)
|
|
@@ -1737,7 +1737,7 @@ def resize_thumb(img, max_dsize=(64, 64), interpolation=None):
|
|
|
1737
1737
|
>>> from vtool_ibeis.image import * # NOQA
|
|
1738
1738
|
>>> import vtool_ibeis as vt
|
|
1739
1739
|
>>> # build test data
|
|
1740
|
-
>>> img_fpath = ut.grab_test_imgpath('carl
|
|
1740
|
+
>>> img_fpath = ut.grab_test_imgpath('carl')
|
|
1741
1741
|
>>> img = vt.imread(img_fpath)
|
|
1742
1742
|
>>> max_dsize = (64, 64)
|
|
1743
1743
|
>>> # execute function
|
|
@@ -2008,11 +2008,11 @@ def perlin_noise(size, scale=32.0, rng=np.random):
|
|
|
2008
2008
|
def testdata_imglist():
|
|
2009
2009
|
# build test data
|
|
2010
2010
|
import vtool_ibeis as vt
|
|
2011
|
-
img1 = vt.imread(ut.grab_test_imgpath('carl
|
|
2012
|
-
img2 = vt.imread(ut.grab_test_imgpath('astro
|
|
2013
|
-
img3 = vt.imread(ut.grab_test_imgpath('
|
|
2014
|
-
img4 = vt.imread(ut.grab_test_imgpath('
|
|
2015
|
-
img5 = vt.imread(ut.grab_test_imgpath('
|
|
2011
|
+
img1 = vt.imread(ut.grab_test_imgpath('carl'))
|
|
2012
|
+
img2 = vt.imread(ut.grab_test_imgpath('astro'))
|
|
2013
|
+
img3 = vt.imread(ut.grab_test_imgpath('stars'))
|
|
2014
|
+
img4 = vt.imread(ut.grab_test_imgpath('pm5644'))
|
|
2015
|
+
img5 = vt.imread(ut.grab_test_imgpath('parrot'))
|
|
2016
2016
|
img_list = [img1, img2, img3, img4, img5]
|
|
2017
2017
|
return img_list
|
|
2018
2018
|
|
|
@@ -2423,9 +2423,9 @@ def ensure_3channel(patch):
|
|
|
2423
2423
|
>>> # ENABLE_DOCTEST
|
|
2424
2424
|
>>> from vtool_ibeis.image import * # NOQA
|
|
2425
2425
|
>>> import vtool_ibeis as vt
|
|
2426
|
-
>>> patch1 = vt.imread(ut.grab_test_imgpath('astro
|
|
2427
|
-
>>> patch2 = vt.imread(ut.grab_test_imgpath('
|
|
2428
|
-
>>> patch3 = vt.imread(ut.grab_test_imgpath('
|
|
2426
|
+
>>> patch1 = vt.imread(ut.grab_test_imgpath('astro'))[0:512, 0:500, :]
|
|
2427
|
+
>>> patch2 = vt.imread(ut.grab_test_imgpath('carl'))[:, :, 0:1]
|
|
2428
|
+
>>> patch3 = vt.imread(ut.grab_test_imgpath('paraview'))[0:390, 0:400, 0]
|
|
2429
2429
|
>>> res1 = ensure_3channel(patch1)
|
|
2430
2430
|
>>> res2 = ensure_3channel(patch2)
|
|
2431
2431
|
>>> res3 = ensure_3channel(patch3)
|
|
@@ -2489,8 +2489,8 @@ def stack_images(img1, img2, vert=None, modifysize=False, return_sf=False,
|
|
|
2489
2489
|
>>> from vtool_ibeis.image import * # NOQA
|
|
2490
2490
|
>>> import vtool_ibeis as vt
|
|
2491
2491
|
>>> # build test data
|
|
2492
|
-
>>> img1 = vt.imread(ut.grab_test_imgpath('carl
|
|
2493
|
-
>>> img2 = vt.imread(ut.grab_test_imgpath('astro
|
|
2492
|
+
>>> img1 = vt.imread(ut.grab_test_imgpath('carl'))
|
|
2493
|
+
>>> img2 = vt.imread(ut.grab_test_imgpath('astro'))
|
|
2494
2494
|
>>> vert = True
|
|
2495
2495
|
>>> modifysize = False
|
|
2496
2496
|
>>> # execute function
|
|
@@ -2645,11 +2645,11 @@ def stack_image_recurse(img_list1, img_list2=None, vert=True, modifysize=False,
|
|
|
2645
2645
|
>>> from vtool_ibeis.image import * # NOQA
|
|
2646
2646
|
>>> import vtool_ibeis as vt
|
|
2647
2647
|
>>> # build test data
|
|
2648
|
-
>>> img1 = vt.imread(ut.grab_test_imgpath('carl
|
|
2649
|
-
>>> img2 = vt.imread(ut.grab_test_imgpath('astro
|
|
2650
|
-
>>> img3 = vt.imread(ut.grab_test_imgpath('
|
|
2651
|
-
>>> img4 = vt.imread(ut.grab_test_imgpath('
|
|
2652
|
-
>>> img5 = vt.imread(ut.grab_test_imgpath('
|
|
2648
|
+
>>> img1 = vt.imread(ut.grab_test_imgpath('carl'))
|
|
2649
|
+
>>> img2 = vt.imread(ut.grab_test_imgpath('astro'))
|
|
2650
|
+
>>> img3 = vt.imread(ut.grab_test_imgpath('paraview'))
|
|
2651
|
+
>>> img4 = vt.imread(ut.grab_test_imgpath('lowcontrast'))
|
|
2652
|
+
>>> img5 = vt.imread(ut.grab_test_imgpath('stars'))
|
|
2653
2653
|
>>> img_list1 = [img1, img2, img3, img4, img5]
|
|
2654
2654
|
>>> img_list2 = None
|
|
2655
2655
|
>>> vert = True
|
|
@@ -2658,7 +2658,7 @@ def stack_image_recurse(img_list1, img_list2=None, vert=True, modifysize=False,
|
|
|
2658
2658
|
>>> # verify results
|
|
2659
2659
|
>>> # xdoctest: +REQUIRES(--show)
|
|
2660
2660
|
>>> import plottool_ibeis as pt
|
|
2661
|
-
>>> imshow(imgB)
|
|
2661
|
+
>>> pt.imshow(imgB)
|
|
2662
2662
|
>>> #wh1 = img1.shape[0:2][::-1]
|
|
2663
2663
|
>>> #wh2 = img2.shape[0:2][::-1]
|
|
2664
2664
|
>>> #pt.draw_bbox((0, 0) + wh1, bbox_color=(1, 0, 0))
|
|
@@ -2732,8 +2732,8 @@ def filterflags_valid_images(gpaths, valid_formats=None,
|
|
|
2732
2732
|
Example:
|
|
2733
2733
|
>>> # ENABLE_DOCTEST
|
|
2734
2734
|
>>> from vtool_ibeis.image import * # NOQA
|
|
2735
|
-
>>> gpaths = [ut.grab_test_imgpath('carl
|
|
2736
|
-
>>> ut.grab_test_imgpath('astro
|
|
2735
|
+
>>> gpaths = [ut.grab_test_imgpath('carl'),
|
|
2736
|
+
>>> ut.grab_test_imgpath('astro')]
|
|
2737
2737
|
>>> flags = filterflags_valid_images(gpaths)
|
|
2738
2738
|
>>> assert all(flags)
|
|
2739
2739
|
"""
|
vtool_ibeis/image_filters.py
CHANGED
|
@@ -14,7 +14,8 @@ class IntensityPreproc(object):
|
|
|
14
14
|
Doctest:
|
|
15
15
|
>>> from vtool_ibeis.image_filters import *
|
|
16
16
|
>>> import vtool_ibeis as vt
|
|
17
|
-
>>> chipBGR = vt.imread(ut.grab_file_url('http://i.imgur.com/qVWQaex.jpg'))
|
|
17
|
+
>>> #chipBGR = vt.imread(ut.grab_file_url('http://i.imgur.com/qVWQaex.jpg'))
|
|
18
|
+
>>> chipBGR = vt.imread(ut.grab_test_imgpath('astro'))
|
|
18
19
|
>>> filter_list = [
|
|
19
20
|
>>> ('medianblur', {}),
|
|
20
21
|
>>> ('adapteq', {}),
|
|
@@ -71,7 +72,9 @@ def manta_matcher_filters(chipBGR):
|
|
|
71
72
|
>>> from ibeis.core_annots import * # NOQA
|
|
72
73
|
>>> import ibeis
|
|
73
74
|
>>> ibs = ibeis.opendb('Mantas')
|
|
74
|
-
>>> chipBGR = vt.imread(ut.grab_file_url('http://i.imgur.com/qVWQaex.jpg'))
|
|
75
|
+
>>> #chipBGR = vt.imread(ut.grab_file_url('http://i.imgur.com/qVWQaex.jpg'))
|
|
76
|
+
>>> chipBGR = vt.imread(ut.grab_test_imgpath('astro'))
|
|
77
|
+
|
|
75
78
|
"""
|
|
76
79
|
chipLAB = cv2.cvtColor(chipBGR, cv2.COLOR_BGR2LAB)
|
|
77
80
|
|
|
@@ -99,7 +102,8 @@ def adapteq_fn(chipBGR):
|
|
|
99
102
|
>>> from vtool_ibeis.image_filters import *
|
|
100
103
|
>>> import vtool_ibeis as vt
|
|
101
104
|
>>> import utool as ut
|
|
102
|
-
>>> chipBGR = vt.imread(ut.grab_file_url('http://i.imgur.com/qVWQaex.jpg'))
|
|
105
|
+
>>> #chipBGR = vt.imread(ut.grab_file_url('http://i.imgur.com/qVWQaex.jpg'))
|
|
106
|
+
>>> chipBGR = vt.imread(ut.grab_test_imgpath('astro'))
|
|
103
107
|
>>> chip2 = adapteq_fn(chipBGR)
|
|
104
108
|
>>> # xdoctest: +REQUIRES(--show)
|
|
105
109
|
>>> import plottool_ibeis as pt
|
|
@@ -124,8 +128,9 @@ def medianfilter_fn(chipBGR):
|
|
|
124
128
|
>>> from vtool_ibeis.image_filters import *
|
|
125
129
|
>>> import vtool_ibeis as vt
|
|
126
130
|
>>> import utool as ut
|
|
127
|
-
>>> chipBGR = vt.imread(ut.grab_file_url('http://i.imgur.com/qVWQaex.jpg'))
|
|
128
|
-
>>>
|
|
131
|
+
>>> #chipBGR = vt.imread(ut.grab_file_url('http://i.imgur.com/qVWQaex.jpg'))
|
|
132
|
+
>>> chipBGR = vt.imread(ut.grab_test_imgpath('astro'))
|
|
133
|
+
>>> chip2 = medianfilter_fn(chipBGR)
|
|
129
134
|
>>> # xdoctest: +REQUIRES(--show)
|
|
130
135
|
>>> import plottool_ibeis as pt
|
|
131
136
|
>>> pt.imshow(chipBGR, pnum=(1, 2, 1), fnum=1)
|
|
@@ -199,7 +204,6 @@ def grabcut_fn(chipBGR):
|
|
|
199
204
|
return seg_chipBGR
|
|
200
205
|
|
|
201
206
|
|
|
202
|
-
|
|
203
207
|
if __name__ == '__main__':
|
|
204
208
|
"""
|
|
205
209
|
CommandLine:
|
vtool_ibeis/inspect_matches.py
CHANGED
|
@@ -69,8 +69,8 @@ class MatchInspector(INSPECT_BASE):
|
|
|
69
69
|
>>> import vtool_ibeis as vt
|
|
70
70
|
>>> gt.ensure_qapp()
|
|
71
71
|
>>> ut.qtensure()
|
|
72
|
-
>>> annot1 = lazy_test_annot('
|
|
73
|
-
>>> annot2 = lazy_test_annot('
|
|
72
|
+
>>> annot1 = lazy_test_annot('tsukuba_r')
|
|
73
|
+
>>> annot2 = lazy_test_annot('tsukuba_l')
|
|
74
74
|
>>> match = vt.PairwiseMatch(annot1, annot2)
|
|
75
75
|
>>> self = MatchInspector(match=match)
|
|
76
76
|
>>> self.show()
|
vtool_ibeis/matching.py
CHANGED
|
@@ -102,13 +102,13 @@ def demodata_match(cfgdict={}, apply=True, use_cache=True, recompute=False):
|
|
|
102
102
|
cfgstr = ub.hash_data(cfgdict) + hashid
|
|
103
103
|
cacher = ub.Cacher(
|
|
104
104
|
'test_match_v5',
|
|
105
|
-
|
|
105
|
+
depends=cfgstr,
|
|
106
106
|
appname='vtool_ibeis',
|
|
107
107
|
enabled=use_cache
|
|
108
108
|
)
|
|
109
109
|
match = cacher.tryload()
|
|
110
|
-
annot1 = lazy_test_annot('
|
|
111
|
-
annot2 = lazy_test_annot('
|
|
110
|
+
annot1 = lazy_test_annot('tsukuba_l')
|
|
111
|
+
annot2 = lazy_test_annot('tsukuba_r')
|
|
112
112
|
if match is None or recompute:
|
|
113
113
|
match = vt.PairwiseMatch(annot1, annot2)
|
|
114
114
|
if apply:
|
|
@@ -141,8 +141,10 @@ class PairwiseMatch(ub.NiceRepr):
|
|
|
141
141
|
>>> # xdoctest: +REQUIRES(module:pyhesaff)
|
|
142
142
|
>>> from vtool_ibeis.matching import * # NOQA
|
|
143
143
|
>>> import vtool_ibeis as vt
|
|
144
|
-
>>> imgR = vt.imread(ut.grab_test_imgpath('easy1.png'))
|
|
145
|
-
>>> imgL = vt.imread(ut.grab_test_imgpath('easy2.png'))
|
|
144
|
+
>>> #imgR = vt.imread(ut.grab_test_imgpath('easy1.png'))
|
|
145
|
+
>>> #imgL = vt.imread(ut.grab_test_imgpath('easy2.png'))
|
|
146
|
+
>>> imgR = vt.imread(ut.grab_test_imgpath('tsukuba_r'))
|
|
147
|
+
>>> imgL = vt.imread(ut.grab_test_imgpath('tsukuba_l'))
|
|
146
148
|
>>> annot1 = {'rchip': imgR}
|
|
147
149
|
>>> annot2 = {'rchip': imgL}
|
|
148
150
|
>>> match = vt.PairwiseMatch(annot1, annot2)
|
|
@@ -162,8 +164,8 @@ class PairwiseMatch(ub.NiceRepr):
|
|
|
162
164
|
>>> match.ishow()
|
|
163
165
|
>>> from vtool_ibeis.matching import * # NOQA
|
|
164
166
|
>>> import vtool_ibeis as vt
|
|
165
|
-
>>> imgR = vt.imread(ut.grab_test_imgpath('
|
|
166
|
-
>>> imgL = vt.imread(ut.grab_test_imgpath('
|
|
167
|
+
>>> imgR = vt.imread(ut.grab_test_imgpath('tsukuba_r'))
|
|
168
|
+
>>> imgL = vt.imread(ut.grab_test_imgpath('tsukuba_l'))
|
|
167
169
|
>>> annot1 = {'rchip': imgR}
|
|
168
170
|
>>> annot2 = {'rchip': imgL}
|
|
169
171
|
>>> match = vt.PairwiseMatch(annot1, annot2)
|
|
@@ -453,8 +455,10 @@ class PairwiseMatch(ub.NiceRepr):
|
|
|
453
455
|
K, Knorm, symmetric, checks, weight_key = params
|
|
454
456
|
annot1 = match.annot1
|
|
455
457
|
annot2 = match.annot2
|
|
458
|
+
if verbose is None:
|
|
459
|
+
verbose = match.verbose
|
|
456
460
|
|
|
457
|
-
if
|
|
461
|
+
if verbose:
|
|
458
462
|
print('[match] assign')
|
|
459
463
|
print('[match] params = ' + ub.repr2(params))
|
|
460
464
|
|
|
@@ -1447,7 +1451,7 @@ def ensure_metadata_feats(annot, cfgdict={}):
|
|
|
1447
1451
|
>>> # ENABLE_DOCTEST
|
|
1448
1452
|
>>> # xdoctest: +REQUIRES(module:pyhesaff)
|
|
1449
1453
|
>>> from vtool_ibeis.matching import * # NOQA
|
|
1450
|
-
>>> rchip_fpath = ut.grab_test_imgpath('
|
|
1454
|
+
>>> rchip_fpath = ut.grab_test_imgpath('astro')
|
|
1451
1455
|
>>> annot = ut.LazyDict({'rchip_fpath': rchip_fpath})
|
|
1452
1456
|
>>> cfgdict = {}
|
|
1453
1457
|
>>> ensure_metadata_feats(annot, cfgdict)
|
vtool_ibeis/nearest_neighbors.py
CHANGED
|
@@ -109,8 +109,10 @@ def test_cv2_flann():
|
|
|
109
109
|
from vtool_ibeis import demodata
|
|
110
110
|
import plottool_ibeis as pt
|
|
111
111
|
import vtool_ibeis as vt
|
|
112
|
-
img1 = vt.imread(ut.grab_test_imgpath('easy1.png'))
|
|
113
|
-
img2 = vt.imread(ut.grab_test_imgpath('easy2.png'))
|
|
112
|
+
# img1 = vt.imread(ut.grab_test_imgpath('easy1.png'))
|
|
113
|
+
# img2 = vt.imread(ut.grab_test_imgpath('easy2.png'))
|
|
114
|
+
img1 = vt.imread(ut.grab_test_imgpath('tsukuba_l'))
|
|
115
|
+
img2 = vt.imread(ut.grab_test_imgpath('tsukuba_r'))
|
|
114
116
|
|
|
115
117
|
stereo = cv2.StereoBM_create(numDisparities=16, blockSize=15)
|
|
116
118
|
disparity = stereo.compute(img1, img2)
|
vtool_ibeis/patch.py
CHANGED
|
@@ -570,7 +570,7 @@ def get_warped_patches(img, kpts, flags=cv2.INTER_LANCZOS4,
|
|
|
570
570
|
>>> from vtool_ibeis.patch import * # NOQA
|
|
571
571
|
>>> import vtool_ibeis as vt
|
|
572
572
|
>>> # build test data
|
|
573
|
-
>>> img_fpath = ut.grab_test_imgpath('carl
|
|
573
|
+
>>> img_fpath = ut.grab_test_imgpath('carl')
|
|
574
574
|
>>> img = vt.imread(img_fpath)
|
|
575
575
|
>>> use_cpp = ut.get_argflag('--use_cpp')
|
|
576
576
|
>>> kpts, desc = vt.extract_features(img_fpath)
|
|
@@ -1065,18 +1065,14 @@ def draw_kp_ori_steps():
|
|
|
1065
1065
|
>>> draw_kp_ori_steps()
|
|
1066
1066
|
>>> pt.show_if_requested()
|
|
1067
1067
|
"""
|
|
1068
|
-
#from vtool_ibeis.patch import * # NOQA
|
|
1069
|
-
#import vtool_ibeis as vt
|
|
1070
1068
|
# build test data
|
|
1071
1069
|
import utool as ut
|
|
1072
1070
|
import plottool_ibeis as pt
|
|
1073
|
-
import vtool_ibeis as vt
|
|
1074
1071
|
|
|
1075
1072
|
if True:
|
|
1076
1073
|
from ibeis.scripts.thesis import TMP_RC
|
|
1077
1074
|
import matplotlib as mpl
|
|
1078
1075
|
mpl.rcParams.update(TMP_RC)
|
|
1079
|
-
#import vtool_ibeis as vt
|
|
1080
1076
|
np.random.seed(0)
|
|
1081
1077
|
USE_COMMANLINE = True
|
|
1082
1078
|
if USE_COMMANLINE:
|
|
@@ -1085,24 +1081,16 @@ def draw_kp_ori_steps():
|
|
|
1085
1081
|
kp = kpts[fx]
|
|
1086
1082
|
else:
|
|
1087
1083
|
fx = 0
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
imgBGR = get_test_patch('star2', jitter=True)
|
|
1099
|
-
#imgBGR = get_test_patch('cross', jitter=False)
|
|
1100
|
-
#imgBGR = cv2.resize(imgBGR, (41, 41), interpolation=cv2.INTER_LANCZOS4)
|
|
1101
|
-
imgBGR = cv2.resize(imgBGR, (41, 41), interpolation=cv2.INTER_CUBIC)
|
|
1102
|
-
theta = 0 # 3.4 # TAU / 16
|
|
1103
|
-
#kpts = make_test_image_keypoints(imgBGR, scale=.9, theta=theta)
|
|
1104
|
-
kpts = make_test_image_keypoints(imgBGR, scale=.3, theta=theta, shift=(.3, .1))
|
|
1105
|
-
kp = kpts[0]
|
|
1084
|
+
#imgBGR = get_test_patch('stripe', jitter=True)
|
|
1085
|
+
#imgBGR = get_test_patch('star', jitter=True)
|
|
1086
|
+
imgBGR = get_test_patch('star2', jitter=True)
|
|
1087
|
+
#imgBGR = get_test_patch('cross', jitter=False)
|
|
1088
|
+
#imgBGR = cv2.resize(imgBGR, (41, 41), interpolation=cv2.INTER_LANCZOS4)
|
|
1089
|
+
imgBGR = cv2.resize(imgBGR, (41, 41), interpolation=cv2.INTER_CUBIC)
|
|
1090
|
+
theta = 0 # 3.4 # TAU / 16
|
|
1091
|
+
#kpts = make_test_image_keypoints(imgBGR, scale=.9, theta=theta)
|
|
1092
|
+
kpts = make_test_image_keypoints(imgBGR, scale=.3, theta=theta, shift=(.3, .1))
|
|
1093
|
+
kp = kpts[0]
|
|
1106
1094
|
bins = 36
|
|
1107
1095
|
maxima_thresh = .8
|
|
1108
1096
|
converge_lists = []
|
|
@@ -19,7 +19,7 @@ def compute_average_contrast(img):
|
|
|
19
19
|
>>> # ENABLE_DOCTEST
|
|
20
20
|
>>> from vtool_ibeis.quality_classifier import * # NOQA
|
|
21
21
|
>>> import vtool_ibeis as vt
|
|
22
|
-
>>> img_fpath = ut.grab_test_imgpath('carl
|
|
22
|
+
>>> img_fpath = ut.grab_test_imgpath('carl')
|
|
23
23
|
>>> img = vt.imread(img_fpath, grayscale=True)
|
|
24
24
|
>>> average_contrast, gradmag_sqrd = compute_average_contrast(img)
|
|
25
25
|
>>> # xdoctest: +REQUIRES(module:plottool_ibeis)
|
|
@@ -104,7 +104,7 @@ def fourier_devtest(img):
|
|
|
104
104
|
>>> # DISABLE_DOCTEST
|
|
105
105
|
>>> from vtool_ibeis.quality_classifier import * # NOQA
|
|
106
106
|
>>> import vtool_ibeis as vt
|
|
107
|
-
>>> img_fpath = ut.grab_test_imgpath('carl
|
|
107
|
+
>>> img_fpath = ut.grab_test_imgpath('carl')
|
|
108
108
|
>>> img = vt.imread(img_fpath, grayscale=True)
|
|
109
109
|
>>> magnitude_spectrum = fourier_devtest(img)
|
|
110
110
|
"""
|