Skip to content

Commit

Permalink
* Upgrade presets for OpenCV 4.11.0, SciPy 1.15.1
Browse files Browse the repository at this point in the history
  • Loading branch information
saudet committed Jan 13, 2025
1 parent cc6a366 commit faccd0d
Show file tree
Hide file tree
Showing 944 changed files with 2,478 additions and 1,322 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

* Introduce `macosx-arm64` builds for ARPACK-NG, CMINPACK, FFTW, GSL, TensorFlow Lite, ONNX, ONNX Runtime ([issue #1069](https://github.com/bytedeco/javacpp-presets/issues/1069))
* Upgrade presets for DNNL 3.6.2, CPython 3.13.1, NumPy 2.2.1, LLVM 19.1.6, ONNX Runtime 1.20.1
* Upgrade presets for OpenCV 4.11.0, DNNL 3.6.2, CPython 3.13.1, NumPy 2.2.1, SciPy 1.15.1, LLVM 19.1.6, ONNX Runtime 1.20.1

### November 16, 2024 version 1.5.11
* Enable distributed package using Gloo in presets for PyTorch ([pull #1510](https://github.com/bytedeco/javacpp-presets/pull/1510))
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ The JavaCPP Presets depend on Maven, a powerful build system for Java, so before

Each child module in turn relies by default on the included [`cppbuild.sh` scripts](#the-cppbuildsh-scripts), explained below, to install its corresponding native libraries in the `cppbuild` subdirectory. To use native libraries already installed somewhere else on the system, other installation directories than `cppbuild` can also be specified either in the `pom.xml` files or in the `.java` configuration files. The following versions are supported:

* OpenCV 4.10.x https://opencv.org/releases/
* OpenCV 4.11.x https://opencv.org/releases/
* FFmpeg 7.1.x http://ffmpeg.org/download.html
* FlyCapture 2.13.x https://www.flir.com/products/flycapture-sdk
* Spinnaker 4.0.x https://www.flir.com/products/spinnaker-sdk
Expand All @@ -206,7 +206,7 @@ Each child module in turn relies by default on the included [`cppbuild.sh` scrip
* GSL 2.8 http://www.gnu.org/software/gsl/#downloading
* CPython 3.13.x https://www.python.org/downloads/
* NumPy 2.2.x https://github.com/numpy/numpy
* SciPy 1.14.x https://github.com/scipy/scipy
* SciPy 1.15.x https://github.com/scipy/scipy
* Gym 0.26.x https://github.com/openai/gym
* LLVM 19.1.x http://llvm.org/releases/download.html
* libffi 3.4.x https://github.com/libffi/libffi
Expand Down
6 changes: 3 additions & 3 deletions opencv/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Introduction
------------
This directory contains the JavaCPP Presets module for:

* OpenCV 4.10.0 http://opencv.org/
* OpenCV 4.11.0 http://opencv.org/

Please refer to the parent README.md file for more detailed information about the JavaCPP Presets.

Expand Down Expand Up @@ -49,14 +49,14 @@ We can use [Maven 3](http://maven.apache.org/) to download and install automatic
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>opencv-platform</artifactId>
<version>4.10.0-1.5.12-SNAPSHOT</version>
<version>4.11.0-1.5.12-SNAPSHOT</version>
</dependency>

<!-- Additional dependencies required to use CUDA and cuDNN -->
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>opencv-platform-gpu</artifactId>
<version>4.10.0-1.5.12-SNAPSHOT</version>
<version>4.11.0-1.5.12-SNAPSHOT</version>
</dependency>

<!-- Additional dependencies to use bundled CUDA and cuDNN -->
Expand Down
4 changes: 2 additions & 2 deletions opencv/cppbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if [[ -z "$PLATFORM" ]]; then
exit
fi

OPENCV_VERSION=4.10.0
OPENCV_VERSION=4.11.0
download https://github.com/opencv/opencv/archive/$OPENCV_VERSION.tar.gz opencv-$OPENCV_VERSION.tar.gz
download https://github.com/opencv/opencv_contrib/archive/$OPENCV_VERSION.tar.gz opencv_contrib-$OPENCV_VERSION.tar.gz

Expand Down Expand Up @@ -137,7 +137,7 @@ BUILD_CONTRIB_X="-DBUILD_opencv_stereo=OFF -DBUILD_opencv_plot=ON -DBUILD_opencv

GPU_FLAGS="-DWITH_CUDA=OFF"
if [[ "$EXTENSION" == *gpu ]]; then
GPU_FLAGS="-DWITH_CUDA=ON -DWITH_CUDNN=ON -DOPENCV_DNN_CUDA=ON -DCUDA_VERSION=12.6 -DCUDNN_VERSION=9.3 -DCUDA_ARCH_BIN='5.0;6.0;7.0;8.0;9.0' -DCUDA_ARCH_PTX='' -DCUDA_NVCC_FLAGS=--expt-relaxed-constexpr -DCUDA_nppicom_LIBRARY="
GPU_FLAGS="-DWITH_CUDA=ON -DWITH_CUDNN=ON -DOPENCV_DNN_CUDA=ON -DCUDA_VERSION=12.6 -DCUDNN_VERSION=9.5 -DCUDA_ARCH_BIN='5.0;6.0;7.0;8.0;9.0' -DCUDA_ARCH_PTX='' -DCUDA_NVCC_FLAGS=--expt-relaxed-constexpr -DCUDA_nppicom_LIBRARY="
fi

# exclude openblas dependencies
Expand Down
2 changes: 1 addition & 1 deletion opencv/platform/gpu/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>org.bytedeco</groupId>
<artifactId>opencv-platform-gpu</artifactId>
<version>4.10.0-${project.parent.version}</version>
<version>4.11.0-${project.parent.version}</version>
<name>JavaCPP Presets Platform GPU for OpenCV</name>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion opencv/platform/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>org.bytedeco</groupId>
<artifactId>opencv-platform</artifactId>
<version>4.10.0-${project.parent.version}</version>
<version>4.11.0-${project.parent.version}</version>
<name>JavaCPP Presets Platform for OpenCV</name>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion opencv/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<groupId>org.bytedeco</groupId>
<artifactId>opencv</artifactId>
<version>4.10.0-${project.parent.version}</version>
<version>4.11.0-${project.parent.version}</version>
<name>JavaCPP Presets for OpenCV</name>

<dependencies>
Expand Down
4 changes: 2 additions & 2 deletions opencv/samples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>opencv-platform</artifactId>
<version>4.10.0-1.5.12-SNAPSHOT</version>
<version>4.11.0-1.5.12-SNAPSHOT</version>
</dependency>

<!-- Additional dependencies required to use CUDA and cuDNN -->
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>opencv-platform-gpu</artifactId>
<version>4.10.0-1.5.12-SNAPSHOT</version>
<version>4.11.0-1.5.12-SNAPSHOT</version>
</dependency>

<!-- Additional dependencies to use bundled CUDA and cuDNN -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.12-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.opencv.global;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.12-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.opencv.global;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.12-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.opencv.global;

Expand Down
50 changes: 35 additions & 15 deletions opencv/src/gen/java/org/bytedeco/opencv/global/opencv_calib3d.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.12-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.opencv.global;

Expand Down Expand Up @@ -560,24 +560,24 @@ and pincushion distortion ({@code 1 + k_1 r^2 + k_2 r^4 + k_3 r^6 } monotonical
where R is the rotation matrix corresponding to the rotation vector om: R = rodrigues(om); call x, y
and z the 3 coordinates of Xc:
<p>
<pre>{@code \[x = Xc_1 \\ y = Xc_2 \\ z = Xc_3\]}</pre>
<pre>{@code \[\begin{array}{l} x = Xc_1 \\ y = Xc_2 \\ z = Xc_3 \end{array} \]}</pre>
<p>
The pinhole projection coordinates of P is [a; b] where
<p>
<pre>{@code \[a = x / z \ and \ b = y / z \\ r^2 = a^2 + b^2 \\ \theta = atan(r)\]}</pre>
<pre>{@code \[\begin{array}{l} a = x / z \ and \ b = y / z \\ r^2 = a^2 + b^2 \\ \theta = atan(r) \end{array} \]}</pre>
<p>
Fisheye distortion:
<p>
<pre>{@code \[\theta_d = \theta (1 + k_1 \theta^2 + k_2 \theta^4 + k_3 \theta^6 + k_4 \theta^8)\]}</pre>
<p>
The distorted point coordinates are [x'; y'] where
<p>
<pre>{@code \[x' = (\theta_d / r) a \\ y' = (\theta_d / r) b \]}</pre>
<pre>{@code \[\begin{array}{l} x' = (\theta_d / r) a \\ y' = (\theta_d / r) b \end{array} \]}</pre>
<p>
Finally, conversion into pixel coordinates: The final pixel coordinates vector [u; v] where:
<p>
<pre>{@code \[u = f_x (x' + \alpha y') + c_x \\
v = f_y y' + c_y\]}</pre>
<pre>{@code \[\begin{array}{l} u = f_x (x' + \alpha y') + c_x \\
v = f_y y' + c_y \end{array} \]}</pre>
<p>
Summary:
Generic camera model \cite Kannala2006 with perspective projection and without distortion correction
Expand Down Expand Up @@ -4975,7 +4975,7 @@ The function can be used for both a stereo camera head or a monocular camera (wh
@param imagePoints Output array of image points, 2xN/Nx2 1-channel or 1xN/Nx1 2-channel, or
vector\<Point2f\>.
@param affine
@param K Camera intrinsic matrix {@code cameramatrix{K}}.
@param K Camera intrinsic matrix {@code \cameramatrix{K}}.
@param D Input vector of distortion coefficients {@code \distcoeffsfisheye}.
@param alpha The skew coefficient.
@param jacobian Optional output 2Nx15 jacobian matrix of derivatives of image points with respect
Expand Down Expand Up @@ -5019,13 +5019,14 @@ image points coordinates (as functions of all the input parameters) with respect
<p>
@param undistorted Array of object points, 1xN/Nx1 2-channel (or vector\<Point2f\> ), where N is
the number of points in the view.
@param K Camera intrinsic matrix {@code cameramatrix{K}}.
@param K Camera intrinsic matrix {@code \cameramatrix{K}}.
@param D Input vector of distortion coefficients {@code \distcoeffsfisheye}.
@param alpha The skew coefficient.
@param distorted Output array of image points, 1xN/Nx1 2-channel, or vector\<Point2f\> .
<p>
Note that the function assumes the camera intrinsic matrix of the undistorted points to be identity.
This means if you want to distort image points you have to multiply them with {@code K^{-1}}.
This means if you want to distort image points you have to multiply them with {@code K^{-1}} or
use another function overload.
*/
@Namespace("cv::fisheye") public static native @Name("distortPoints") void fisheyeDistortPoints(@ByVal Mat undistorted, @ByVal Mat distorted, @ByVal Mat K, @ByVal Mat D, double alpha/*=0*/);
@Namespace("cv::fisheye") public static native @Name("distortPoints") void fisheyeDistortPoints(@ByVal Mat undistorted, @ByVal Mat distorted, @ByVal Mat K, @ByVal Mat D);
Expand All @@ -5034,11 +5035,30 @@ image points coordinates (as functions of all the input parameters) with respect
@Namespace("cv::fisheye") public static native @Name("distortPoints") void fisheyeDistortPoints(@ByVal GpuMat undistorted, @ByVal GpuMat distorted, @ByVal GpuMat K, @ByVal GpuMat D, double alpha/*=0*/);
@Namespace("cv::fisheye") public static native @Name("distortPoints") void fisheyeDistortPoints(@ByVal GpuMat undistorted, @ByVal GpuMat distorted, @ByVal GpuMat K, @ByVal GpuMat D);

/** \overload
Overload of distortPoints function to handle cases when undistorted points are obtained with non-identity
camera matrix, e.g. output of #estimateNewCameraMatrixForUndistortRectify.
@param undistorted Array of object points, 1xN/Nx1 2-channel (or vector\<Point2f\> ), where N is
the number of points in the view.
@param Kundistorted Camera intrinsic matrix used as new camera matrix for undistortion.
@param K Camera intrinsic matrix {@code \cameramatrix{K}}.
@param D Input vector of distortion coefficients {@code \distcoeffsfisheye}.
@param alpha The skew coefficient.
@param distorted Output array of image points, 1xN/Nx1 2-channel, or vector\<Point2f\> .
@see estimateNewCameraMatrixForUndistortRectify
*/
@Namespace("cv::fisheye") public static native @Name("distortPoints") void fisheyeDistortPoints(@ByVal Mat undistorted, @ByVal Mat distorted, @ByVal Mat Kundistorted, @ByVal Mat K, @ByVal Mat D, double alpha/*=0*/);
@Namespace("cv::fisheye") public static native @Name("distortPoints") void fisheyeDistortPoints(@ByVal Mat undistorted, @ByVal Mat distorted, @ByVal Mat Kundistorted, @ByVal Mat K, @ByVal Mat D);
@Namespace("cv::fisheye") public static native @Name("distortPoints") void fisheyeDistortPoints(@ByVal UMat undistorted, @ByVal UMat distorted, @ByVal UMat Kundistorted, @ByVal UMat K, @ByVal UMat D, double alpha/*=0*/);
@Namespace("cv::fisheye") public static native @Name("distortPoints") void fisheyeDistortPoints(@ByVal UMat undistorted, @ByVal UMat distorted, @ByVal UMat Kundistorted, @ByVal UMat K, @ByVal UMat D);
@Namespace("cv::fisheye") public static native @Name("distortPoints") void fisheyeDistortPoints(@ByVal GpuMat undistorted, @ByVal GpuMat distorted, @ByVal GpuMat Kundistorted, @ByVal GpuMat K, @ByVal GpuMat D, double alpha/*=0*/);
@Namespace("cv::fisheye") public static native @Name("distortPoints") void fisheyeDistortPoints(@ByVal GpuMat undistorted, @ByVal GpuMat distorted, @ByVal GpuMat Kundistorted, @ByVal GpuMat K, @ByVal GpuMat D);

/** \brief Undistorts 2D points using fisheye model
<p>
@param distorted Array of object points, 1xN/Nx1 2-channel (or vector\<Point2f\> ), where N is the
number of points in the view.
@param K Camera intrinsic matrix {@code cameramatrix{K}}.
@param K Camera intrinsic matrix {@code \cameramatrix{K}}.
@param D Input vector of distortion coefficients {@code \distcoeffsfisheye}.
@param R Rectification transformation in the object space: 3x3 1-channel, or vector: 3x1/1x3
1-channel or 1x1 3-channel
Expand All @@ -5065,7 +5085,7 @@ image points coordinates (as functions of all the input parameters) with respect
/** \brief Computes undistortion and rectification maps for image transform by #remap. If D is empty zero
distortion is used, if R or P is empty identity matrixes are used.
<p>
@param K Camera intrinsic matrix {@code cameramatrix{K}}.
@param K Camera intrinsic matrix {@code \cameramatrix{K}}.
@param D Input vector of distortion coefficients {@code \distcoeffsfisheye}.
@param R Rectification transformation in the object space: 3x3 1-channel, or vector: 3x1/1x3
1-channel or 1x1 3-channel
Expand All @@ -5087,7 +5107,7 @@ image points coordinates (as functions of all the input parameters) with respect
<p>
@param distorted image with fisheye lens distortion.
@param undistorted Output image with compensated fisheye lens distortion.
@param K Camera intrinsic matrix {@code cameramatrix{K}}.
@param K Camera intrinsic matrix {@code \cameramatrix{K}}.
@param D Input vector of distortion coefficients {@code \distcoeffsfisheye}.
@param Knew Camera intrinsic matrix of the distorted image. By default, it is the identity matrix but you
may additionally scale and shift the result by using a different matrix.
Expand Down Expand Up @@ -5126,7 +5146,7 @@ image points coordinates (as functions of all the input parameters) with respect

/** \brief Estimates new camera intrinsic matrix for undistortion or rectification.
<p>
@param K Camera intrinsic matrix {@code cameramatrix{K}}.
@param K Camera intrinsic matrix {@code \cameramatrix{K}}.
@param image_size Size of the image
@param D Input vector of distortion coefficients {@code \distcoeffsfisheye}.
@param R Rectification transformation in the object space: 3x3 1-channel, or vector: 3x1/1x3
Expand Down Expand Up @@ -5163,7 +5183,7 @@ image points coordinates (as functions of all the input parameters) with respect
\ref fisheye::CALIB_USE_INTRINSIC_GUESS is specified, some or all of fx, fy, cx, cy must be
initialized before calling the function.
@param D Output vector of distortion coefficients {@code \distcoeffsfisheye}.
@param rvecs Output vector of rotation vectors (see Rodrigues ) estimated for each pattern view.
@param rvecs Output vector of rotation vectors (see \ref Rodrigues ) estimated for each pattern view.
That is, each k-th rotation vector together with the corresponding k-th translation vector (see
the next output parameter description) brings the calibration pattern from the model coordinate
space (in which object points are specified) to the world coordinate space, that is, a real
Expand Down Expand Up @@ -5327,7 +5347,7 @@ of previous output parameter ( rvecs ).
- for all the other flags, number of input points must be >= 4 and object points can be in any configuration.
@param criteria Termination criteria for internal undistortPoints call.
The function interally undistorts points with \ref undistortPoints and call \ref cv::solvePnP,
thus the input are very similar. Check there and Perspective-n-Points is described in \ref calib3d_solvePnP
thus the input are very similar. More information about Perspective-n-Points is described in \ref calib3d_solvePnP
for more information.
*/
@Namespace("cv::fisheye") public static native @Cast("bool") boolean solvePnP( @ByVal Mat objectPoints, @ByVal Mat imagePoints,
Expand Down
Loading

0 comments on commit faccd0d

Please sign in to comment.