Skip to content

Commit

Permalink
* Add a Mat(CvArr arr) constructor for convenience (issue bytedeco…
Browse files Browse the repository at this point in the history
  • Loading branch information
saudet committed Feb 2, 2016
1 parent 09ffb99 commit 2505c33
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

* Add a `Mat(CvArr arr)` constructor for convenience ([issue bytedeco/javacv#317](https://github.com/bytedeco/javacv/issues/317))
* Fix loading issue with `opencv_xfeatures2d` ([issue bytedeco/javacv#316](https://github.com/bytedeco/javacv/issues/316))
* Virtualize all `Solver` classes from Caffe ([issue #143](https://github.com/bytedeco/javacpp-presets/issues/143))
* Work around GSL not loading on Android ([issue bytedeco/javacpp#55](https://github.com/bytedeco/javacpp/issues/55))
Expand Down
1 change: 1 addition & 0 deletions opencv/src/main/java/org/bytedeco/javacpp/opencv_core.java
Original file line number Diff line number Diff line change
Expand Up @@ -14615,6 +14615,7 @@ the end of each row, if any. If the parameter is missing (set to AUTO_STEP ), no
private native void allocate(int rows, int cols, int type, Pointer data, @Cast("size_t") long step/*=AUTO_STEP*/);
private Pointer data; // a reference to prevent deallocation
public Mat(int rows, int cols, int type, Pointer data) { this(rows, cols, type, data, AUTO_STEP); }
public Mat(CvArr arr) { super(cvarrToMat(arr)); this.data = arr; }
public Mat(byte ... b) { this(b, false); }
public Mat(byte[] b, boolean signed) { this(new BytePointer(b), signed); }
public Mat(short ... s) { this(s, true); }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ public void map(InfoMap infoMap) {
+ "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"
Expand Down

0 comments on commit 2505c33

Please sign in to comment.