mirror of
https://github.com/opencv/opencv.git
synced 2025-06-10 19:24:07 +08:00
js: support setLogLevel() / getLogLevel() calls
This commit is contained in:
parent
960f501cc1
commit
a97f6f8058
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
#include <opencv2/core/async.hpp>
|
#include <opencv2/core/async.hpp>
|
||||||
#include <opencv2/core/detail/async_promise.hpp>
|
#include <opencv2/core/detail/async_promise.hpp>
|
||||||
|
#include <opencv2/core/utils/logger.hpp>
|
||||||
|
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
@ -144,7 +145,26 @@ AsyncArray testAsyncException()
|
|||||||
return p.getArrayResult();
|
return p.getArrayResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
//! @}
|
//! @} // core_utils
|
||||||
}} // namespace
|
} // namespace cv::utils
|
||||||
|
|
||||||
|
//! @cond IGNORED
|
||||||
|
|
||||||
|
CV_WRAP static inline
|
||||||
|
int setLogLevel(int level)
|
||||||
|
{
|
||||||
|
// NB: Binding generators doesn't work with enums properly yet, so we define separate overload here
|
||||||
|
return cv::utils::logging::setLogLevel((cv::utils::logging::LogLevel)level);
|
||||||
|
}
|
||||||
|
|
||||||
|
CV_WRAP static inline
|
||||||
|
int getLogLevel()
|
||||||
|
{
|
||||||
|
return cv::utils::logging::getLogLevel();
|
||||||
|
}
|
||||||
|
|
||||||
|
//! @endcond IGNORED
|
||||||
|
|
||||||
|
} // namespaces cv / utils
|
||||||
|
|
||||||
#endif // OPENCV_CORE_BINDINGS_UTILS_HPP
|
#endif // OPENCV_CORE_BINDINGS_UTILS_HPP
|
||||||
|
@ -26,7 +26,9 @@ ocv_list_filterout(opencv_hdrs "modules/cuda.*")
|
|||||||
ocv_list_filterout(opencv_hdrs "modules/cudev")
|
ocv_list_filterout(opencv_hdrs "modules/cudev")
|
||||||
ocv_list_filterout(opencv_hdrs "modules/core/.*/hal/")
|
ocv_list_filterout(opencv_hdrs "modules/core/.*/hal/")
|
||||||
ocv_list_filterout(opencv_hdrs "modules/.*/detection_based_tracker.hpp") # Conditional compilation
|
ocv_list_filterout(opencv_hdrs "modules/.*/detection_based_tracker.hpp") # Conditional compilation
|
||||||
ocv_list_filterout(opencv_hdrs "modules/core/include/opencv2/core/utils/.*")
|
ocv_list_filterout(opencv_hdrs "modules/core/include/opencv2/core/utils/*.private.*")
|
||||||
|
ocv_list_filterout(opencv_hdrs "modules/core/include/opencv2/core/utils/instrumentation.hpp")
|
||||||
|
ocv_list_filterout(opencv_hdrs "modules/core/include/opencv2/core/utils/trace*")
|
||||||
|
|
||||||
ocv_update_file("${CMAKE_CURRENT_BINARY_DIR}/headers.txt" "${opencv_hdrs}")
|
ocv_update_file("${CMAKE_CURRENT_BINARY_DIR}/headers.txt" "${opencv_hdrs}")
|
||||||
|
|
||||||
|
@ -1,10 +1,17 @@
|
|||||||
core = {'': ['absdiff', 'add', 'addWeighted', 'bitwise_and', 'bitwise_not', 'bitwise_or', 'bitwise_xor', 'cartToPolar',\
|
# Classes and methods whitelist
|
||||||
'compare', 'convertScaleAbs', 'copyMakeBorder', 'countNonZero', 'determinant', 'dft', 'divide', 'eigen', \
|
|
||||||
'exp', 'flip', 'getOptimalDFTSize','gemm', 'hconcat', 'inRange', 'invert', 'kmeans', 'log', 'magnitude', \
|
core = {
|
||||||
'max', 'mean', 'meanStdDev', 'merge', 'min', 'minMaxLoc', 'mixChannels', 'multiply', 'norm', 'normalize', \
|
'': [
|
||||||
'perspectiveTransform', 'polarToCart', 'pow', 'randn', 'randu', 'reduce', 'repeat', 'rotate', 'setIdentity', 'setRNGSeed', \
|
'absdiff', 'add', 'addWeighted', 'bitwise_and', 'bitwise_not', 'bitwise_or', 'bitwise_xor', 'cartToPolar',
|
||||||
'solve', 'solvePoly', 'split', 'sqrt', 'subtract', 'trace', 'transform', 'transpose', 'vconcat'],
|
'compare', 'convertScaleAbs', 'copyMakeBorder', 'countNonZero', 'determinant', 'dft', 'divide', 'eigen',
|
||||||
'Algorithm': []}
|
'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': [],
|
||||||
|
}
|
||||||
|
|
||||||
imgproc = {'': ['Canny', 'GaussianBlur', 'Laplacian', 'HoughLines', 'HoughLinesP', 'HoughCircles', 'Scharr','Sobel', \
|
imgproc = {'': ['Canny', 'GaussianBlur', 'Laplacian', 'HoughLines', 'HoughLinesP', 'HoughCircles', 'Scharr','Sobel', \
|
||||||
'adaptiveThreshold','approxPolyDP','arcLength','bilateralFilter','blur','boundingRect','boxFilter',\
|
'adaptiveThreshold','approxPolyDP','arcLength','bilateralFilter','blur','boundingRect','boxFilter',\
|
||||||
|
Loading…
Reference in New Issue
Block a user