Skip to content

Commit

Permalink
* Define CV__LEGACY_PERSISTENCE to get back functions for `KeyPoin…
Browse files Browse the repository at this point in the history
…tVector` and `DMatchVector` (issue bytedeco/javacv#1012)
  • Loading branch information
saudet committed Jun 5, 2018
1 parent daf57f7 commit 12b0576
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

* Define `CV__LEGACY_PERSISTENCE` to get back functions for `KeyPointVector` and `DMatchVector` ([issue bytedeco/javacv#1012](https://github.com/bytedeco/javacv/issues/1012))
* Fix presets for OpenBLAS on `linux-ppc64le` not bundling correct libraries ([issue deeplearning4j/deeplearning4j#5447](https://github.com/deeplearning4j/deeplearning4j/issues/5447))
* Fix CUDA build for TensorFlow on Windows ([pull #567](https://github.com/bytedeco/javacpp-presets/pull/567))
* Disable optimized kernels of OpenBLAS on iOS as they return incorrect results ([issue #571](https://github.com/bytedeco/javacpp-presets/issues/571))
Expand Down
14 changes: 14 additions & 0 deletions opencv/src/main/java/org/bytedeco/javacpp/opencv_core.java
Original file line number Diff line number Diff line change
Expand Up @@ -22743,6 +22743,10 @@ public static class SeqReader extends Pointer {
@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str BytePointer name, @Const @ByRef SparseMat value );
@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str String name, @Const @ByRef SparseMat value );
// #ifdef CV__LEGACY_PERSISTENCE
@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str BytePointer name, @Const @ByRef KeyPointVector value);
@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str String name, @Const @ByRef KeyPointVector value);
@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str BytePointer name, @Const @ByRef DMatchVector value);
@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str String name, @Const @ByRef DMatchVector value);
// #endif

@Namespace("cv") public static native void writeScalar( @ByRef FileStorage fs, int value );
Expand Down Expand Up @@ -22772,6 +22776,8 @@ public static class SeqReader extends Pointer {
@Namespace("cv") public static native void read(@Const @ByRef FileNode node, @ByRef SparseMat mat, @Const @ByRef(nullValue = "cv::SparseMat()") SparseMat default_mat );
@Namespace("cv") public static native void read(@Const @ByRef FileNode node, @ByRef SparseMat mat );
// #ifdef CV__LEGACY_PERSISTENCE
@Namespace("cv") public static native void read(@Const @ByRef FileNode node, @ByRef KeyPointVector keypoints);
@Namespace("cv") public static native void read(@Const @ByRef FileNode node, @ByRef DMatchVector matches);
// #endif
@Namespace("cv") public static native void read(@Const @ByRef FileNode node, @ByRef KeyPoint value, @Const @ByRef KeyPoint default_value);
@Namespace("cv") public static native void read(@Const @ByRef FileNode node, @ByRef DMatch value, @Const @ByRef DMatch default_value);
Expand Down Expand Up @@ -22830,6 +22836,12 @@ public static class SeqReader extends Pointer {
@Namespace("cv") public static native void write(@ByRef FileStorage fs, @Str String name, @Const @ByRef DMatch m);

// #ifdef CV__LEGACY_PERSISTENCE
// This code is not needed anymore, but it is preserved here to keep source compatibility
// Implementation is similar to templates instantiations
@Namespace("cv") public static native void write(@ByRef FileStorage fs, @Const @ByRef KeyPoint kpt);
@Namespace("cv") public static native void write(@ByRef FileStorage fs, @Const @ByRef DMatch m);
@Namespace("cv") public static native void write(@ByRef FileStorage fs, @Const @ByRef KeyPointVector vec);
@Namespace("cv") public static native void write(@ByRef FileStorage fs, @Const @ByRef DMatchVector vec);
// #endif

/** \} FileStorage
Expand Down Expand Up @@ -22896,6 +22908,8 @@ public static class SeqReader extends Pointer {
@Namespace("cv") public static native @Name("operator >>") void shiftRight(@Const @ByRef FileNode n, @ByRef KeyPoint kpt);

// #ifdef CV__LEGACY_PERSISTENCE
@Namespace("cv") public static native @Name("operator >>") void shiftRight(@Const @ByRef FileNode n, @ByRef KeyPointVector vec);
@Namespace("cv") public static native @Name("operator >>") void shiftRight(@Const @ByRef FileNode n, @ByRef DMatchVector vec);
// #endif

/** \brief Reads DMatch from a file storage.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
public class opencv_core implements InfoMapper {
public void map(InfoMap infoMap) {
infoMap.put(new Info("algorithm", "map", "opencv_adapters.h").skip())
.put(new Info("__cplusplus", "CV_StaticAssert").define())
.put(new Info("__cplusplus", "CV_StaticAssert", "CV__LEGACY_PERSISTENCE").define())
.put(new Info("__OPENCV_BUILD", "defined __ICL", "defined __ICC", "defined __ECL", "defined __ECC", "defined __INTEL_COMPILER",
"defined WIN32 || defined _WIN32", "defined(__clang__)", "defined(__GNUC__)", "defined(_MSC_VER)",
"defined __GNUC__ || defined __clang__", "OPENCV_NOSTL_TRANSITIONAL", "CV_COLLECT_IMPL_DATA",
Expand Down

0 comments on commit 12b0576

Please sign in to comment.