GpuMat& result, Stream& stream = Stream::Null());\r
\r
//! Performa bilateral filtering of passsed image\r
-CV_EXPORTS void bilateralFilter(const GpuMat& src, GpuMat& dst, int kernel_size, float sigma_color, float sigma_spatial, \r
+CV_EXPORTS void bilateralFilter(const GpuMat& src, GpuMat& dst, int kernel_size, float sigma_color, float sigma_spatial,\r
int borderMode = BORDER_DEFAULT, Stream& stream = Stream::Null());\r
\r
//! Brute force non-local means algorith (slow but universal)\r
-CV_EXPORTS void nonLocalMeans(const GpuMat& src, GpuMat& dst, float h, \r
+CV_EXPORTS void nonLocalMeans(const GpuMat& src, GpuMat& dst, float h,\r
int search_widow_size = 11, int block_size = 7, int borderMode = BORDER_DEFAULT, Stream& s = Stream::Null());\r
\r
\r
CV_EXPORTS void HoughCircles(const GpuMat& src, GpuMat& circles, HoughCirclesBuf& buf, int method, float dp, float minDist, int cannyThreshold, int votesThreshold, int minRadius, int maxRadius, int maxCircles = 4096);\r
CV_EXPORTS void HoughCirclesDownload(const GpuMat& d_circles, OutputArray h_circles);\r
\r
+//! finds arbitrary template in the grayscale image using Generalized Hough Transform\r
+//! Ballard, D.H. (1981). Generalizing the Hough transform to detect arbitrary shapes. Pattern Recognition 13 (2): 111-122.\r
+//! Guil, N., González-Linares, J.M. and Zapata, E.L. (1999). Bidimensional shape detection using an invariant approach. Pattern Recognition 32 (6): 1025-1038.\r
+class CV_EXPORTS GeneralizedHough_GPU : public Algorithm\r
+{\r
+public:\r
+ static Ptr<GeneralizedHough_GPU> create(int method);\r
+\r
+ virtual ~GeneralizedHough_GPU();\r
+\r
+ //! set template to search\r
+ void setTemplate(const GpuMat& templ, int cannyThreshold = 100, Point templCenter = Point(-1, -1));\r
+ void setTemplate(const GpuMat& edges, const GpuMat& dx, const GpuMat& dy, Point templCenter = Point(-1, -1));\r
+\r
+ //! find template on image\r
+ void detect(const GpuMat& image, GpuMat& positions, int cannyThreshold = 100);\r
+ void detect(const GpuMat& edges, const GpuMat& dx, const GpuMat& dy, GpuMat& positions);\r
+\r
+ void download(const GpuMat& d_positions, OutputArray h_positions, OutputArray h_votes = noArray());\r
+\r
+ void release();\r
+\r
+protected:\r
+ virtual void setTemplateImpl(const GpuMat& edges, const GpuMat& dx, const GpuMat& dy, Point templCenter) = 0;\r
+ virtual void detectImpl(const GpuMat& edges, const GpuMat& dx, const GpuMat& dy, GpuMat& positions) = 0;\r
+ virtual void releaseImpl() = 0;\r
+\r
+private:\r
+ GpuMat edges_;\r
+ CannyBuf cannyBuf_;\r
+};\r
+\r
////////////////////////////// Matrix reductions //////////////////////////////\r
\r
//! computes mean value and standard deviation of all or selected array elements\r