Skip to content

Commit

Permalink
* Update presets for Chilitags
Browse files Browse the repository at this point in the history
 * Add a `Mat(Scalar)` constructor to OpenCV for convenience (issue bytedeco/javacv#738)
 * Include the `libavutil/time.h` for FFmpeg (issue bytedeco/javacv#735)
  • Loading branch information
saudet committed Sep 16, 2017
1 parent 8a1f2da commit 2874998
Show file tree
Hide file tree
Showing 8 changed files with 74 additions and 5 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

* Add a `Mat(Scalar)` constructor to OpenCV for convenience ([issue bytedeco/javacv#738](https://github.com/bytedeco/javacv/issues/738))
* Include the `libavutil/time.h` for FFmpeg ([issue bytedeco/javacv#735](https://github.com/bytedeco/javacv/issues/735))
* Map `AVERROR()` for error codes from `errno.h` used by FFmpeg ([pull #459](https://github.com/bytedeco/javacpp-presets/pull/459))
* Use `long` instead of `int` for constants starting with `AV_CH_LAYOUT_` in `avutil` ([pull #455](https://github.com/bytedeco/javacpp-presets/pull/455))
* Build FFmpeg with FreeType, enabling the `drawtext` filter ([pull #452](https://github.com/bytedeco/javacpp-presets/pull/452)), and support for Opus ([pull #457](https://github.com/bytedeco/javacpp-presets/pull/457))
Expand All @@ -11,7 +13,7 @@
* Link TensorFlow statically with `cudart` to avoid dependency on CUDA ([issue #396](https://github.com/bytedeco/javacpp-presets/issues/396))
* Add missing call to `Loader.load()` in helper class for `opencv_ml` ([issue bytedeco/javacv#638](https://github.com/bytedeco/javacv/issues/638))
* Work around issues with TensorFlow on some versions of Mac OS X ([issue #335](https://github.com/bytedeco/javacpp-presets/issues/335))
* Upgrade presets for OpenCV 3.2.0, FFmpeg 3.3.2, FlyCapture 2.11.3.121 ([pull #424](https://github.com/bytedeco/javacpp-presets/pull/424)), libdc1394 2.2.5, HDF5 1.10.1, OpenBLAS 0.2.20, FFTW 3.3.6, GSL 2.4, LLVM 4.0.0 ([pull #404](https://github.com/bytedeco/javacpp-presets/pull/404)), Leptonica 1.74.4, Tesseract 3.05.01, Caffe 1.0, cuDNN 6.0, MXNet 0.10.0, TensorFlow 1.3.0, and their dependencies
* Upgrade presets for OpenCV 3.2.0, FFmpeg 3.3.2, FlyCapture 2.11.3.121 ([pull #424](https://github.com/bytedeco/javacpp-presets/pull/424)), libdc1394 2.2.5, Chilitags, HDF5 1.10.1, OpenBLAS 0.2.20, FFTW 3.3.6, GSL 2.4, LLVM 4.0.0 ([pull #404](https://github.com/bytedeco/javacpp-presets/pull/404)), Leptonica 1.74.4, Tesseract 3.05.01, Caffe 1.0, cuDNN 6.0, MXNet 0.10.0, TensorFlow 1.3.0, and their dependencies
* Add presets for libfreenect2 ([pull #340](https://github.com/bytedeco/javacpp-presets/pull/340)), MKL 2017.3 ([issue #112](https://github.com/bytedeco/javacpp-presets/issues/112)), The Arcade Learning Environment, LiquidFun ([pull #356](https://github.com/bytedeco/javacpp-presets/pull/356)), and Skia ([pull #418](https://github.com/bytedeco/javacpp-presets/pull/418))
* Fix the `FlyCapture2` module for some versions on Windows ([issue #337](https://github.com/bytedeco/javacpp-presets/issues/337))
* Add functions missing from the presets of MXNet ([issue #332](https://github.com/bytedeco/javacpp-presets/issues/332))
Expand Down
4 changes: 2 additions & 2 deletions chilitags/cppbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ case $PLATFORM in
windows-x86)
"$CMAKE" -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=.. -DOpenCV_DIR=$OPENCV_PATH
nmake chilitags_static
cp include/*.hpp ../include/chilitags/
cp *.hpp include/*.hpp ../include/chilitags/
cp src/*.lib ../lib/
;;
windows-x86_64)
"$CMAKE" -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=.. -DOpenCV_DIR=$OPENCV_PATH
nmake chilitags_static
cp include/*.hpp ../include/chilitags/
cp *.hpp include/*.hpp ../include/chilitags/
cp src/*.lib ../lib/
;;
*)
Expand Down
2 changes: 2 additions & 0 deletions chilitags/src/main/java/org/bytedeco/javacpp/chilitags.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ public Iterator() { }
// #include <string>
// #include <memory>

// #include "chilitags_export.hpp"

/**
The location of the detected chilitags are stored in a 4x2 matrix
corresponding to the outside corners of its black border. The rows
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
/**
* @author Samuel Audet
*/
@Properties(value = @Platform(include = "chilitags/chilitags.hpp", link = "chilitags_static", resource = {"include", "lib"}),
@Properties(value = @Platform(define = "CHILITAGS_STATIC_DEFINE", include = "chilitags/chilitags.hpp",
link = "chilitags_static", resource = {"include", "lib"}),
inherit = {opencv_calib3d.class, opencv_video.class}, target = "org.bytedeco.javacpp.chilitags")
public class chilitags implements InfoMapper {
public void map(InfoMap infoMap) {
Expand Down
60 changes: 60 additions & 0 deletions ffmpeg/src/main/java/org/bytedeco/javacpp/avutil.java
Original file line number Diff line number Diff line change
Expand Up @@ -1269,6 +1269,66 @@ public class avutil extends org.bytedeco.javacpp.presets.avutil {
// #endif /* AVUTIL_MEM_H */


// Parsed from <libavutil/time.h>

/*
* Copyright (c) 2000-2003 Fabrice Bellard
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

// #ifndef AVUTIL_TIME_H
// #define AVUTIL_TIME_H

// #include <stdint.h>

/**
* Get the current time in microseconds.
*/
@NoException public static native @Cast("int64_t") long av_gettime();

/**
* Get the current time in microseconds since some unspecified starting point.
* On platforms that support it, the time comes from a monotonic clock
* This property makes this time source ideal for measuring relative time.
* The returned values may not be monotonic on platforms where a monotonic
* clock is not available.
*/
@NoException public static native @Cast("int64_t") long av_gettime_relative();

/**
* Indicates with a boolean result if the av_gettime_relative() time source
* is monotonic.
*/
@NoException public static native int av_gettime_relative_is_monotonic();

/**
* Sleep for a period of time. Although the duration is expressed in
* microseconds, the actual delay may be rounded to the precision of the
* system timer.
*
* @param usec Number of microseconds to sleep.
* @return zero on success or (negative) error code.
*/
@NoException public static native int av_usleep(@Cast("unsigned") int usec);

// #endif /* AVUTIL_TIME_H */


// Parsed from <libavutil/mathematics.h>

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* @author Samuel Audet
*/
@Properties(target="org.bytedeco.javacpp.avutil", value={
@Platform(define="__STDC_CONSTANT_MACROS", cinclude={"<libavutil/avutil.h>", "<libavutil/error.h>", "<libavutil/mem.h>",
@Platform(define="__STDC_CONSTANT_MACROS", cinclude={"<libavutil/avutil.h>", "<libavutil/error.h>", "<libavutil/mem.h>", "<libavutil/time.h>",
"<libavutil/mathematics.h>", "<libavutil/rational.h>", "<libavutil/log.h>", "<libavutil/buffer.h>", "<libavutil/pixfmt.h>",
"<libavutil/frame.h>", "<libavutil/samplefmt.h>", "<libavutil/channel_layout.h>", "<libavutil/cpu.h>", "<libavutil/dict.h>",
"<libavutil/opt.h>", "<libavutil/pixdesc.h>", "<libavutil/imgutils.h>", "<libavutil/downmix_info.h>", "<libavutil/stereo3d.h>",
Expand Down
2 changes: 2 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 @@ -15514,6 +15514,8 @@ the end of each row, if any. If the parameter is missing (set to AUTO_STEP ), no
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(Scalar scalar) { this(1, 1, CV_64FC4, scalar); this.data = scalar; }
public Mat(Scalar4i scalar) { this(1, 1, CV_32SC4, scalar); this.data = scalar; }
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 @@ -186,6 +186,8 @@ public void map(InfoMap infoMap) {
+ "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(Scalar scalar) { this(1, 1, CV_64FC4, scalar); this.data = scalar; }\n"
+ "public Mat(Scalar4i scalar) { this(1, 1, CV_32SC4, scalar); this.data = scalar; }\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 2874998

Please sign in to comment.