exposed OpenCL-control functions to python
This commit is contained in:
@@ -46,12 +46,12 @@
|
|||||||
|
|
||||||
namespace cv { namespace ocl {
|
namespace cv { namespace ocl {
|
||||||
|
|
||||||
CV_EXPORTS bool haveOpenCL();
|
CV_EXPORTS_W bool haveOpenCL();
|
||||||
CV_EXPORTS bool useOpenCL();
|
CV_EXPORTS_W bool useOpenCL();
|
||||||
CV_EXPORTS bool haveAmdBlas();
|
CV_EXPORTS_W bool haveAmdBlas();
|
||||||
CV_EXPORTS bool haveAmdFft();
|
CV_EXPORTS_W bool haveAmdFft();
|
||||||
CV_EXPORTS void setUseOpenCL(bool flag);
|
CV_EXPORTS_W void setUseOpenCL(bool flag);
|
||||||
CV_EXPORTS void finish();
|
CV_EXPORTS_W void finish();
|
||||||
|
|
||||||
class CV_EXPORTS Context;
|
class CV_EXPORTS Context;
|
||||||
class CV_EXPORTS Device;
|
class CV_EXPORTS Device;
|
||||||
|
@@ -25,6 +25,7 @@ set(opencv_hdrs
|
|||||||
"${OPENCV_MODULE_opencv_core_LOCATION}/include/opencv2/core/types.hpp"
|
"${OPENCV_MODULE_opencv_core_LOCATION}/include/opencv2/core/types.hpp"
|
||||||
"${OPENCV_MODULE_opencv_core_LOCATION}/include/opencv2/core/persistence.hpp"
|
"${OPENCV_MODULE_opencv_core_LOCATION}/include/opencv2/core/persistence.hpp"
|
||||||
"${OPENCV_MODULE_opencv_core_LOCATION}/include/opencv2/core/utility.hpp"
|
"${OPENCV_MODULE_opencv_core_LOCATION}/include/opencv2/core/utility.hpp"
|
||||||
|
"${OPENCV_MODULE_opencv_core_LOCATION}/include/opencv2/core/ocl.hpp"
|
||||||
"${OPENCV_MODULE_opencv_flann_LOCATION}/include/opencv2/flann/miniflann.hpp"
|
"${OPENCV_MODULE_opencv_flann_LOCATION}/include/opencv2/flann/miniflann.hpp"
|
||||||
"${OPENCV_MODULE_opencv_imgproc_LOCATION}/include/opencv2/imgproc.hpp"
|
"${OPENCV_MODULE_opencv_imgproc_LOCATION}/include/opencv2/imgproc.hpp"
|
||||||
"${OPENCV_MODULE_opencv_video_LOCATION}/include/opencv2/video/background_segm.hpp"
|
"${OPENCV_MODULE_opencv_video_LOCATION}/include/opencv2/video/background_segm.hpp"
|
||||||
|
@@ -776,7 +776,7 @@ class PythonWrapperGenerator(object):
|
|||||||
classname = bareclassname = ""
|
classname = bareclassname = ""
|
||||||
name = decl[0]
|
name = decl[0]
|
||||||
dpos = name.rfind(".")
|
dpos = name.rfind(".")
|
||||||
if dpos >= 0 and name[:dpos] != "cv":
|
if dpos >= 0 and name[:dpos] not in ["cv", "cv.ocl"]:
|
||||||
classname = bareclassname = re.sub(r"^cv\.", "", name[:dpos])
|
classname = bareclassname = re.sub(r"^cv\.", "", name[:dpos])
|
||||||
name = name[dpos+1:]
|
name = name[dpos+1:]
|
||||||
dpos = classname.rfind(".")
|
dpos = classname.rfind(".")
|
||||||
@@ -785,6 +785,7 @@ class PythonWrapperGenerator(object):
|
|||||||
classname = classname.replace(".", "_")
|
classname = classname.replace(".", "_")
|
||||||
cname = name
|
cname = name
|
||||||
name = re.sub(r"^cv\.", "", name)
|
name = re.sub(r"^cv\.", "", name)
|
||||||
|
name = name.replace(".", "_")
|
||||||
isconstructor = cname == bareclassname
|
isconstructor = cname == bareclassname
|
||||||
cname = cname.replace(".", "::")
|
cname = cname.replace(".", "::")
|
||||||
isclassmethod = False
|
isclassmethod = False
|
||||||
|
@@ -6,6 +6,7 @@ import os, sys, re, string
|
|||||||
# the list only for debugging. The real list, used in the real OpenCV build, is specified in CMakeLists.txt
|
# the list only for debugging. The real list, used in the real OpenCV build, is specified in CMakeLists.txt
|
||||||
opencv_hdr_list = [
|
opencv_hdr_list = [
|
||||||
"../../core/include/opencv2/core.hpp",
|
"../../core/include/opencv2/core.hpp",
|
||||||
|
"../../core/include/opencv2/core/ocl.hpp",
|
||||||
"../../flann/include/opencv2/flann/miniflann.hpp",
|
"../../flann/include/opencv2/flann/miniflann.hpp",
|
||||||
"../../ml/include/opencv2/ml.hpp",
|
"../../ml/include/opencv2/ml.hpp",
|
||||||
"../../imgproc/include/opencv2/imgproc.hpp",
|
"../../imgproc/include/opencv2/imgproc.hpp",
|
||||||
|
Reference in New Issue
Block a user