public void map(InfoMap infoMap) { infoMap .put(new Info("CvMoments").base("AbstractCvMoments")) .put(new Info("_CvContourScanner").pointerTypes("CvContourScanner")) .put( new Info("CvContourScanner") .valueTypes("CvContourScanner") .pointerTypes("@ByPtrPtr CvContourScanner")) .put(new Info("cvCalcBackProject").cppTypes("void", "IplImage**", "CvArr*", "CvHistogram*")) .put( new Info("cvCalcBackProjectPatch") .cppTypes( "void", "IplImage**", "CvArr*", "CvSize", "CvHistogram*", "int", "double")) .put(new Info("cv::Vec4f", "cv::Vec6f").cast().pointerTypes("FloatPointer")); }
public void map(InfoMap infoMap) { infoMap .put( new Info("NOT_IMPLEMENTED", "NO_GPU", "CUDA_POST_KERNEL_CHECK") .cppTypes() .annotations()) .put(new Info("GFLAGS_GFLAGS_H_", "SWIG").define()) .put(new Info("cublasHandle_t", "curandGenerator_t").cast().valueTypes("Pointer")) .put( new Info("CBLAS_TRANSPOSE", "cublasStatus_t", "curandStatus_t", "hid_t") .cast() .valueTypes("int")) .put( new Info("std::string") .annotations("@StdString") .valueTypes("BytePointer", "String") .pointerTypes("@Cast({\"char*\", \"std::string*\"}) BytePointer")) .put(new Info("std::vector<std::string>").pointerTypes("StringVector").define()) .put( new Info("google::protobuf::int8", "google::protobuf::uint8") .cast() .valueTypes("byte") .pointerTypes("BytePointer", "ByteBuffer", "byte[]")) .put( new Info("google::protobuf::int16", "google::protobuf::uint16") .cast() .valueTypes("short") .pointerTypes("ShortPointer", "ShortBuffer", "short[]")) .put( new Info("google::protobuf::int32", "google::protobuf::uint32") .cast() .valueTypes("int") .pointerTypes("IntPointer", "IntBuffer", "int[]")) .put( new Info("google::protobuf::int64", "google::protobuf::uint64") .cast() .valueTypes("long") .pointerTypes("LongPointer", "LongBuffer", "long[]")) .put( new Info( "google::protobuf::Descriptor", "google::protobuf::EnumDescriptor", "google::protobuf::Message", "google::protobuf::Metadata", "google::protobuf::UnknownFieldSet", "google::protobuf::io::CodedInputStream", "google::protobuf::io::CodedOutputStream", "leveldb::Iterator", "leveldb::DB", "MDB_txn", "MDB_cursor", "MDB_dbi", "boost::mt19937") .cast() .pointerTypes("Pointer")) .put( new Info("google::protobuf::RepeatedField", "google::protobuf::RepeatedPtrField") .skip()); String[] functionTemplates = { "caffe_cpu_gemv", "caffe_axpy", "caffe_cpu_axpby", "caffe_copy", "caffe_set", "caffe_memset", "caffe_add_scalar", "caffe_scal", "caffe_sqr", "caffe_add", "caffe_sub", "caffe_mul", "caffe_div", "caffe_powx", "caffe_nextafter", "caffe_rng_uniform", "caffe_rng_gaussian", "caffe_rng_bernoulli", "caffe_rng_bernoulli", "caffe_exp", "caffe_abs", "caffe_cpu_dot", "caffe_cpu_strided_dot", "caffe_cpu_hamming_distance", "caffe_cpu_asum", "caffe_sign", "caffe_cpu_scale", "caffe_gpu_gemm", "caffe_gpu_gemv", "caffe_gpu_axpy", "caffe_gpu_axpby", "caffe_gpu_memcpy", "caffe_gpu_set", "caffe_gpu_memset", "caffe_gpu_add_scalar", "caffe_gpu_scal", "caffe_gpu_add", "caffe_gpu_sub", "caffe_gpu_mul", "caffe_gpu_div", "caffe_gpu_abs", "caffe_gpu_exp", "caffe_gpu_powx", "caffe_gpu_rng_uniform", "caffe_gpu_rng_gaussian", "caffe_gpu_rng_bernoulli", "caffe_gpu_dot", "caffe_gpu_hamming_distance", "caffe_gpu_asum", "caffe_gpu_sign", "caffe_gpu_sgnbit", "caffe_gpu_fabs", "caffe_gpu_scale", "hdf5_load_nd_dataset_helper", "hdf5_load_nd_dataset", "hdf5_save_nd_dataset", "im2col_cpu", "col2im_cpu", "im2col_gpu", "col2im_gpu" }; for (String t : functionTemplates) { infoMap .put(new Info("caffe::" + t + "<float>").javaNames(t + "_float")) .put(new Info("caffe::" + t + "<double>").javaNames(t + "_double")); } String classTemplates[] = { "Blob", "DataTransformer", "Filler", "ConstantFiller", "UniformFiller", "GaussianFiller", "PositiveUnitballFiller", "XavierFiller", "BaseDataLayer", "BasePrefetchingDataLayer", "DataLayer", "DummyDataLayer", "HDF5DataLayer", "HDF5OutputLayer", "ImageDataLayer", "MemoryDataLayer", "WindowDataLayer", "Layer", "LayerRegistry", "LayerRegisterer", "AccuracyLayer", "LossLayer", "ContrastiveLossLayer", "EuclideanLossLayer", "HingeLossLayer", "InfogainLossLayer", "MultinomialLogisticLossLayer", "SigmoidCrossEntropyLossLayer", "SoftmaxWithLossLayer", "NeuronLayer", "AbsValLayer", "BNLLLayer", "DropoutLayer", "ExpLayer", "PowerLayer", "ReLULayer", "SigmoidLayer", "TanHLayer", "ThresholdLayer", "PReLULayer", "ArgMaxLayer", "ConcatLayer", "EltwiseLayer", "FlattenLayer", "InnerProductLayer", "MVNLayer", "SilenceLayer", "SoftmaxLayer", "SplitLayer", "SliceLayer", "Net", "Solver", "SGDSolver", "NesterovSolver", "AdaGradSolver", "BaseConvolutionLayer", "ConvolutionLayer", "DeconvolutionLayer", "Im2colLayer", "LRNLayer", "PoolingLayer", /* "CuDNNReLULayer", "CuDNNSigmoidLayer", "CuDNNTanHLayer", "CuDNNSoftmaxLayer", "CuDNNConvolutionLayer", "CuDNNPoolingLayer" */ }; for (String t : classTemplates) { boolean purify = t.equals("BaseDataLayer") || t.equals("LossLayer") || t.equals("NeuronLayer"); boolean virtualize = t.endsWith("Layer"); infoMap .put( new Info("caffe::" + t + "<float>") .pointerTypes("Float" + t) .purify(purify) .virtualize(virtualize)) .put( new Info("caffe::" + t + "<double>") .pointerTypes("Double" + t) .purify(purify) .virtualize(virtualize)); } infoMap .put( new Info( "caffe::BasePrefetchingDataLayer<float>::InternalThreadEntry()", "caffe::BasePrefetchingDataLayer<double>::InternalThreadEntry()") .skip()) .put(new Info("caffe::GetFiller<float>").javaNames("GetFloatFiller")) .put(new Info("caffe::GetFiller<double>").javaNames("GetDoubleFiller")) .put(new Info("caffe::GetSolver<float>").javaNames("GetFloatSolver")) .put(new Info("caffe::GetSolver<double>").javaNames("GetDoubleSolver")) .put( new Info("boost::shared_ptr<caffe::Blob<float> >") .annotations("@SharedPtr") .pointerTypes("FloatBlob")) .put( new Info("boost::shared_ptr<caffe::Blob<double> >") .annotations("@SharedPtr") .pointerTypes("DoubleBlob")) .put( new Info("std::vector<boost::shared_ptr<caffe::Blob<float> > >") .pointerTypes("FloatBlobSharedVector") .define()) .put( new Info("std::vector<boost::shared_ptr<caffe::Blob<double> > >") .pointerTypes("DoubleBlobSharedVector") .define()) .put( new Info("boost::shared_ptr<caffe::Layer<float> >") .annotations( "@Cast({\"\", \"boost::shared_ptr<caffe::Layer<float> >\"}) @SharedPtr") .pointerTypes("FloatLayer")) .put( new Info("boost::shared_ptr<caffe::Layer<double> >") .annotations( "@Cast({\"\", \"boost::shared_ptr<caffe::Layer<double> >\"}) @SharedPtr") .pointerTypes("DoubleLayer")) .put( new Info("std::vector<boost::shared_ptr<caffe::Layer<float> > >") .pointerTypes("FloatLayerSharedVector") .define()) .put( new Info("std::vector<boost::shared_ptr<caffe::Layer<double> > >") .pointerTypes("DoubleLayerSharedVector") .define()) .put( new Info("boost::shared_ptr<caffe::Net<float> >") .annotations("@SharedPtr") .pointerTypes("FloatNet")) .put( new Info("boost::shared_ptr<caffe::Net<double> >") .annotations("@SharedPtr") .pointerTypes("DoubleNet")) .put( new Info("std::vector<boost::shared_ptr<caffe::Net<float> > >") .pointerTypes("FloatNetSharedVector") .define()) .put( new Info("std::vector<boost::shared_ptr<caffe::Net<double> > >") .pointerTypes("DoubleNetSharedVector") .define()) .put(new Info("std::vector<caffe::Blob<float>*>").pointerTypes("FloatBlobVector").define()) .put( new Info("std::vector<caffe::Blob<double>*>").pointerTypes("DoubleBlobVector").define()) .put( new Info("std::vector<std::vector<caffe::Blob<float>*> >") .pointerTypes("FloatBlobVectorVector") .define()) .put( new Info("std::vector<std::vector<caffe::Blob<double>*> >") .pointerTypes("DoubleBlobVectorVector") .define()) .put( new Info("caffe::LayerRegistry<float>::Creator") .valueTypes("FloatLayerRegistry.Creator")) .put( new Info("caffe::LayerRegistry<double>::Creator") .valueTypes("DoubleLayerRegistry.Creator")) .put( new Info("std::map<std::string,caffe::LayerRegistry<float>::Creator>") .pointerTypes("FloatRegistry") .define()) .put( new Info("std::map<std::string,caffe::LayerRegistry<double>::Creator>") .pointerTypes("DoubleRegistry") .define()) .put(new Info("std::vector<bool>").pointerTypes("BoolVector").define()) .put(new Info("std::vector<std::vector<bool> >").pointerTypes("BoolVectorVector").define()) .put(new Info("std::map<std::string,int>").pointerTypes("StringIntMap").define()) .put( new Info("caffe::Net<float>::layer_by_name") .javaText( "public FloatLayer layer_by_name(BytePointer layer_name) { return layer_by_name(FloatLayer.class, layer_name); }\n" + "public FloatLayer layer_by_name(String layer_name) { return layer_by_name(FloatLayer.class, layer_name); };\n" + "public native @Const @Cast({\"\", \"boost::shared_ptr<caffe::Layer<float> >\"}) @SharedPtr @ByVal <L extends FloatLayer> L layer_by_name(Class<L> cls, @StdString BytePointer layer_name);\n" + "public native @Const @Cast({\"\", \"boost::shared_ptr<caffe::Layer<float> >\"}) @SharedPtr @ByVal <L extends FloatLayer> L layer_by_name(Class<L> cls, @StdString String layer_name);\n")) .put( new Info("caffe::Net<double>::layer_by_name") .javaText( "public DoubleLayer layer_by_name(BytePointer layer_name) { return layer_by_name(DoubleLayer.class, layer_name); }\n" + "public DoubleLayer layer_by_name(String layer_name) { return layer_by_name(DoubleLayer.class, layer_name); };\n" + "public native @Const @Cast({\"\", \"boost::shared_ptr<caffe::Layer<double> >\"}) @SharedPtr @ByVal <L extends DoubleLayer> L layer_by_name(Class<L> cls, @StdString BytePointer layer_name);\n" + "public native @Const @Cast({\"\", \"boost::shared_ptr<caffe::Layer<double> >\"}) @SharedPtr @ByVal <L extends DoubleLayer> L layer_by_name(Class<L> cls, @StdString String layer_name);\n")); }
public void map(InfoMap infoMap) { infoMap .put(new Info("algorithm", "opencv_adapters.h").skip()) .put(new Info("__cplusplus", "CV_StaticAssert").define()) .put( new Info( "defined __ICL", "defined __ICC", "defined __ECL", "defined __ECC", "defined __INTEL_COMPILER", "defined WIN32 || defined _WIN32", "defined(__clang__)", "defined(__GNUC__)", "defined(_MSC_VER)", "OPENCV_NOSTL_TRANSITIONAL", "CV_COLLECT_IMPL_DATA") .define(false)) .put( new Info( "CV_ENABLE_UNROLLED", "CV_CDECL", "CV_STDCALL", "CV_IMPL", "CV_EXTERN_C", "CV_Func") .cppTypes() .cppText("")) .put( new Info( "CV_DEFAULT", "CV_INLINE", "CV_EXPORTS", "CV_NEON", "CPU_HAS_NEON_FEATURE", "CV_NORETURN", "CV_SUPPRESS_DEPRECATED_START", "CV_SUPPRESS_DEPRECATED_END") .cppTypes() .annotations()) .put(new Info("CVAPI").cppText("#define CVAPI(rettype) rettype")) .put( new Info( "CV_EXPORTS_W", "CV_EXPORTS_W_SIMPLE", "CV_EXPORTS_AS", "CV_EXPORTS_W_MAP", "CV_IN_OUT", "CV_OUT", "CV_PROP", "CV_PROP_RW", "CV_WRAP", "CV_WRAP_AS") .cppTypes() .annotations() .cppText("")) .put( new Info("CvRNG") .cast() .valueTypes("long") .pointerTypes("LongPointer", "LongBuffer", "long[]")) .put( new Info( "CV_MAT_DEPTH", "CV_8UC", "CV_8SC", "CV_16UC", "CV_16SC", "CV_32SC", "CV_32FC", "CV_64FC") .cppTypes("int", "int")) .put(new Info("CV_MAKETYPE", "CV_MAKE_TYPE").cppTypes("int", "int", "int")) .put( new Info( "CV_8UC1", "CV_8UC2", "CV_8UC3", "CV_8UC4", "CV_8SC1", "CV_8SC2", "CV_8SC3", "CV_8SC4", "CV_16UC1", "CV_16UC2", "CV_16UC3", "CV_16UC4", "CV_16SC1", "CV_16SC2", "CV_16SC3", "CV_16SC4", "CV_32SC1", "CV_32SC2", "CV_32SC3", "CV_32SC4", "CV_32FC1", "CV_32FC2", "CV_32FC3", "CV_32FC4", "CV_64FC1", "CV_64FC2", "CV_64FC3", "CV_64FC4") .cppTypes("int") .translate()) .put( new Info("CV_MAT_CN", "CV_MAT_TYPE", "CV_IS_CONT_MAT", "CV_IS_MAT_CONT") .cppTypes("int", "int")) .put(new Info("CV_WHOLE_ARR", "CV_WHOLE_SEQ").cppTypes("CvSlice").translate()) .put(new Info("CvArr").skip().pointerTypes("CvArr")) .put(new Info("_IplROI").pointerTypes("IplROI")) .put(new Info("_IplImage").pointerTypes("IplImage")) .put(new Info("_IplTileInfo").pointerTypes("IplTileInfo")) .put(new Info("IplImage").base("AbstractIplImage")) .put( new Info("IplConvKernel") .base("org.bytedeco.javacpp.helper.opencv_imgproc.AbstractIplConvKernel")) .put(new Info("CvMat").base("AbstractCvMat")) .put(new Info("CvMatND").base("AbstractCvMatND")) .put(new Info("CvSparseMat").base("AbstractCvSparseMat")) .put( new Info("CvHistogram") .base("org.bytedeco.javacpp.helper.opencv_imgproc.AbstractCvHistogram")) .put(new Info("CvRect").base("AbstractCvRect")) .put( new Info("CvPoint") .cast() .pointerTypes("CvPoint", "IntBuffer", "int[]") .base("AbstractCvPoint")) .put( new Info("CvPoint2D32f") .cast() .pointerTypes("CvPoint2D32f", "FloatBuffer", "float[]") .base("AbstractCvPoint2D32f")) .put( new Info("CvPoint3D32f") .cast() .pointerTypes("CvPoint3D32f", "FloatBuffer", "float[]") .base("AbstractCvPoint3D32f")) .put( new Info("CvPoint2D64f") .cast() .pointerTypes("CvPoint2D64f", "DoubleBuffer", "double[]") .base("AbstractCvPoint2D64f")) .put( new Info("CvPoint3D64f") .cast() .pointerTypes("CvPoint3D64f", "DoubleBuffer", "double[]") .base("AbstractCvPoint3D64f")) .put(new Info("CvSize").base("AbstractCvSize")) .put(new Info("CvSize2D32f").base("AbstractCvSize2D32f")) .put(new Info("CvBox2D").base("AbstractCvBox2D")) .put(new Info("CvScalar").base("AbstractCvScalar")) .put(new Info("CvMemStorage").base("AbstractCvMemStorage")) .put(new Info("CvSeq").base("AbstractCvSeq")) .put(new Info("CvSet").base("AbstractCvSet")) .put(new Info("CvChain", "CvContour", "CvContourTree").base("CvSeq")) .put(new Info("CvGraph").base("AbstractCvGraph")) .put(new Info("CvGraphVtx2D").base("CvGraphVtx")) .put(new Info("CvChainPtReader").base("CvSeqReader")) .put(new Info("CvFileStorage").base("AbstractCvFileStorage")) .put(new Info("CvGraphScanner").base("AbstractCvGraphScanner")) .put(new Info("CvFont").base("AbstractCvFont")) .put(new Info("cvGetSubArr").cppTypes("CvMat*", "CvArr*", "CvMat*", "CvRect")) .put(new Info("cvZero").cppTypes("void", "CvArr*")) .put( new Info("cvCvtScale", "cvScale", "cvCvtScaleAbs") .cppTypes("void", "CvArr*", "CvArr*", "double", "double")) .put(new Info("cvConvert", "cvT").cppTypes("void", "CvArr*", "CvArr*")) .put(new Info("cvCheckArray").cppTypes("int", "CvArr*", "int", "double", "double")) .put(new Info("cvMatMulAdd").cppTypes("void", "CvArr*", "CvArr*", "CvArr*", "CvArr*")) .put(new Info("cvMatMul").cppTypes("void", "CvArr*", "CvArr*", "CvArr*")) .put( new Info("cvMatMulAddEx") .cppTypes( "void", "CvArr*", "CvArr*", "double", "CvArr*", "double", "CvArr*", "int")) .put(new Info("cvMatMulAddS").cppTypes("void", "CvArr*", "CvArr*", "CvMat*", "CvMat*")) .put(new Info("cvMirror", "cvInv").cppTypes("void", "CvArr*", "CvArr*", "int")) .put(new Info("cvMahalonobis").cppTypes("double", "CvArr*", "CvArr*", "CvArr*")) .put(new Info("cvFFT").cppTypes("void", "CvArr*", "CvArr*", "int", "int")) .put(new Info("cvGraphFindEdge").cppTypes("CvGraphEdge*", "CvGraph*", "int", "int")) .put( new Info("cvGraphFindEdgeByPtr") .cppTypes("CvGraphEdge*", "CvGraph*", "CvGraphVtx*", "CvGraphVtx*")) .put( new Info("cvDrawRect", "cvDrawLine") .cppTypes("void", "CvArr*", "CvPoint", "CvPoint", "CvScalar", "int", "int", "int")) .put( new Info("cvDrawCircle") .cppTypes("void", "CvArr*", "CvPoint", "int", "CvScalar", "int", "int", "int")) .put( new Info("cvDrawEllipse") .cppTypes( "void", "CvArr*", "CvPoint", "CvSize", "double", "double", "double", "CvScalar", "int", "int", "int")) .put( new Info("cvDrawPolyLine") .cppTypes( "void", "CvArr*", "CvPoint**", "int*", "int", "int", "CvScalar", "int", "int", "int")) .put(new Info("__CV_BEGIN__", "__CV_END__", "__CV_EXIT__").cppTypes()) .put( new Info("std::vector<std::vector<char> >", "std::vector<std::vector<unsigned char> >") .cast() .pointerTypes("ByteVectorVector") .define()) .put(new Info("std::vector<std::vector<int> >").pointerTypes("IntVectorVector").define()) .put(new Info("std::vector<cv::String>").pointerTypes("StringVector").define()) .put(new Info("std::vector<cv::Point_<int> >").pointerTypes("PointVector").define()) .put(new Info("std::vector<cv::Point_<float> >").pointerTypes("Point2fVector").define()) .put(new Info("std::vector<cv::Point_<double> >").pointerTypes("Point2dVector").define()) .put(new Info("std::vector<cv::Size_<int> >").pointerTypes("SizeVector").define()) .put(new Info("std::vector<cv::Rect_<int> >").pointerTypes("RectVector").define()) .put(new Info("std::vector<cv::KeyPoint>").pointerTypes("KeyPointVector").define()) .put(new Info("std::vector<cv::DMatch>").pointerTypes("DMatchVector").define()) .put( new Info("std::vector<std::vector<cv::Point_<int> > >") .pointerTypes("PointVectorVector") .define()) .put( new Info("std::vector<std::vector<cv::Point_<float> > >") .pointerTypes("Point2fVectorVector") .define()) .put( new Info("std::vector<std::vector<cv::Point_<double> > >") .pointerTypes("Point2dVectorVector") .define()) .put( new Info("std::vector<std::vector<cv::Rect_<int> > >") .pointerTypes("RectVectorVector") .define()) .put( new Info("std::vector<std::vector<cv::KeyPoint> >") .pointerTypes("KeyPointVectorVector") .define()) .put( new Info("std::vector<std::vector<cv::DMatch> >") .pointerTypes("DMatchVectorVector") .define()) .put(new Info("std::vector<cv::Mat>").pointerTypes("MatVector").define()) .put(new Info("std::vector<cv::UMat>").pointerTypes("UMatVector").define()) .put(new Info("std::pair<int,int>").pointerTypes("IntIntPair").define()) .put(new Info("std::vector<std::pair<int,int> >").pointerTypes("IntIntPairVector").define()) .put( new Info("std::vector<std::pair<cv::Mat,unsigned char> >") .pointerTypes("MatBytePairVector") .define()) .put( new Info("std::vector<std::pair<cv::UMat,unsigned char> >") .pointerTypes("UMatBytePairVector") .define()) .put(new Info("cv::randu<int>").javaNames("intRand")) .put(new Info("cv::randu<float>").javaNames("floatRand")) .put(new Info("cv::randu<double>").javaNames("doubleRand")) .put( new Info( "CvModule::first", "CvModule::last", "CvType::first", "CvType::last", "cv::fromUtf16", "cv::toUtf16", "cv::Exception", "cv::Allocator", "cv::DataDepth", "cv::DataType", "cv::ParamType", "cv::_InputArray", "cv::_OutputArray", "cv::Mat_", "cv::SparseMat_", "cv::cuda::GpuMat", "cv::Matx_AddOp", "cv::Matx_SubOp", "cv::Matx_ScaleOp", "cv::Matx_MulOp", "cv::Matx_MatMulOp", "cv::Matx_TOp", "cv::Matx", "cv::Vec", "cv::MatIterator_", "cv::MatConstIterator_", "cv::Mat::MSize", "cv::Mat::MStep", "cv::MatCommaInitializer_", "cv::MatxCommaInitializer", "cv::VecCommaInitializer", "cv::MatConstIterator(cv::Mat*, int*)", "cv::SparseMatIterator(cv::SparseMat*, int*)", "cv::SparseMatIterator_", "cv::SparseMatConstIterator_", "cv::SparseMatConstIterator::operator --", "cv::AlgorithmInfoData", "cv::AlgorithmInfo::addParam", "cv::CommandLineParser") .skip()) .put(new Info("cv::AutoBuffer<double>").cast().pointerTypes("Pointer")) .put(new Info("cv::Mat").base("AbstractMat")) .put(new Info("cv::noArray()").javaText("public static Mat noArray() { return null; }")) .put( new Info("cv::Mat(int, int, int, void*, size_t)") .javaText( "public Mat(int rows, int cols, int type, Pointer data, @Cast(\"size_t\") long step/*=AUTO_STEP*/) { super((Pointer)null); allocate(rows, cols, type, data, step); this.data = data; }\n" + "private native void allocate(int rows, int cols, int type, Pointer data, @Cast(\"size_t\") long step/*=AUTO_STEP*/);\n" + "private Pointer data; // a reference to prevent deallocation\n" + "public Mat(int rows, int cols, int type, Pointer data) { this(rows, cols, type, data, AUTO_STEP); }\n" + "public Mat(CvArr arr) { super(cvarrToMat(arr)); this.data = arr; }\n" + "public Mat(byte ... b) { this(b, false); }\n" + "public Mat(byte[] b, boolean signed) { this(new BytePointer(b), signed); }\n" + "public Mat(short ... s) { this(s, true); }\n" + "public Mat(short[] s, boolean signed) { this(new ShortPointer(s), signed); }\n" + "public Mat(int ... n) { this(new IntPointer(n)); }\n" + "public Mat(double ... d) { this(new DoublePointer(d)); }\n" + "public Mat(float ... f) { this(new FloatPointer(f)); }\n" + "public Mat(BytePointer p, boolean signed) { this(p.limit - p.position, 1, signed ? CV_8SC1 : CV_8UC1, p); }\n" + "public Mat(ShortPointer p, boolean signed) { this(p.limit - p.position, 1, signed ? CV_16SC1 : CV_16UC1, p); }\n" + "public Mat(IntPointer p) { this(p.limit - p.position, 1, CV_32SC1, p); }\n" + "public Mat(FloatPointer p) { this(p.limit - p.position, 1, CV_32FC1, p); }\n" + "public Mat(DoublePointer p) { this(p.limit - p.position, 1, CV_64FC1, p); }\n")) .put(new Info("cv::Mat::zeros(int, int*, int)", "cv::Mat::ones(int, int*, int)").skip()) .put( new Info("cv::Mat::size") .javaText( "public native @ByVal Size size();\n@MemberGetter public native int size(int i);")) .put( new Info("cv::Mat::step") .javaText( "@MemberGetter public native long step();\n@MemberGetter public native int step(int i);")) .put(new Info("cv::UMat::zeros(int, int*, int)", "cv::UMat::ones(int, int*, int)").skip()) .put( new Info("cv::UMat::size") .javaText( "public native @ByVal Size size();\n@MemberGetter public native int size(int i);")) .put( new Info("cv::UMat::step") .javaText( "@MemberGetter public native long step();\n@MemberGetter public native int step(int i);")) .put( new Info( "cv::InputArray", "cv::OutputArray", "cv::InputOutputArray", "cv::_InputOutputArray") .skip() . /*cast().*/ pointerTypes("Mat")) .put( new Info( "cv::InputArrayOfArrays", "cv::OutputArrayOfArrays", "cv::InputOutputArrayOfArrays") .skip() . /*cast().*/ pointerTypes("MatVector")) .put(new Info("cv::Point_<int>").pointerTypes("Point").base("IntPointer")) .put(new Info("cv::Point_<float>").pointerTypes("Point2f").base("FloatPointer")) .put(new Info("cv::Point_<double>").pointerTypes("Point2d").base("DoublePointer")) .put(new Info("cv::Point3_<int>").pointerTypes("Point3i").base("IntPointer")) .put(new Info("cv::Point3_<float>").pointerTypes("Point3f").base("FloatPointer")) .put(new Info("cv::Point3_<double>").pointerTypes("Point3d").base("DoublePointer")) .put(new Info("cv::Size_<int>").pointerTypes("Size").base("IntPointer")) .put(new Info("cv::Size_<float>").pointerTypes("Size2f").base("FloatPointer")) .put(new Info("cv::Size_<double>").pointerTypes("Size2d").base("DoublePointer")) .put(new Info("cv::Rect_<int>").pointerTypes("Rect").base("IntPointer")) .put(new Info("cv::Rect_<float>").pointerTypes("Rectf").base("FloatPointer")) .put(new Info("cv::Rect_<double>").pointerTypes("Rectd").base("DoublePointer")) .put(new Info("cv::RotatedRect").pointerTypes("RotatedRect").base("FloatPointer")) .put(new Info("cv::Scalar_<double>").pointerTypes("Scalar").base("AbstractScalar")) .put(new Info("cv::Scalar_<int>").pointerTypes("Scalar4i").base("IntPointer")) .put(new Info("cv::Vec2i").pointerTypes("Point")) .put(new Info("cv::Vec2d").pointerTypes("Point2d")) .put(new Info("cv::Vec3d").pointerTypes("Point3d")) .put(new Info("cv::Vec4i").pointerTypes("Scalar4i")) .put( new Info( "defined __INTEL_COMPILER && !(defined WIN32 || defined _WIN32)", "defined __GNUC__", "defined WIN32 || defined _WIN32 || defined WINCE") .define(false)) .put( new Info( "cv::saturate_cast(uchar)", "cv::saturate_cast(ushort)", "cv::saturate_cast(unsigned)") .skip()) .put(new Info("cv::saturate_cast<uchar>").javaNames("ucharSaturateCast")) .put(new Info("cv::saturate_cast<schar>").javaNames("scharSaturateCast")) .put(new Info("cv::saturate_cast<ushort>").javaNames("ushortSaturateCast")) .put(new Info("cv::saturate_cast<short>").javaNames("shortSaturateCast")) .put(new Info("cv::saturate_cast<int>").javaNames("intSaturate")) .put(new Info("cv::saturate_cast<unsigned>").javaNames("unsignedSaturateCast")) .put(new Info("cv::normL2Sqr", "cv::normL1", "cv::seqPopMulti").skip()) .put( new Info("cv::Formatted(cv::Mat&, cv::Formatter*, int*)") .javaText( "public Formatted(@Const @ByRef Mat m, @Const Formatter fmt,\n" + " @StdVector IntPointer params) { allocate(m, fmt, params); }\n" + "private native void allocate(@Const @ByRef Mat m, @Const Formatter fmt,\n" + " @Cast({\"\", \"std::vector<int>&\"}) @StdVector IntPointer params);")) .put(new Info("cv::MinProblemSolver", "cv::DownhillSolver", "cv::ConjGradSolver").purify()) .put(new Info("cv::MinProblemSolver::Function").virtualize()) .put( new Info( "HAVE_OPENCV_CUDA", "HAVE_OPENCV_CUDAIMGPROC", "HAVE_OPENCV_CUDAOPTFLOW", "HAVE_OPENCV_CUDAWARPING", "HAVE_OPENCV_CUDALEGACY", "HAVE_OPENCV_XFEATURES2D", "defined(HAVE_OPENCV_CUDAWARPING)", "defined(HAVE_OPENCV_CUDAIMGPROC) && defined(HAVE_OPENCV_CUDAOPTFLOW)", "defined(HAVE_OPENCV_CUDA) && defined(HAVE_OPENCV_CUDAWARPING)") .define(false)) .put(new Info("cv::Ptr").skip().annotations("@Ptr")) .put(new Info("cv::String").skip().annotations("@Str").valueTypes("BytePointer", "String")); }
public void map(InfoMap infoMap) { infoMap.put(new Info("NPP_MAX_64U").translate(false)); }