2019-11-04 17:58:29 +08:00
|
|
|
# Classes and methods whitelist
|
2021-03-20 20:38:12 +08:00
|
|
|
|
|
|
|
core = {
|
|
|
|
'': [
|
|
|
|
'absdiff', 'add', 'addWeighted', 'bitwise_and', 'bitwise_not', 'bitwise_or', 'bitwise_xor', 'cartToPolar',
|
|
|
|
'compare', 'convertScaleAbs', 'copyMakeBorder', 'countNonZero', 'determinant', 'dft', 'divide', 'eigen',
|
|
|
|
'exp', 'flip', 'getOptimalDFTSize','gemm', 'hconcat', 'inRange', 'invert', 'kmeans', 'log', 'magnitude',
|
|
|
|
'max', 'mean', 'meanStdDev', 'merge', 'min', 'minMaxLoc', 'mixChannels', 'multiply', 'norm', 'normalize',
|
|
|
|
'perspectiveTransform', 'polarToCart', 'pow', 'randn', 'randu', 'reduce', 'repeat', 'rotate', 'setIdentity', 'setRNGSeed',
|
|
|
|
'solve', 'solvePoly', 'split', 'sqrt', 'subtract', 'trace', 'transform', 'transpose', 'vconcat',
|
|
|
|
'setLogLevel', 'getLogLevel',
|
|
|
|
],
|
|
|
|
'Algorithm': [],
|
|
|
|
}
|
2019-11-01 03:09:33 +08:00
|
|
|
|
2021-10-05 03:41:00 +08:00
|
|
|
imgproc = {
|
|
|
|
'': [
|
|
|
|
'Canny',
|
|
|
|
'GaussianBlur',
|
|
|
|
'Laplacian',
|
|
|
|
'HoughLines',
|
|
|
|
'HoughLinesP',
|
|
|
|
'HoughCircles',
|
|
|
|
'Scharr',
|
|
|
|
'Sobel',
|
|
|
|
'adaptiveThreshold',
|
|
|
|
'approxPolyDP',
|
|
|
|
'arcLength',
|
|
|
|
'bilateralFilter',
|
|
|
|
'blur',
|
|
|
|
'boundingRect',
|
|
|
|
'boxFilter',
|
|
|
|
'calcBackProject',
|
|
|
|
'calcHist',
|
|
|
|
'circle',
|
|
|
|
'compareHist',
|
|
|
|
'connectedComponents',
|
|
|
|
'connectedComponentsWithStats',
|
|
|
|
'contourArea',
|
|
|
|
'convexHull',
|
|
|
|
'convexityDefects',
|
|
|
|
'cornerHarris',
|
|
|
|
'cornerMinEigenVal',
|
|
|
|
'createCLAHE',
|
|
|
|
'createLineSegmentDetector',
|
|
|
|
'cvtColor',
|
|
|
|
'demosaicing',
|
|
|
|
'dilate',
|
|
|
|
'distanceTransform',
|
|
|
|
'distanceTransformWithLabels',
|
|
|
|
'drawContours',
|
|
|
|
'ellipse',
|
|
|
|
'ellipse2Poly',
|
|
|
|
'equalizeHist',
|
|
|
|
'erode',
|
|
|
|
'filter2D',
|
|
|
|
'findContours',
|
|
|
|
'fitEllipse',
|
|
|
|
'fitLine',
|
|
|
|
'floodFill',
|
|
|
|
'getAffineTransform',
|
|
|
|
'getPerspectiveTransform',
|
|
|
|
'getRotationMatrix2D',
|
|
|
|
'getStructuringElement',
|
|
|
|
'goodFeaturesToTrack',
|
|
|
|
'grabCut',
|
|
|
|
#'initUndistortRectifyMap', # 4.x: moved to calib3d
|
|
|
|
'integral',
|
|
|
|
'integral2',
|
|
|
|
'isContourConvex',
|
|
|
|
'line',
|
|
|
|
'matchShapes',
|
|
|
|
'matchTemplate',
|
|
|
|
'medianBlur',
|
|
|
|
'minAreaRect',
|
|
|
|
'minEnclosingCircle',
|
|
|
|
'moments',
|
|
|
|
'morphologyEx',
|
|
|
|
'pointPolygonTest',
|
|
|
|
'putText',
|
|
|
|
'pyrDown',
|
|
|
|
'pyrUp',
|
|
|
|
'rectangle',
|
|
|
|
'remap',
|
|
|
|
'resize',
|
|
|
|
'sepFilter2D',
|
|
|
|
'threshold',
|
|
|
|
#'undistort', # 4.x: moved to calib3d
|
|
|
|
'warpAffine',
|
|
|
|
'warpPerspective',
|
|
|
|
'warpPolar',
|
|
|
|
'watershed',
|
|
|
|
'fillPoly',
|
|
|
|
'fillConvexPoly',
|
|
|
|
'polylines',
|
2020-12-16 08:53:52 +08:00
|
|
|
],
|
|
|
|
'CLAHE': ['apply', 'collectGarbage', 'getClipLimit', 'getTilesGridSize', 'setClipLimit', 'setTilesGridSize'],
|
|
|
|
'segmentation_IntelligentScissorsMB': [
|
|
|
|
'IntelligentScissorsMB',
|
|
|
|
'setWeights',
|
|
|
|
'setGradientMagnitudeMaxLimit',
|
|
|
|
'setEdgeFeatureZeroCrossingParameters',
|
|
|
|
'setEdgeFeatureCannyParameters',
|
|
|
|
'applyImage',
|
|
|
|
'applyImageFeatures',
|
|
|
|
'buildMap',
|
|
|
|
'getContour'
|
|
|
|
],
|
|
|
|
}
|
2019-11-01 03:09:33 +08:00
|
|
|
|
2023-06-01 19:21:07 +08:00
|
|
|
objdetect = {'': ['groupRectangles', 'getPredefinedDictionary', 'extendDictionary',
|
|
|
|
'drawDetectedMarkers', 'generateImageMarker', 'drawDetectedCornersCharuco',
|
|
|
|
'drawDetectedDiamonds'],
|
2019-11-01 03:09:33 +08:00
|
|
|
'HOGDescriptor': ['load', 'HOGDescriptor', 'getDefaultPeopleDetector', 'getDaimlerPeopleDetector', 'setSVMDetector', 'detectMultiScale'],
|
2021-03-13 20:52:44 +08:00
|
|
|
'CascadeClassifier': ['load', 'detectMultiScale2', 'CascadeClassifier', 'detectMultiScale3', 'empty', 'detectMultiScale'],
|
2023-06-09 21:06:30 +08:00
|
|
|
'GraphicalCodeDetector': ['decode', 'detect', 'detectAndDecode', 'detectMulti', 'decodeMulti', 'detectAndDecodeMulti'],
|
|
|
|
'QRCodeDetector': ['QRCodeDetector', 'decode', 'detect', 'detectAndDecode', 'detectMulti', 'decodeMulti', 'detectAndDecodeMulti', 'decodeCurved', 'detectAndDecodeCurved', 'setEpsX', 'setEpsY'],
|
2023-06-01 19:21:07 +08:00
|
|
|
'aruco_PredefinedDictionaryType': [],
|
|
|
|
'aruco_Dictionary': ['Dictionary', 'getDistanceToId', 'generateImageMarker', 'getByteListFromBits', 'getBitsFromByteList'],
|
|
|
|
'aruco_Board': ['Board', 'matchImagePoints', 'generateImage'],
|
|
|
|
'aruco_GridBoard': ['GridBoard', 'generateImage', 'getGridSize', 'getMarkerLength', 'getMarkerSeparation', 'matchImagePoints'],
|
|
|
|
'aruco_CharucoParameters': ['CharucoParameters'],
|
|
|
|
'aruco_CharucoBoard': ['CharucoBoard', 'generateImage', 'getChessboardCorners', 'getNearestMarkerCorners', 'checkCharucoCornersCollinear', 'matchImagePoints', 'getLegacyPattern', 'setLegacyPattern'],
|
|
|
|
'aruco_DetectorParameters': ['DetectorParameters'],
|
|
|
|
'aruco_RefineParameters': ['RefineParameters'],
|
|
|
|
'aruco_ArucoDetector': ['ArucoDetector', 'detectMarkers', 'refineDetectedMarkers', 'setDictionary', 'setDetectorParameters', 'setRefineParameters'],
|
2023-06-13 21:37:52 +08:00
|
|
|
'aruco_CharucoDetector': ['CharucoDetector', 'setBoard', 'setCharucoParameters', 'setDetectorParameters', 'setRefineParameters', 'detectBoard', 'detectDiamonds'],
|
|
|
|
'QRCodeDetectorAruco_Params': ['Params'],
|
2023-06-14 21:53:32 +08:00
|
|
|
'QRCodeDetectorAruco': ['QRCodeDetectorAruco', 'decode', 'detect', 'detectAndDecode', 'detectMulti', 'decodeMulti', 'detectAndDecodeMulti', 'setDetectorParameters', 'setArucoParameters'],
|
|
|
|
'barcode_BarcodeDetector': ['BarcodeDetector', 'decode', 'detect', 'detectAndDecode', 'detectMulti', 'decodeMulti', 'detectAndDecodeMulti', 'decodeWithType', 'detectAndDecodeWithType']
|
2022-12-21 20:45:43 +08:00
|
|
|
}
|
2019-11-01 03:09:33 +08:00
|
|
|
|
2021-11-10 10:25:17 +08:00
|
|
|
video = {
|
|
|
|
'': [
|
|
|
|
'CamShift',
|
|
|
|
'calcOpticalFlowFarneback',
|
|
|
|
'calcOpticalFlowPyrLK',
|
|
|
|
'createBackgroundSubtractorMOG2',
|
|
|
|
'findTransformECC',
|
|
|
|
'meanShift',
|
|
|
|
],
|
|
|
|
'BackgroundSubtractorMOG2': ['BackgroundSubtractorMOG2', 'apply'],
|
|
|
|
'BackgroundSubtractor': ['apply', 'getBackgroundImage'],
|
|
|
|
# issue #21070: 'Tracker': ['init', 'update'],
|
|
|
|
'TrackerMIL': ['create'],
|
|
|
|
'TrackerMIL_Params': [],
|
|
|
|
}
|
2019-11-01 03:09:33 +08:00
|
|
|
|
2021-11-24 05:15:31 +08:00
|
|
|
dnn = {'dnn_Net': ['setInput', 'forward', 'setPreferableBackend'],
|
2019-11-01 03:09:33 +08:00
|
|
|
'': ['readNetFromCaffe', 'readNetFromTensorflow', 'readNetFromTorch', 'readNetFromDarknet',
|
2023-02-13 22:00:20 +08:00
|
|
|
'readNetFromONNX', 'readNetFromTFLite', 'readNet', 'blobFromImage']}
|
2019-11-01 03:09:33 +08:00
|
|
|
|
|
|
|
features2d = {'Feature2D': ['detect', 'compute', 'detectAndCompute', 'descriptorSize', 'descriptorType', 'defaultNorm', 'empty', 'getDefaultName'],
|
|
|
|
'BRISK': ['create', 'getDefaultName'],
|
2022-12-27 20:39:56 +08:00
|
|
|
'ORB': ['create', 'setMaxFeatures', 'setScaleFactor', 'setNLevels', 'setEdgeThreshold', 'setFastThreshold', 'setFirstLevel', 'setWTA_K', 'setScoreType', 'setPatchSize', 'getFastThreshold', 'getDefaultName'],
|
2019-11-01 03:09:33 +08:00
|
|
|
'MSER': ['create', 'detectRegions', 'setDelta', 'getDelta', 'setMinArea', 'getMinArea', 'setMaxArea', 'getMaxArea', 'setPass2Only', 'getPass2Only', 'getDefaultName'],
|
|
|
|
'FastFeatureDetector': ['create', 'setThreshold', 'getThreshold', 'setNonmaxSuppression', 'getNonmaxSuppression', 'setType', 'getType', 'getDefaultName'],
|
|
|
|
'AgastFeatureDetector': ['create', 'setThreshold', 'getThreshold', 'setNonmaxSuppression', 'getNonmaxSuppression', 'setType', 'getType', 'getDefaultName'],
|
|
|
|
'GFTTDetector': ['create', 'setMaxFeatures', 'getMaxFeatures', 'setQualityLevel', 'getQualityLevel', 'setMinDistance', 'getMinDistance', 'setBlockSize', 'getBlockSize', 'setHarrisDetector', 'getHarrisDetector', 'setK', 'getK', 'getDefaultName'],
|
|
|
|
# 'SimpleBlobDetector': ['create'],
|
|
|
|
'KAZE': ['create', 'setExtended', 'getExtended', 'setUpright', 'getUpright', 'setThreshold', 'getThreshold', 'setNOctaves', 'getNOctaves', 'setNOctaveLayers', 'getNOctaveLayers', 'setDiffusivity', 'getDiffusivity', 'getDefaultName'],
|
|
|
|
'AKAZE': ['create', 'setDescriptorType', 'getDescriptorType', 'setDescriptorSize', 'getDescriptorSize', 'setDescriptorChannels', 'getDescriptorChannels', 'setThreshold', 'getThreshold', 'setNOctaves', 'getNOctaves', 'setNOctaveLayers', 'getNOctaveLayers', 'setDiffusivity', 'getDiffusivity', 'getDefaultName'],
|
|
|
|
'DescriptorMatcher': ['add', 'clear', 'empty', 'isMaskSupported', 'train', 'match', 'knnMatch', 'radiusMatch', 'clone', 'create'],
|
|
|
|
'BFMatcher': ['isMaskSupported', 'create'],
|
|
|
|
'': ['drawKeypoints', 'drawMatches', 'drawMatchesKnn']}
|
|
|
|
|
2019-11-04 17:58:29 +08:00
|
|
|
photo = {'': ['createAlignMTB', 'createCalibrateDebevec', 'createCalibrateRobertson', \
|
|
|
|
'createMergeDebevec', 'createMergeMertens', 'createMergeRobertson', \
|
|
|
|
'createTonemapDrago', 'createTonemapMantiuk', 'createTonemapReinhard', 'inpaint'],
|
|
|
|
'CalibrateCRF': ['process'],
|
|
|
|
'AlignMTB' : ['calculateShift', 'shiftMat', 'computeBitmaps', 'getMaxBits', 'setMaxBits', \
|
|
|
|
'getExcludeRange', 'setExcludeRange', 'getCut', 'setCut'],
|
|
|
|
'CalibrateDebevec' : ['getLambda', 'setLambda', 'getSamples', 'setSamples', 'getRandom', 'setRandom'],
|
|
|
|
'CalibrateRobertson' : ['getMaxIter', 'setMaxIter', 'getThreshold', 'setThreshold', 'getRadiance'],
|
|
|
|
'MergeExposures' : ['process'],
|
|
|
|
'MergeDebevec' : ['process'],
|
|
|
|
'MergeMertens' : ['process', 'getContrastWeight', 'setContrastWeight', 'getSaturationWeight', \
|
|
|
|
'setSaturationWeight', 'getExposureWeight', 'setExposureWeight'],
|
|
|
|
'MergeRobertson' : ['process'],
|
|
|
|
'Tonemap' : ['process' , 'getGamma', 'setGamma'],
|
|
|
|
'TonemapDrago' : ['getSaturation', 'setSaturation', 'getBias', 'setBias', \
|
|
|
|
'getSigmaColor', 'setSigmaColor', 'getSigmaSpace','setSigmaSpace'],
|
|
|
|
'TonemapMantiuk' : ['getScale', 'setScale', 'getSaturation', 'setSaturation'],
|
|
|
|
'TonemapReinhard' : ['getIntensity', 'setIntensity', 'getLightAdaptation', 'setLightAdaptation', \
|
|
|
|
'getColorAdaptation', 'setColorAdaptation']
|
|
|
|
}
|
2019-11-01 03:09:33 +08:00
|
|
|
|
2021-10-05 00:51:49 +08:00
|
|
|
calib3d = {
|
|
|
|
'': [
|
|
|
|
'findHomography',
|
|
|
|
'calibrateCameraExtended',
|
|
|
|
'drawFrameAxes',
|
|
|
|
'estimateAffine2D',
|
|
|
|
'getDefaultNewCameraMatrix',
|
|
|
|
'initUndistortRectifyMap',
|
|
|
|
'Rodrigues',
|
|
|
|
'solvePnP',
|
|
|
|
'solvePnPRansac',
|
|
|
|
'solvePnPRefineLM',
|
|
|
|
'projectPoints',
|
2021-10-05 03:41:00 +08:00
|
|
|
'undistort',
|
2019-11-04 17:58:29 +08:00
|
|
|
|
2021-10-05 00:51:49 +08:00
|
|
|
# cv::fisheye namespace
|
|
|
|
'fisheye_initUndistortRectifyMap',
|
|
|
|
'fisheye_projectPoints',
|
|
|
|
],
|
|
|
|
}
|
2019-11-04 17:58:29 +08:00
|
|
|
|
2022-12-21 20:45:43 +08:00
|
|
|
white_list = makeWhiteList([core, imgproc, objdetect, video, dnn, features2d, photo, calib3d])
|
2021-10-05 00:51:49 +08:00
|
|
|
|
|
|
|
# namespace_prefix_override['dnn'] = '' # compatibility stuff (enabled by default)
|
2021-10-05 03:41:00 +08:00
|
|
|
# namespace_prefix_override['aruco'] = '' # compatibility stuff (enabled by default)
|