Merge pull request #3566 from jet47:cuda-imgproc-refactoring
This commit is contained in:
@@ -205,19 +205,11 @@ CV_EXPORTS void calcHist(InputArray src, OutputArray hist, Stream& stream = Stre
|
||||
|
||||
@param src Source image with CV_8UC1 type.
|
||||
@param dst Destination image.
|
||||
@param buf Optional buffer to avoid extra memory allocations (for many calls with the same sizes).
|
||||
@param stream Stream for the asynchronous version.
|
||||
|
||||
@sa equalizeHist
|
||||
*/
|
||||
CV_EXPORTS void equalizeHist(InputArray src, OutputArray dst, InputOutputArray buf, Stream& stream = Stream::Null());
|
||||
|
||||
/** @overload */
|
||||
static inline void equalizeHist(InputArray src, OutputArray dst, Stream& stream = Stream::Null())
|
||||
{
|
||||
GpuMat buf;
|
||||
cuda::equalizeHist(src, dst, buf, stream);
|
||||
}
|
||||
CV_EXPORTS void equalizeHist(InputArray src, OutputArray dst, Stream& stream = Stream::Null());
|
||||
|
||||
/** @brief Base class for Contrast Limited Adaptive Histogram Equalization. :
|
||||
*/
|
||||
@@ -248,8 +240,9 @@ CV_EXPORTS Ptr<cuda::CLAHE> createCLAHE(double clipLimit = 40.0, Size tileGridSi
|
||||
@param nLevels Number of computed levels. nLevels must be at least 2.
|
||||
@param lowerLevel Lower boundary value of the lowest level.
|
||||
@param upperLevel Upper boundary value of the greatest level.
|
||||
@param stream Stream for the asynchronous version.
|
||||
*/
|
||||
CV_EXPORTS void evenLevels(OutputArray levels, int nLevels, int lowerLevel, int upperLevel);
|
||||
CV_EXPORTS void evenLevels(OutputArray levels, int nLevels, int lowerLevel, int upperLevel, Stream& stream = Stream::Null());
|
||||
|
||||
/** @brief Calculates a histogram with evenly distributed bins.
|
||||
|
||||
@@ -259,27 +252,11 @@ a four-channel image, all channels are processed separately.
|
||||
@param histSize Size of the histogram.
|
||||
@param lowerLevel Lower boundary of lowest-level bin.
|
||||
@param upperLevel Upper boundary of highest-level bin.
|
||||
@param buf Optional buffer to avoid extra memory allocations (for many calls with the same sizes).
|
||||
@param stream Stream for the asynchronous version.
|
||||
*/
|
||||
CV_EXPORTS void histEven(InputArray src, OutputArray hist, InputOutputArray buf, int histSize, int lowerLevel, int upperLevel, Stream& stream = Stream::Null());
|
||||
|
||||
CV_EXPORTS void histEven(InputArray src, OutputArray hist, int histSize, int lowerLevel, int upperLevel, Stream& stream = Stream::Null());
|
||||
/** @overload */
|
||||
static inline void histEven(InputArray src, OutputArray hist, int histSize, int lowerLevel, int upperLevel, Stream& stream = Stream::Null())
|
||||
{
|
||||
GpuMat buf;
|
||||
cuda::histEven(src, hist, buf, histSize, lowerLevel, upperLevel, stream);
|
||||
}
|
||||
|
||||
/** @overload */
|
||||
CV_EXPORTS void histEven(InputArray src, GpuMat hist[4], InputOutputArray buf, int histSize[4], int lowerLevel[4], int upperLevel[4], Stream& stream = Stream::Null());
|
||||
|
||||
/** @overload */
|
||||
static inline void histEven(InputArray src, GpuMat hist[4], int histSize[4], int lowerLevel[4], int upperLevel[4], Stream& stream = Stream::Null())
|
||||
{
|
||||
GpuMat buf;
|
||||
cuda::histEven(src, hist, buf, histSize, lowerLevel, upperLevel, stream);
|
||||
}
|
||||
CV_EXPORTS void histEven(InputArray src, GpuMat hist[4], int histSize[4], int lowerLevel[4], int upperLevel[4], Stream& stream = Stream::Null());
|
||||
|
||||
/** @brief Calculates a histogram with bins determined by the levels array.
|
||||
|
||||
@@ -287,27 +264,11 @@ static inline void histEven(InputArray src, GpuMat hist[4], int histSize[4], int
|
||||
For a four-channel image, all channels are processed separately.
|
||||
@param hist Destination histogram with one row, (levels.cols-1) columns, and the CV_32SC1 type.
|
||||
@param levels Number of levels in the histogram.
|
||||
@param buf Optional buffer to avoid extra memory allocations (for many calls with the same sizes).
|
||||
@param stream Stream for the asynchronous version.
|
||||
*/
|
||||
CV_EXPORTS void histRange(InputArray src, OutputArray hist, InputArray levels, InputOutputArray buf, Stream& stream = Stream::Null());
|
||||
|
||||
CV_EXPORTS void histRange(InputArray src, OutputArray hist, InputArray levels, Stream& stream = Stream::Null());
|
||||
/** @overload */
|
||||
static inline void histRange(InputArray src, OutputArray hist, InputArray levels, Stream& stream = Stream::Null())
|
||||
{
|
||||
GpuMat buf;
|
||||
cuda::histRange(src, hist, levels, buf, stream);
|
||||
}
|
||||
|
||||
/** @overload */
|
||||
CV_EXPORTS void histRange(InputArray src, GpuMat hist[4], const GpuMat levels[4], InputOutputArray buf, Stream& stream = Stream::Null());
|
||||
|
||||
/** @overload */
|
||||
static inline void histRange(InputArray src, GpuMat hist[4], const GpuMat levels[4], Stream& stream = Stream::Null())
|
||||
{
|
||||
GpuMat buf;
|
||||
cuda::histRange(src, hist, levels, buf, stream);
|
||||
}
|
||||
CV_EXPORTS void histRange(InputArray src, GpuMat hist[4], const GpuMat levels[4], Stream& stream = Stream::Null());
|
||||
|
||||
//! @} cudaimgproc_hist
|
||||
|
||||
@@ -321,15 +282,17 @@ public:
|
||||
/** @brief Finds edges in an image using the @cite Canny86 algorithm.
|
||||
|
||||
@param image Single-channel 8-bit input image.
|
||||
@param edges Output edge map. It has the same size and type as image .
|
||||
@param edges Output edge map. It has the same size and type as image.
|
||||
@param stream Stream for the asynchronous version.
|
||||
*/
|
||||
virtual void detect(InputArray image, OutputArray edges) = 0;
|
||||
virtual void detect(InputArray image, OutputArray edges, Stream& stream = Stream::Null()) = 0;
|
||||
/** @overload
|
||||
@param dx First derivative of image in the vertical direction. Support only CV_32S type.
|
||||
@param dy First derivative of image in the horizontal direction. Support only CV_32S type.
|
||||
@param edges Output edge map. It has the same size and type as image .
|
||||
@param edges Output edge map. It has the same size and type as image.
|
||||
@param stream Stream for the asynchronous version.
|
||||
*/
|
||||
virtual void detect(InputArray dx, InputArray dy, OutputArray edges) = 0;
|
||||
virtual void detect(InputArray dx, InputArray dy, OutputArray edges, Stream& stream = Stream::Null()) = 0;
|
||||
|
||||
virtual void setLowThreshold(double low_thresh) = 0;
|
||||
virtual double getLowThreshold() const = 0;
|
||||
@@ -376,18 +339,20 @@ public:
|
||||
\f$(\rho, \theta)\f$ . \f$\rho\f$ is the distance from the coordinate origin \f$(0,0)\f$ (top-left corner of
|
||||
the image). \f$\theta\f$ is the line rotation angle in radians (
|
||||
\f$0 \sim \textrm{vertical line}, \pi/2 \sim \textrm{horizontal line}\f$ ).
|
||||
@param stream Stream for the asynchronous version.
|
||||
|
||||
@sa HoughLines
|
||||
*/
|
||||
virtual void detect(InputArray src, OutputArray lines) = 0;
|
||||
virtual void detect(InputArray src, OutputArray lines, Stream& stream = Stream::Null()) = 0;
|
||||
|
||||
/** @brief Downloads results from cuda::HoughLinesDetector::detect to host memory.
|
||||
|
||||
@param d_lines Result of cuda::HoughLinesDetector::detect .
|
||||
@param h_lines Output host array.
|
||||
@param h_votes Optional output array for line's votes.
|
||||
@param stream Stream for the asynchronous version.
|
||||
*/
|
||||
virtual void downloadResults(InputArray d_lines, OutputArray h_lines, OutputArray h_votes = noArray()) = 0;
|
||||
virtual void downloadResults(InputArray d_lines, OutputArray h_lines, OutputArray h_votes = noArray(), Stream& stream = Stream::Null()) = 0;
|
||||
|
||||
virtual void setRho(float rho) = 0;
|
||||
virtual float getRho() const = 0;
|
||||
@@ -431,10 +396,11 @@ public:
|
||||
@param lines Output vector of lines. Each line is represented by a 4-element vector
|
||||
\f$(x_1, y_1, x_2, y_2)\f$ , where \f$(x_1,y_1)\f$ and \f$(x_2, y_2)\f$ are the ending points of each detected
|
||||
line segment.
|
||||
@param stream Stream for the asynchronous version.
|
||||
|
||||
@sa HoughLinesP
|
||||
*/
|
||||
virtual void detect(InputArray src, OutputArray lines) = 0;
|
||||
virtual void detect(InputArray src, OutputArray lines, Stream& stream = Stream::Null()) = 0;
|
||||
|
||||
virtual void setRho(float rho) = 0;
|
||||
virtual float getRho() const = 0;
|
||||
@@ -475,10 +441,11 @@ public:
|
||||
@param src 8-bit, single-channel grayscale input image.
|
||||
@param circles Output vector of found circles. Each vector is encoded as a 3-element
|
||||
floating-point vector \f$(x, y, radius)\f$ .
|
||||
@param stream Stream for the asynchronous version.
|
||||
|
||||
@sa HoughCircles
|
||||
*/
|
||||
virtual void detect(InputArray src, OutputArray circles) = 0;
|
||||
virtual void detect(InputArray src, OutputArray circles, Stream& stream = Stream::Null()) = 0;
|
||||
|
||||
virtual void setDp(float dp) = 0;
|
||||
virtual float getDp() const = 0;
|
||||
@@ -593,8 +560,9 @@ public:
|
||||
positions).
|
||||
@param mask Optional region of interest. If the image is not empty (it needs to have the type
|
||||
CV_8UC1 and the same size as image ), it specifies the region in which the corners are detected.
|
||||
@param stream Stream for the asynchronous version.
|
||||
*/
|
||||
virtual void detect(InputArray image, OutputArray corners, InputArray mask = noArray()) = 0;
|
||||
virtual void detect(InputArray image, OutputArray corners, InputArray mask = noArray(), Stream& stream = Stream::Null()) = 0;
|
||||
};
|
||||
|
||||
/** @brief Creates implementation for cuda::CornersDetector .
|
||||
@@ -630,7 +598,7 @@ as src .
|
||||
@param sp Spatial window radius.
|
||||
@param sr Color window radius.
|
||||
@param criteria Termination criteria. See TermCriteria.
|
||||
@param stream
|
||||
@param stream Stream for the asynchronous version.
|
||||
|
||||
It maps each point of the source image into another point. As a result, you have a new color and new
|
||||
position of each point.
|
||||
@@ -650,7 +618,7 @@ src size. The type is CV_16SC2 .
|
||||
@param sp Spatial window radius.
|
||||
@param sr Color window radius.
|
||||
@param criteria Termination criteria. See TermCriteria.
|
||||
@param stream
|
||||
@param stream Stream for the asynchronous version.
|
||||
|
||||
@sa cuda::meanShiftFiltering
|
||||
*/
|
||||
@@ -666,9 +634,11 @@ CV_EXPORTS void meanShiftProc(InputArray src, OutputArray dstr, OutputArray dsts
|
||||
@param sr Color window radius.
|
||||
@param minsize Minimum segment size. Smaller segments are merged.
|
||||
@param criteria Termination criteria. See TermCriteria.
|
||||
@param stream Stream for the asynchronous version.
|
||||
*/
|
||||
CV_EXPORTS void meanShiftSegmentation(InputArray src, OutputArray dst, int sp, int sr, int minsize,
|
||||
TermCriteria criteria = TermCriteria(TermCriteria::MAX_ITER + TermCriteria::EPS, 5, 1));
|
||||
TermCriteria criteria = TermCriteria(TermCriteria::MAX_ITER + TermCriteria::EPS, 5, 1),
|
||||
Stream& stream = Stream::Null());
|
||||
|
||||
/////////////////////////// Match Template ////////////////////////////
|
||||
|
||||
|
Reference in New Issue
Block a user