1 # Classes and methods whitelist
5 'absdiff', 'add', 'addWeighted', 'bitwise_and', 'bitwise_not', 'bitwise_or', 'bitwise_xor', 'cartToPolar',
6 'compare', 'convertScaleAbs', 'copyMakeBorder', 'countNonZero', 'determinant', 'dft', 'divide', 'eigen',
7 'exp', 'flip', 'getOptimalDFTSize','gemm', 'hconcat', 'inRange', 'invert', 'kmeans', 'log', 'magnitude',
8 'max', 'mean', 'meanStdDev', 'merge', 'min', 'minMaxLoc', 'mixChannels', 'multiply', 'norm', 'normalize',
9 'perspectiveTransform', 'polarToCart', 'pow', 'randn', 'randu', 'reduce', 'repeat', 'rotate', 'setIdentity', 'setRNGSeed',
10 'solve', 'solvePoly', 'split', 'sqrt', 'subtract', 'trace', 'transform', 'transpose', 'vconcat',
11 'setLogLevel', 'getLogLevel',
37 'connectedComponents',
38 'connectedComponentsWithStats',
45 'createLineSegmentDetector',
50 'distanceTransformWithLabels',
62 'getPerspectiveTransform',
63 'getRotationMatrix2D',
64 'getStructuringElement',
65 'goodFeaturesToTrack',
67 #'initUndistortRectifyMap', # 4.x: moved to calib3d
88 #'undistort', # 4.x: moved to calib3d
97 'CLAHE': ['apply', 'collectGarbage', 'getClipLimit', 'getTilesGridSize', 'setClipLimit', 'setTilesGridSize'],
98 'segmentation_IntelligentScissorsMB': [
99 'IntelligentScissorsMB',
101 'setGradientMagnitudeMaxLimit',
102 'setEdgeFeatureZeroCrossingParameters',
103 'setEdgeFeatureCannyParameters',
105 'applyImageFeatures',
111 objdetect = {'': ['groupRectangles'],
112 'HOGDescriptor': ['load', 'HOGDescriptor', 'getDefaultPeopleDetector', 'getDaimlerPeopleDetector', 'setSVMDetector', 'detectMultiScale'],
113 'CascadeClassifier': ['load', 'detectMultiScale2', 'CascadeClassifier', 'detectMultiScale3', 'empty', 'detectMultiScale'],
114 'QRCodeDetector': ['QRCodeDetector', 'decode', 'decodeCurved', 'detect', 'detectAndDecode', 'detectMulti', 'setEpsX', 'setEpsY']}
119 'calcOpticalFlowFarneback',
120 'calcOpticalFlowPyrLK',
121 'createBackgroundSubtractorMOG2',
125 'BackgroundSubtractorMOG2': ['BackgroundSubtractorMOG2', 'apply'],
126 'BackgroundSubtractor': ['apply', 'getBackgroundImage'],
127 # issue #21070: 'Tracker': ['init', 'update'],
128 'TrackerMIL': ['create'],
129 'TrackerMIL_Params': [],
132 dnn = {'dnn_Net': ['setInput', 'forward', 'setPreferableBackend'],
133 '': ['readNetFromCaffe', 'readNetFromTensorflow', 'readNetFromTorch', 'readNetFromDarknet',
134 'readNetFromONNX', 'readNet', 'blobFromImage']}
136 features2d = {'Feature2D': ['detect', 'compute', 'detectAndCompute', 'descriptorSize', 'descriptorType', 'defaultNorm', 'empty', 'getDefaultName'],
137 'BRISK': ['create', 'getDefaultName'],
138 'ORB': ['create', 'setMaxFeatures', 'setScaleFactor', 'setNLevels', 'setEdgeThreshold', 'setFirstLevel', 'setWTA_K', 'setScoreType', 'setPatchSize', 'getFastThreshold', 'getDefaultName'],
139 'MSER': ['create', 'detectRegions', 'setDelta', 'getDelta', 'setMinArea', 'getMinArea', 'setMaxArea', 'getMaxArea', 'setPass2Only', 'getPass2Only', 'getDefaultName'],
140 'FastFeatureDetector': ['create', 'setThreshold', 'getThreshold', 'setNonmaxSuppression', 'getNonmaxSuppression', 'setType', 'getType', 'getDefaultName'],
141 'AgastFeatureDetector': ['create', 'setThreshold', 'getThreshold', 'setNonmaxSuppression', 'getNonmaxSuppression', 'setType', 'getType', 'getDefaultName'],
142 'GFTTDetector': ['create', 'setMaxFeatures', 'getMaxFeatures', 'setQualityLevel', 'getQualityLevel', 'setMinDistance', 'getMinDistance', 'setBlockSize', 'getBlockSize', 'setHarrisDetector', 'getHarrisDetector', 'setK', 'getK', 'getDefaultName'],
143 # 'SimpleBlobDetector': ['create'],
144 'KAZE': ['create', 'setExtended', 'getExtended', 'setUpright', 'getUpright', 'setThreshold', 'getThreshold', 'setNOctaves', 'getNOctaves', 'setNOctaveLayers', 'getNOctaveLayers', 'setDiffusivity', 'getDiffusivity', 'getDefaultName'],
145 'AKAZE': ['create', 'setDescriptorType', 'getDescriptorType', 'setDescriptorSize', 'getDescriptorSize', 'setDescriptorChannels', 'getDescriptorChannels', 'setThreshold', 'getThreshold', 'setNOctaves', 'getNOctaves', 'setNOctaveLayers', 'getNOctaveLayers', 'setDiffusivity', 'getDiffusivity', 'getDefaultName'],
146 'DescriptorMatcher': ['add', 'clear', 'empty', 'isMaskSupported', 'train', 'match', 'knnMatch', 'radiusMatch', 'clone', 'create'],
147 'BFMatcher': ['isMaskSupported', 'create'],
148 '': ['drawKeypoints', 'drawMatches', 'drawMatchesKnn']}
150 photo = {'': ['createAlignMTB', 'createCalibrateDebevec', 'createCalibrateRobertson', \
151 'createMergeDebevec', 'createMergeMertens', 'createMergeRobertson', \
152 'createTonemapDrago', 'createTonemapMantiuk', 'createTonemapReinhard', 'inpaint'],
153 'CalibrateCRF': ['process'],
154 'AlignMTB' : ['calculateShift', 'shiftMat', 'computeBitmaps', 'getMaxBits', 'setMaxBits', \
155 'getExcludeRange', 'setExcludeRange', 'getCut', 'setCut'],
156 'CalibrateDebevec' : ['getLambda', 'setLambda', 'getSamples', 'setSamples', 'getRandom', 'setRandom'],
157 'CalibrateRobertson' : ['getMaxIter', 'setMaxIter', 'getThreshold', 'setThreshold', 'getRadiance'],
158 'MergeExposures' : ['process'],
159 'MergeDebevec' : ['process'],
160 'MergeMertens' : ['process', 'getContrastWeight', 'setContrastWeight', 'getSaturationWeight', \
161 'setSaturationWeight', 'getExposureWeight', 'setExposureWeight'],
162 'MergeRobertson' : ['process'],
163 'Tonemap' : ['process' , 'getGamma', 'setGamma'],
164 'TonemapDrago' : ['getSaturation', 'setSaturation', 'getBias', 'setBias', \
165 'getSigmaColor', 'setSigmaColor', 'getSigmaSpace','setSigmaSpace'],
166 'TonemapMantiuk' : ['getScale', 'setScale', 'getSaturation', 'setSaturation'],
167 'TonemapReinhard' : ['getIntensity', 'setIntensity', 'getLightAdaptation', 'setLightAdaptation', \
168 'getColorAdaptation', 'setColorAdaptation']
171 aruco = {'': ['detectMarkers', 'drawDetectedMarkers', 'drawAxis', 'estimatePoseSingleMarkers', 'estimatePoseBoard', 'estimatePoseCharucoBoard', 'interpolateCornersCharuco', 'drawDetectedCornersCharuco'],
172 'aruco_Dictionary': ['get', 'drawMarker'],
173 'aruco_Board': ['create'],
174 'aruco_GridBoard': ['create', 'draw'],
175 'aruco_CharucoBoard': ['create', 'draw'],
176 'aruco_DetectorParameters': ['create']
182 'calibrateCameraExtended',
185 'getDefaultNewCameraMatrix',
186 'initUndistortRectifyMap',
194 # cv::fisheye namespace
195 'fisheye_initUndistortRectifyMap',
196 'fisheye_projectPoints',
200 white_list = makeWhiteList([core, imgproc, objdetect, video, dnn, features2d, photo, aruco, calib3d])
202 # namespace_prefix_override['dnn'] = '' # compatibility stuff (enabled by default)
203 # namespace_prefix_override['aruco'] = '' # compatibility stuff (enabled by default)