Skip to content

Commit

Permalink
* Add presets for the text module of OpenCV 3.1 (pull #333)
Browse files Browse the repository at this point in the history
  • Loading branch information
beligum authored and saudet committed Dec 13, 2016
1 parent b6769f6 commit 252f317
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion opencv/cppbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ tar -xzvf ../opencv-$OPENCV_VERSION.tar.gz
tar -xzvf ../opencv_contrib-$OPENCV_VERSION.tar.gz
cd opencv-$OPENCV_VERSION

BUILD_CONTRIB_X="-DBUILD_opencv_stereo=OFF -DBUILD_opencv_plot=OFF -DBUILD_opencv_fuzzy=OFF -DBUILD_opencv_aruco=OFF -DBUILD_opencv_adas=OFF -DBUILD_opencv_bgsegm=OFF -DBUILD_opencv_bioinspired=ON -DBUILD_opencv_ccalib=OFF -DBUILD_opencv_datasets=OFF -DBUILD_opencv_dnn=ON -DBUILD_opencv_dpm=OFF -DBUILD_opencv_face=ON -DBUILD_opencv_latentsvm=OFF -DBUILD_opencv_line_descriptor=OFF -DBUILD_opencv_matlab=OFF -DBUILD_opencv_optflow=ON -DBUILD_opencv_reg=OFF -DBUILD_opencv_rgbd=OFF -DBUILD_opencv_saliency=OFF -DBUILD_opencv_surface_matching=OFF -DBUILD_opencv_text=OFF -DBUILD_opencv_tracking=OFF -DBUILD_opencv_xfeatures2d=ON -DBUILD_opencv_ximgproc=ON -DBUILD_opencv_xobjdetect=OFF -DBUILD_opencv_xphoto=OFF"
BUILD_CONTRIB_X="-DBUILD_opencv_stereo=OFF -DBUILD_opencv_plot=OFF -DBUILD_opencv_fuzzy=OFF -DBUILD_opencv_aruco=OFF -DBUILD_opencv_adas=OFF -DBUILD_opencv_bgsegm=OFF -DBUILD_opencv_bioinspired=ON -DBUILD_opencv_ccalib=OFF -DBUILD_opencv_datasets=OFF -DBUILD_opencv_dnn=ON -DBUILD_opencv_dpm=OFF -DBUILD_opencv_face=ON -DBUILD_opencv_latentsvm=OFF -DBUILD_opencv_line_descriptor=OFF -DBUILD_opencv_matlab=OFF -DBUILD_opencv_optflow=ON -DBUILD_opencv_reg=OFF -DBUILD_opencv_rgbd=OFF -DBUILD_opencv_saliency=OFF -DBUILD_opencv_surface_matching=OFF -DBUILD_opencv_text=ON -DBUILD_opencv_tracking=OFF -DBUILD_opencv_xfeatures2d=ON -DBUILD_opencv_ximgproc=ON -DBUILD_opencv_xobjdetect=OFF -DBUILD_opencv_xphoto=OFF"

case $PLATFORM in
android-arm)
Expand Down
32 changes: 32 additions & 0 deletions opencv/src/main/java/org/bytedeco/javacpp/presets/opencv_text.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package org.bytedeco.javacpp.presets;

import org.bytedeco.javacpp.annotation.Platform;
import org.bytedeco.javacpp.annotation.Properties;
import org.bytedeco.javacpp.tools.Info;
import org.bytedeco.javacpp.tools.InfoMap;
import org.bytedeco.javacpp.tools.InfoMapper;

/**
* Wrapper for OpenCV module text, part of OpenCV_Contrib.
*
* @author Bram Biesbrouck
*/
@Properties(inherit = {opencv_highgui.class, opencv_ml.class}, value = {
@Platform(include = {"<opencv2/text.hpp>", "<opencv2/text/erfilter.hpp>", "<opencv2/text/ocr.hpp>", "opencv_adapters.h"},
link = "opencv_text@.3.1"),
@Platform(value = "windows", link = "opencv_text310")},
target = "org.bytedeco.javacpp.opencv_text")
public class opencv_text implements InfoMapper {
public void map(InfoMap infoMap) {

infoMap.put(new Info("std::deque<int>").pointerTypes("IntDeque").define());
infoMap.put(new Info("std::vector<cv::text::ERStat>").pointerTypes("ERStatVector").define());
infoMap.put(new Info("std::vector<std::vector<cv::text::ERStat> >").pointerTypes("ERStatVectorVector").define());
infoMap.put(new Info("std::vector<double>").pointerTypes("DoubleVector").define());
infoMap.put(new Info("std::vector<std::string>").pointerTypes("StdStringVector").define());

infoMap.put(new Info("std::vector<cv::Vec2i>").pointerTypes("PointVector").cast());
infoMap.put(new Info("std::vector<std::vector<cv::Vec2i> >").pointerTypes("PointVectorVector").cast());

}
}

0 comments on commit 252f317

Please sign in to comment.