Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv_contrib
Commits
3761c565
Commit
3761c565
authored
Apr 16, 2019
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shape: remove duplicate python test
parent
eb7c61fa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
26 deletions
+0
-26
test_shape.py
modules/shape/test_python/test_shape.py
+0
-26
No files found.
modules/shape/test_python/test_shape.py
deleted
100644 → 0
View file @
eb7c61fa
#!/usr/bin/env python
import
cv2
as
cv
from
tests_common
import
NewOpenCVTests
class
shape_test
(
NewOpenCVTests
):
def
test_computeDistance
(
self
):
a
=
self
.
get_sample
(
'samples/data/shape_sample/1.png'
,
cv
.
IMREAD_GRAYSCALE
)
b
=
self
.
get_sample
(
'samples/data/shape_sample/2.png'
,
cv
.
IMREAD_GRAYSCALE
)
ca
,
_
=
cv
.
findContours
(
a
,
cv
.
RETR_CCOMP
,
cv
.
CHAIN_APPROX_TC89_KCOS
)
cb
,
_
=
cv
.
findContours
(
b
,
cv
.
RETR_CCOMP
,
cv
.
CHAIN_APPROX_TC89_KCOS
)
hd
=
cv
.
createHausdorffDistanceExtractor
()
sd
=
cv
.
createShapeContextDistanceExtractor
()
d1
=
hd
.
computeDistance
(
ca
[
0
],
cb
[
0
])
d2
=
sd
.
computeDistance
(
ca
[
0
],
cb
[
0
])
self
.
assertAlmostEqual
(
d1
,
26.4196891785
,
3
,
"HausdorffDistanceExtractor"
)
self
.
assertAlmostEqual
(
d2
,
0.25804194808
,
3
,
"ShapeContextDistanceExtractor"
)
if
__name__
==
'__main__'
:
NewOpenCVTests
.
bootstrap
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment