opencv/modules/cudaimgproc/doc/histogram.rst

151 lines
5.2 KiB
ReStructuredText
Raw Normal View History

Histogram Calculation
=====================
.. highlight:: cpp
2013-08-20 19:05:49 +08:00
cuda::calcHist
--------------
2013-05-06 17:36:52 +08:00
Calculates histogram for one channel 8-bit image.
2013-08-20 19:05:49 +08:00
.. ocv:function:: void cuda::calcHist(InputArray src, OutputArray hist, Stream& stream = Stream::Null())
2013-05-06 17:36:52 +08:00
:param src: Source image with ``CV_8UC1`` type.
:param hist: Destination histogram with one row, 256 columns, and the ``CV_32SC1`` type.
:param stream: Stream for the asynchronous version.
2013-08-20 19:05:49 +08:00
cuda::equalizeHist
------------------
2013-05-06 17:36:52 +08:00
Equalizes the histogram of a grayscale image.
2013-08-20 19:05:49 +08:00
.. ocv:function:: void cuda::equalizeHist(InputArray src, OutputArray dst, Stream& stream = Stream::Null())
2013-05-06 17:36:52 +08:00
2013-08-20 19:05:49 +08:00
.. ocv:function:: void cuda::equalizeHist(InputArray src, OutputArray dst, InputOutputArray buf, Stream& stream = Stream::Null())
2013-05-06 17:36:52 +08:00
: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.
.. seealso:: :ocv:func:`equalizeHist`
2013-08-20 19:05:49 +08:00
cuda::CLAHE
-----------
.. ocv:class:: cuda::CLAHE : public cv::CLAHE
2013-05-06 17:36:52 +08:00
Base class for Contrast Limited Adaptive Histogram Equalization. ::
class CV_EXPORTS CLAHE : public cv::CLAHE
{
public:
using cv::CLAHE::apply;
virtual void apply(InputArray src, OutputArray dst, Stream& stream) = 0;
};
2013-08-20 19:05:49 +08:00
cuda::CLAHE::apply
------------------
2013-05-06 17:36:52 +08:00
Equalizes the histogram of a grayscale image using Contrast Limited Adaptive Histogram Equalization.
2013-08-20 19:05:49 +08:00
.. ocv:function:: void cuda::CLAHE::apply(InputArray src, OutputArray dst)
2013-05-06 17:36:52 +08:00
2013-08-20 19:05:49 +08:00
.. ocv:function:: void cuda::CLAHE::apply(InputArray src, OutputArray dst, Stream& stream)
2013-05-06 17:36:52 +08:00
:param src: Source image with ``CV_8UC1`` type.
:param dst: Destination image.
:param stream: Stream for the asynchronous version.
2013-08-20 19:05:49 +08:00
cuda::createCLAHE
-----------------
Creates implementation for :ocv:class:`cuda::CLAHE` .
2013-05-06 17:36:52 +08:00
2013-08-20 19:05:49 +08:00
.. ocv:function:: Ptr<cuda::CLAHE> createCLAHE(double clipLimit = 40.0, Size tileGridSize = Size(8, 8))
2013-05-06 17:36:52 +08:00
:param clipLimit: Threshold for contrast limiting.
:param tileGridSize: Size of grid for histogram equalization. Input image will be divided into equally sized rectangular tiles. ``tileGridSize`` defines the number of tiles in row and column.
2013-08-20 19:05:49 +08:00
cuda::evenLevels
----------------
Computes levels with even distribution.
2013-08-20 19:05:49 +08:00
.. ocv:function:: void cuda::evenLevels(OutputArray levels, int nLevels, int lowerLevel, int upperLevel)
:param levels: Destination array. ``levels`` has 1 row, ``nLevels`` columns, and the ``CV_32SC1`` type.
: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.
2013-08-20 19:05:49 +08:00
cuda::histEven
--------------
Calculates a histogram with evenly distributed bins.
2013-08-20 19:05:49 +08:00
.. ocv:function:: void cuda::histEven(InputArray src, OutputArray hist, int histSize, int lowerLevel, int upperLevel, Stream& stream = Stream::Null())
2013-08-20 19:05:49 +08:00
.. ocv:function:: void cuda::histEven(InputArray src, OutputArray hist, InputOutputArray buf, int histSize, int lowerLevel, int upperLevel, Stream& stream = Stream::Null())
2013-08-20 19:05:49 +08:00
.. ocv:function:: void cuda::histEven(InputArray src, GpuMat hist[4], int histSize[4], int lowerLevel[4], int upperLevel[4], Stream& stream = Stream::Null())
2013-08-20 19:05:49 +08:00
.. ocv:function:: void cuda::histEven(InputArray src, GpuMat hist[4], InputOutputArray buf, int histSize[4], int lowerLevel[4], int upperLevel[4], Stream& stream = Stream::Null())
:param src: Source image. ``CV_8U``, ``CV_16U``, or ``CV_16S`` depth and 1 or 4 channels are supported. For a four-channel image, all channels are processed separately.
:param hist: Destination histogram with one row, ``histSize`` columns, and the ``CV_32S`` type.
: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.
2013-08-20 19:05:49 +08:00
cuda::histRange
---------------
Calculates a histogram with bins determined by the ``levels`` array.
2013-08-20 19:05:49 +08:00
.. ocv:function:: void cuda::histRange(InputArray src, OutputArray hist, InputArray levels, Stream& stream = Stream::Null())
2013-05-06 17:36:52 +08:00
2013-08-20 19:05:49 +08:00
.. ocv:function:: void cuda::histRange(InputArray src, OutputArray hist, InputArray levels, InputOutputArray buf, Stream& stream = Stream::Null())
2013-08-20 19:05:49 +08:00
.. ocv:function:: void cuda::histRange(InputArray src, GpuMat hist[4], const GpuMat levels[4], Stream& stream = Stream::Null())
2013-05-06 17:36:52 +08:00
2013-08-20 19:05:49 +08:00
.. ocv:function:: void cuda::histRange(InputArray src, GpuMat hist[4], const GpuMat levels[4], InputOutputArray buf, Stream& stream = Stream::Null())
:param src: Source image. ``CV_8U`` , ``CV_16U`` , or ``CV_16S`` depth and 1 or 4 channels are supported. 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.