mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 06:26:29 +08:00
Merge pull request #18985 from ZEISS:feature/aruco_js_fix
Aruco javascript fix and added functionality * whitespace * updated docu. updated regexp. * update docu * embindgen regex * removed parser arg * remove whitespace * removed aruco hint * remove whitespace * removed aruco hint * new docu string * removed extra line * remove whitespace * removed aruco hint * new docu string * removed extra line
This commit is contained in:
parent
624d532000
commit
b82700ae41
@ -127,6 +127,13 @@ Building OpenCV.js from Source
|
||||
python ./platforms/js/build_js.py build_js --build_test
|
||||
@endcode
|
||||
|
||||
-# [optional] To enable OpenCV contrib modules append `--cmake_option="-DOPENCV_EXTRA_MODULES_PATH=/path/to/opencv_contrib/modules/"`
|
||||
|
||||
For example:
|
||||
@code{.bash}
|
||||
python ./platforms/js/build_js.py build_js --cmake_option="-DOPENCV_EXTRA_MODULES_PATH=opencv_contrib/modules"
|
||||
@endcode
|
||||
|
||||
Running OpenCV.js Tests
|
||||
---------------------------------------
|
||||
|
||||
|
@ -634,8 +634,10 @@ class JSWrapperGenerator(object):
|
||||
ret_type = type_dict[ptr_type]
|
||||
for key in type_dict:
|
||||
if key in ret_type:
|
||||
ret_type = ret_type.replace(key, type_dict[key])
|
||||
|
||||
# Replace types. Instead of ret_type.replace we use regular
|
||||
# expression to exclude false matches.
|
||||
# See https://github.com/opencv/opencv/issues/15514
|
||||
ret_type = re.sub('(^|[^\w])' + key + '($|[^\w])', type_dict[key], ret_type)
|
||||
if variant.constret and ret_type.startswith('const') == False:
|
||||
ret_type = 'const ' + ret_type
|
||||
if variant.refret and ret_type.endswith('&') == False:
|
||||
|
@ -74,9 +74,12 @@ aruco = {'': ['detectMarkers', 'drawDetectedMarkers', 'drawAxis', 'estimatePoseS
|
||||
'aruco_Board': ['create'],
|
||||
'aruco_GridBoard': ['create', 'draw'],
|
||||
'aruco_CharucoBoard': ['create', 'draw'],
|
||||
'aruco_DetectorParameters': ['create']
|
||||
}
|
||||
|
||||
calib3d = {'': ['findHomography', 'calibrateCameraExtended', 'drawFrameAxes', 'estimateAffine2D', 'getDefaultNewCameraMatrix', 'initUndistortRectifyMap', 'Rodrigues']}
|
||||
calib3d = {'': ['findHomography', 'calibrateCameraExtended', 'drawFrameAxes', 'estimateAffine2D', \
|
||||
'getDefaultNewCameraMatrix', 'initUndistortRectifyMap', 'Rodrigues', \
|
||||
'solvePnP', 'solvePnPRansac', 'solvePnPRefineLM']}
|
||||
|
||||
|
||||
white_list = makeWhiteList([core, imgproc, objdetect, video, dnn, features2d, photo, aruco, calib3d])
|
||||
|
Loading…
Reference in New Issue
Block a user