Home | History | Annotate | Download | only in src
      1 
      2 //
      3 // This file is auto-generated. Please don't modify it!
      4 //
      5 package org.opencv.imgcodecs;
      6 
      7 import java.lang.String;
      8 import java.util.ArrayList;
      9 import java.util.List;
     10 import org.opencv.core.Mat;
     11 import org.opencv.core.MatOfByte;
     12 import org.opencv.core.MatOfInt;
     13 import org.opencv.utils.Converters;
     14 
     15 public class Imgcodecs {
     16 
     17     public static final int
     18             CV_LOAD_IMAGE_UNCHANGED = -1,
     19             CV_LOAD_IMAGE_GRAYSCALE = 0,
     20             CV_LOAD_IMAGE_COLOR = 1,
     21             CV_LOAD_IMAGE_ANYDEPTH = 2,
     22             CV_LOAD_IMAGE_ANYCOLOR = 4,
     23             CV_IMWRITE_JPEG_QUALITY = 1,
     24             CV_IMWRITE_JPEG_PROGRESSIVE = 2,
     25             CV_IMWRITE_JPEG_OPTIMIZE = 3,
     26             CV_IMWRITE_JPEG_RST_INTERVAL = 4,
     27             CV_IMWRITE_JPEG_LUMA_QUALITY = 5,
     28             CV_IMWRITE_JPEG_CHROMA_QUALITY = 6,
     29             CV_IMWRITE_PNG_COMPRESSION = 16,
     30             CV_IMWRITE_PNG_STRATEGY = 17,
     31             CV_IMWRITE_PNG_BILEVEL = 18,
     32             CV_IMWRITE_PNG_STRATEGY_DEFAULT = 0,
     33             CV_IMWRITE_PNG_STRATEGY_FILTERED = 1,
     34             CV_IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY = 2,
     35             CV_IMWRITE_PNG_STRATEGY_RLE = 3,
     36             CV_IMWRITE_PNG_STRATEGY_FIXED = 4,
     37             CV_IMWRITE_PXM_BINARY = 32,
     38             CV_IMWRITE_WEBP_QUALITY = 64,
     39             CV_CVTIMG_FLIP = 1,
     40             CV_CVTIMG_SWAP_RB = 2,
     41             IMREAD_UNCHANGED = -1,
     42             IMREAD_GRAYSCALE = 0,
     43             IMREAD_COLOR = 1,
     44             IMREAD_ANYDEPTH = 2,
     45             IMREAD_ANYCOLOR = 4,
     46             IMREAD_LOAD_GDAL = 8,
     47             IMWRITE_JPEG_QUALITY = 1,
     48             IMWRITE_JPEG_PROGRESSIVE = 2,
     49             IMWRITE_JPEG_OPTIMIZE = 3,
     50             IMWRITE_JPEG_RST_INTERVAL = 4,
     51             IMWRITE_JPEG_LUMA_QUALITY = 5,
     52             IMWRITE_JPEG_CHROMA_QUALITY = 6,
     53             IMWRITE_PNG_COMPRESSION = 16,
     54             IMWRITE_PNG_STRATEGY = 17,
     55             IMWRITE_PNG_BILEVEL = 18,
     56             IMWRITE_PXM_BINARY = 32,
     57             IMWRITE_WEBP_QUALITY = 64,
     58             IMWRITE_PNG_STRATEGY_DEFAULT = 0,
     59             IMWRITE_PNG_STRATEGY_FILTERED = 1,
     60             IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY = 2,
     61             IMWRITE_PNG_STRATEGY_RLE = 3,
     62             IMWRITE_PNG_STRATEGY_FIXED = 4;
     63 
     64 
     65     //
     66     // C++:  Mat imread(String filename, int flags = IMREAD_COLOR)
     67     //
     68 
     69     //javadoc: imread(filename, flags)
     70     public static Mat imread(String filename, int flags)
     71     {
     72 
     73         Mat retVal = new Mat(imread_0(filename, flags));
     74 
     75         return retVal;
     76     }
     77 
     78     //javadoc: imread(filename)
     79     public static Mat imread(String filename)
     80     {
     81 
     82         Mat retVal = new Mat(imread_1(filename));
     83 
     84         return retVal;
     85     }
     86 
     87 
     88     //
     89     // C++:  bool imreadmulti(String filename, vector_Mat mats, int flags = IMREAD_ANYCOLOR)
     90     //
     91 
     92     //javadoc: imreadmulti(filename, mats, flags)
     93     public static boolean imreadmulti(String filename, List<Mat> mats, int flags)
     94     {
     95         Mat mats_mat = Converters.vector_Mat_to_Mat(mats);
     96         boolean retVal = imreadmulti_0(filename, mats_mat.nativeObj, flags);
     97 
     98         return retVal;
     99     }
    100 
    101     //javadoc: imreadmulti(filename, mats)
    102     public static boolean imreadmulti(String filename, List<Mat> mats)
    103     {
    104         Mat mats_mat = Converters.vector_Mat_to_Mat(mats);
    105         boolean retVal = imreadmulti_1(filename, mats_mat.nativeObj);
    106 
    107         return retVal;
    108     }
    109 
    110 
    111     //
    112     // C++:  bool imwrite(String filename, Mat img, vector_int params = std::vector<int>())
    113     //
    114 
    115     //javadoc: imwrite(filename, img, params)
    116     public static boolean imwrite(String filename, Mat img, MatOfInt params)
    117     {
    118         Mat params_mat = params;
    119         boolean retVal = imwrite_0(filename, img.nativeObj, params_mat.nativeObj);
    120 
    121         return retVal;
    122     }
    123 
    124     //javadoc: imwrite(filename, img)
    125     public static boolean imwrite(String filename, Mat img)
    126     {
    127 
    128         boolean retVal = imwrite_1(filename, img.nativeObj);
    129 
    130         return retVal;
    131     }
    132 
    133 
    134     //
    135     // C++:  Mat imdecode(Mat buf, int flags)
    136     //
    137 
    138     //javadoc: imdecode(buf, flags)
    139     public static Mat imdecode(Mat buf, int flags)
    140     {
    141 
    142         Mat retVal = new Mat(imdecode_0(buf.nativeObj, flags));
    143 
    144         return retVal;
    145     }
    146 
    147 
    148     //
    149     // C++:  bool imencode(String ext, Mat img, vector_uchar& buf, vector_int params = std::vector<int>())
    150     //
    151 
    152     //javadoc: imencode(ext, img, buf, params)
    153     public static boolean imencode(String ext, Mat img, MatOfByte buf, MatOfInt params)
    154     {
    155         Mat buf_mat = buf;
    156         Mat params_mat = params;
    157         boolean retVal = imencode_0(ext, img.nativeObj, buf_mat.nativeObj, params_mat.nativeObj);
    158 
    159         return retVal;
    160     }
    161 
    162     //javadoc: imencode(ext, img, buf)
    163     public static boolean imencode(String ext, Mat img, MatOfByte buf)
    164     {
    165         Mat buf_mat = buf;
    166         boolean retVal = imencode_1(ext, img.nativeObj, buf_mat.nativeObj);
    167 
    168         return retVal;
    169     }
    170 
    171 
    172 
    173 
    174     // C++:  Mat imread(String filename, int flags = IMREAD_COLOR)
    175     private static native long imread_0(String filename, int flags);
    176     private static native long imread_1(String filename);
    177 
    178     // C++:  bool imreadmulti(String filename, vector_Mat mats, int flags = IMREAD_ANYCOLOR)
    179     private static native boolean imreadmulti_0(String filename, long mats_mat_nativeObj, int flags);
    180     private static native boolean imreadmulti_1(String filename, long mats_mat_nativeObj);
    181 
    182     // C++:  bool imwrite(String filename, Mat img, vector_int params = std::vector<int>())
    183     private static native boolean imwrite_0(String filename, long img_nativeObj, long params_mat_nativeObj);
    184     private static native boolean imwrite_1(String filename, long img_nativeObj);
    185 
    186     // C++:  Mat imdecode(Mat buf, int flags)
    187     private static native long imdecode_0(long buf_nativeObj, int flags);
    188 
    189     // C++:  bool imencode(String ext, Mat img, vector_uchar& buf, vector_int params = std::vector<int>())
    190     private static native boolean imencode_0(String ext, long img_nativeObj, long buf_mat_nativeObj, long params_mat_nativeObj);
    191     private static native boolean imencode_1(String ext, long img_nativeObj, long buf_mat_nativeObj);
    192 
    193 }
    194