Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
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
Commits
e72f4511
Commit
e72f4511
authored
5 years ago
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14305 from cameron-martin:calib3d-js
parents
e21f89a1
0ae053fd
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
54 additions
and
4 deletions
+54
-4
CMakeLists.txt
modules/calib3d/CMakeLists.txt
+3
-1
embindgen.py
modules/js/src/embindgen.py
+3
-1
test_calib3d.js
modules/js/test/test_calib3d.js
+43
-0
tests.html
modules/js/test/tests.html
+1
-0
tests.js
modules/js/test/tests.js
+3
-1
build_js.py
platforms/js/build_js.py
+1
-1
No files found.
modules/calib3d/CMakeLists.txt
View file @
e72f4511
...
...
@@ -3,4 +3,6 @@ set(debug_modules "")
if
(
DEBUG_opencv_calib3d
)
list
(
APPEND debug_modules opencv_highgui
)
endif
()
ocv_define_module
(
calib3d opencv_imgproc opencv_features2d
${
debug_modules
}
WRAP java python
)
ocv_define_module
(
calib3d opencv_imgproc opencv_features2d
${
debug_modules
}
WRAP java python js
)
This diff is collapsed.
Click to expand it.
modules/js/src/embindgen.py
View file @
e72f4511
...
...
@@ -142,6 +142,8 @@ features2d = {'Feature2D': ['detect', 'compute', 'detectAndCompute', 'descriptor
'BFMatcher'
:
[
'isMaskSupported'
,
'create'
],
''
:
[
'drawKeypoints'
,
'drawMatches'
]}
calib3d
=
{
''
:
[
'findHomography'
]}
def
makeWhiteList
(
module_list
):
wl
=
{}
for
m
in
module_list
:
...
...
@@ -152,7 +154,7 @@ def makeWhiteList(module_list):
wl
[
k
]
=
m
[
k
]
return
wl
white_list
=
makeWhiteList
([
core
,
imgproc
,
objdetect
,
video
,
dnn
,
features2d
])
white_list
=
makeWhiteList
([
core
,
imgproc
,
objdetect
,
video
,
dnn
,
features2d
,
calib3d
])
# Features to be exported
export_enums
=
False
...
...
This diff is collapsed.
Click to expand it.
modules/js/test/test_calib3d.js
0 → 100644
View file @
e72f4511
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
if
(
typeof
module
!==
'undefined'
&&
module
.
exports
)
{
// The envrionment is Node.js
var
cv
=
require
(
'./opencv.js'
);
// eslint-disable-line no-var
}
QUnit
.
module
(
'Camera Calibration and 3D Reconstruction'
,
{});
QUnit
.
test
(
'constants'
,
function
(
assert
)
{
assert
.
strictEqual
(
typeof
cv
.
LMEDS
,
'number'
);
assert
.
strictEqual
(
typeof
cv
.
RANSAC
,
'number'
);
assert
.
strictEqual
(
typeof
cv
.
RHO
,
'number'
);
});
QUnit
.
test
(
'findHomography'
,
function
(
assert
)
{
let
srcPoints
=
cv
.
matFromArray
(
4
,
1
,
cv
.
CV_32FC2
,
[
56
,
65
,
368
,
52
,
28
,
387
,
389
,
390
,
]);
let
dstPoints
=
cv
.
matFromArray
(
4
,
1
,
cv
.
CV_32FC2
,
[
0
,
0
,
300
,
0
,
0
,
300
,
300
,
300
,
]);
const
mat
=
cv
.
findHomography
(
srcPoints
,
dstPoints
);
assert
.
ok
(
mat
instanceof
cv
.
Mat
);
});
This diff is collapsed.
Click to expand it.
modules/js/test/tests.html
View file @
e72f4511
...
...
@@ -29,6 +29,7 @@
<script
type=
"application/javascript"
src=
"test_objdetect.js"
></script>
<script
type=
"application/javascript"
src=
"test_video.js"
></script>
<script
type=
"application/javascript"
src=
"test_features2d.js"
></script>
<script
type=
"application/javascript"
src=
"test_calib3d.js"
></script>
<script
type=
'text/javascript'
>
QUnit
.
config
.
autostart
=
false
;
...
...
This diff is collapsed.
Click to expand it.
modules/js/test/tests.js
View file @
e72f4511
...
...
@@ -45,7 +45,9 @@ testrunner.run(
{
code
:
'opencv.js'
,
tests
:
[
'test_mat.js'
,
'test_utils.js'
,
'test_imgproc.js'
,
'test_objdetect.js'
,
'test_video.js'
,
'test_features2d.js'
],
'test_objdetect.js'
,
'test_video.js'
,
'test_features2d.js'
,
'test_calib3d.js'
],
},
function
(
err
,
report
)
{
console
.
log
(
report
.
failed
+
' failed, '
+
report
.
passed
+
' passed'
);
...
...
This diff is collapsed.
Click to expand it.
platforms/js/build_js.py
View file @
e72f4511
...
...
@@ -115,7 +115,7 @@ class Builder:
"-DWITH_QUIRC=OFF"
,
"-DBUILD_ZLIB=ON"
,
"-DBUILD_opencv_apps=OFF"
,
"-DBUILD_opencv_calib3d=ON"
,
# No bindings provided. This module is used as a dependency for other modules.
"-DBUILD_opencv_calib3d=ON"
,
"-DBUILD_opencv_dnn=ON"
,
"-DBUILD_opencv_features2d=ON"
,
"-DBUILD_opencv_flann=OFF"
,
...
...
This diff is collapsed.
Click to expand it.
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