From 96c1df14f4724c9710e845f83b79d6b0f43dc2d6 Mon Sep 17 00:00:00 2001 From: abidrahmank Date: Tue, 13 Aug 2013 19:51:32 +0530 Subject: [PATCH] CLAHE Python bindings --- .../imgproc/include/opencv2/imgproc/imgproc.hpp | 16 ++++++++-------- modules/python/src2/cv2.cpp | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/modules/imgproc/include/opencv2/imgproc/imgproc.hpp b/modules/imgproc/include/opencv2/imgproc/imgproc.hpp index 223ee32770..f51bbaab77 100644 --- a/modules/imgproc/include/opencv2/imgproc/imgproc.hpp +++ b/modules/imgproc/include/opencv2/imgproc/imgproc.hpp @@ -759,20 +759,20 @@ CV_EXPORTS double compareHist( const SparseMat& H1, const SparseMat& H2, int met //! normalizes the grayscale image brightness and contrast by normalizing its histogram CV_EXPORTS_W void equalizeHist( InputArray src, OutputArray dst ); -class CV_EXPORTS CLAHE : public Algorithm +class CV_EXPORTS_W CLAHE : public Algorithm { public: - virtual void apply(InputArray src, OutputArray dst) = 0; + CV_WRAP virtual void apply(InputArray src, OutputArray dst) = 0; - virtual void setClipLimit(double clipLimit) = 0; - virtual double getClipLimit() const = 0; + CV_WRAP virtual void setClipLimit(double clipLimit) = 0; + CV_WRAP virtual double getClipLimit() const = 0; - virtual void setTilesGridSize(Size tileGridSize) = 0; - virtual Size getTilesGridSize() const = 0; + CV_WRAP virtual void setTilesGridSize(Size tileGridSize) = 0; + CV_WRAP virtual Size getTilesGridSize() const = 0; - virtual void collectGarbage() = 0; + CV_WRAP virtual void collectGarbage() = 0; }; -CV_EXPORTS Ptr createCLAHE(double clipLimit = 40.0, Size tileGridSize = Size(8, 8)); +CV_EXPORTS_W Ptr createCLAHE(double clipLimit = 40.0, Size tileGridSize = Size(8, 8)); CV_EXPORTS float EMD( InputArray signature1, InputArray signature2, int distType, InputArray cost=noArray(), diff --git a/modules/python/src2/cv2.cpp b/modules/python/src2/cv2.cpp index 64c4ad9ff3..610d71863d 100644 --- a/modules/python/src2/cv2.cpp +++ b/modules/python/src2/cv2.cpp @@ -123,6 +123,7 @@ typedef Ptr Ptr_FeatureDetector; typedef Ptr Ptr_DescriptorExtractor; typedef Ptr Ptr_Feature2D; typedef Ptr Ptr_DescriptorMatcher; +typedef Ptr Ptr_CLAHE; typedef SimpleBlobDetector::Params SimpleBlobDetector_Params;