001//
002// This file is auto-generated. Please don't modify it!
003//
004package org.opencv.imgproc;
005
006import org.opencv.core.Algorithm;
007import org.opencv.core.Mat;
008import org.opencv.core.Size;
009
010// C++: class CLAHE
011/**
012 * Base class for Contrast Limited Adaptive Histogram Equalization.
013 */
014public class CLAHE extends Algorithm {
015
016    protected CLAHE(long addr) { super(addr); }
017
018    // internal usage only
019    public static CLAHE __fromPtr__(long addr) { return new CLAHE(addr); }
020
021    //
022    // C++:  void cv::CLAHE::apply(Mat src, Mat& dst)
023    //
024
025    /**
026     * Equalizes the histogram of a grayscale image using Contrast Limited Adaptive Histogram Equalization.
027     *
028     *     @param src Source image of type CV_8UC1 or CV_16UC1.
029     *     @param dst Destination image.
030     */
031    public void apply(Mat src, Mat dst) {
032        apply_0(nativeObj, src.nativeObj, dst.nativeObj);
033    }
034
035
036    //
037    // C++:  void cv::CLAHE::setClipLimit(double clipLimit)
038    //
039
040    /**
041     * Sets threshold for contrast limiting.
042     *
043     *     @param clipLimit threshold value.
044     */
045    public void setClipLimit(double clipLimit) {
046        setClipLimit_0(nativeObj, clipLimit);
047    }
048
049
050    //
051    // C++:  double cv::CLAHE::getClipLimit()
052    //
053
054    public double getClipLimit() {
055        return getClipLimit_0(nativeObj);
056    }
057
058
059    //
060    // C++:  void cv::CLAHE::setTilesGridSize(Size tileGridSize)
061    //
062
063    /**
064     * Sets size of grid for histogram equalization. Input image will be divided into
065     *     equally sized rectangular tiles.
066     *
067     *     @param tileGridSize defines the number of tiles in row and column.
068     */
069    public void setTilesGridSize(Size tileGridSize) {
070        setTilesGridSize_0(nativeObj, tileGridSize.width, tileGridSize.height);
071    }
072
073
074    //
075    // C++:  Size cv::CLAHE::getTilesGridSize()
076    //
077
078    public Size getTilesGridSize() {
079        return new Size(getTilesGridSize_0(nativeObj));
080    }
081
082
083    //
084    // C++:  void cv::CLAHE::collectGarbage()
085    //
086
087    public void collectGarbage() {
088        collectGarbage_0(nativeObj);
089    }
090
091
092    @Override
093    protected void finalize() throws Throwable {
094        delete(nativeObj);
095    }
096
097
098
099    // C++:  void cv::CLAHE::apply(Mat src, Mat& dst)
100    private static native void apply_0(long nativeObj, long src_nativeObj, long dst_nativeObj);
101
102    // C++:  void cv::CLAHE::setClipLimit(double clipLimit)
103    private static native void setClipLimit_0(long nativeObj, double clipLimit);
104
105    // C++:  double cv::CLAHE::getClipLimit()
106    private static native double getClipLimit_0(long nativeObj);
107
108    // C++:  void cv::CLAHE::setTilesGridSize(Size tileGridSize)
109    private static native void setTilesGridSize_0(long nativeObj, double tileGridSize_width, double tileGridSize_height);
110
111    // C++:  Size cv::CLAHE::getTilesGridSize()
112    private static native double[] getTilesGridSize_0(long nativeObj);
113
114    // C++:  void cv::CLAHE::collectGarbage()
115    private static native void collectGarbage_0(long nativeObj);
116
117    // native support for java finalize()
118    private static native void delete(long nativeObj);
119
120}