Skip to content

Commit

Permalink
use opencv 4.9.0 by default
Browse files Browse the repository at this point in the history
  • Loading branch information
cocoa-xu committed Dec 28, 2023
1 parent d977a3e commit 3f473c9
Show file tree
Hide file tree
Showing 18 changed files with 26 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linux-cuda-gnu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
DEBIAN_FRONTEND: noninteractive
# evision related env vars
MIX_ENV: test
OPENCV_VER: "4.8.0"
OPENCV_VER: "4.9.0"
OTP_VERSION: "25.2"
ELIXIR_VERSION: "1.14.3"
EVISION_PREFER_PRECOMPILED: "false"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux-precompile-cuda-gnu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
DEBIAN_FRONTEND: noninteractive
# evision related env vars
MIX_ENV: test
OPENCV_VER: "4.8.0"
OPENCV_VER: "4.9.0"
ELIXIR_VERSION: "1.15.2"
EVISION_PREFER_PRECOMPILED: "false"
EVISION_GENERATE_LANG: "erlang,elixir"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux-precompile-gnu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
mix_compile:
runs-on: ubuntu-20.04
env:
OPENCV_VER: "4.8.0"
OPENCV_VER: "4.9.0"
MIX_ENV: prod
ELIXIR_VERSION: "1.15.2"
EVISION_PREFER_PRECOMPILED: "false"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linux-precompile-musl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
container: alpine:latest
env:
MIX_ENV: prod
OPENCV_VER: "4.8.0"
OPENCV_VER: "4.9.0"
EVISION_PREFER_PRECOMPILED: "false"
EVISION_GENERATE_LANG: "erlang,elixir"
strategy:
Expand Down Expand Up @@ -158,7 +158,7 @@ jobs:
zig_build:
runs-on: ubuntu-20.04
env:
OPENCV_VER: "4.8.0"
OPENCV_VER: "4.9.0"
MIX_ENV: prod
ZIG_VERSION: "0.8.0"
EVISION_PREFER_PRECOMPILED: "false"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
mix_compile:
runs-on: ubuntu-20.04
env:
OPENCV_VER: "4.8.0"
OPENCV_VER: "4.9.0"
MIX_ENV: prod
EVISION_PREFER_PRECOMPILED: "false"
EVISION_GENERATE_LANG: "erlang,elixir"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linux-x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
container: alpine:latest
env:
MIX_ENV: test
OPENCV_VER: "4.8.0"
OPENCV_VER: "4.9.0"
OTP_VERSION: "25.2"
ELIXIR_VERSION: "1.14.3"
EVISION_PREFER_PRECOMPILED: "false"
Expand Down Expand Up @@ -156,7 +156,7 @@ jobs:
runs-on: ubuntu-20.04
env:
MIX_ENV: test
OPENCV_VER: "4.8.0"
OPENCV_VER: "4.9.0"
OTP_VERSION: "25.2"
ELIXIR_VERSION: "1.14.3"
EVISION_PREFER_PRECOMPILED: "false"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos-precompile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: macos-11
env:
MIX_ENV: prod
OPENCV_VER: "4.8.0"
OPENCV_VER: "4.9.0"
EVISION_PREFER_PRECOMPILED: "false"
EVISION_GENERATE_LANG: "erlang,elixir"
strategy:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos-x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
mix_test:
runs-on: macos-12
env:
OPENCV_VER: "4.8.0"
OPENCV_VER: "4.9.0"
MIX_ENV: "test"
EVISION_PREFER_PRECOMPILED: "false"
FFMPEG_VER: "5"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nerves-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
env:
MIX_ENV: prod
NERVES_PROJ_NAME: nerves_evision
OPENCV_VER: "4.8.0"
OPENCV_VER: "4.9.0"
NERVES_LIVEBOOK_VER: "v0.10.1"
ELIXIR_VERSION: "1.15.4"
EVISION_PREFER_PRECOMPILED: "false"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-python-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-20.04
env:
MIX_ENV: test
OPENCV_VER: "4.8.0"
OPENCV_VER: "4.9.0"
EVISION_PREFER_PRECOMPILED: "false"

strategy:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows-precompile-cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: windows-2019
env:
MIX_ENV: prod
OPENCV_VER: "4.8.0"
OPENCV_VER: "4.9.0"
ELIXIR_VERSION: "1.15.4"
EVISION_PREFER_PRECOMPILED: "false"
EVISION_GENERATE_LANG: "erlang,elixir"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows-precompile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: windows-latest
env:
MIX_ENV: prod
OPENCV_VER: "4.8.0"
OPENCV_VER: "4.9.0"
ELIXIR_VERSION: "1.15.4"
EVISION_PREFER_PRECOMPILED: "false"
EVISION_GENERATE_LANG: "erlang,elixir"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows-x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
runs-on: windows-latest
env:
MIX_ENV: test
OPENCV_VER: "4.8.0"
OPENCV_VER: "4.9.0"
OTP_VERSION: "25.2"
ELIXIR_VERSION: "1.14.3"
EVISION_PREFER_PRECOMPILED: "false"
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ CMAKE_BUILD_TYPE ?= Release
# OpenCV
OPENCV_USE_GIT_HEAD ?= false
OPENCV_GIT_REPO ?= "https://github.com/opencv/opencv.git"
OPENCV_VER ?= 4.8.0
OPENCV_VER ?= 4.9.0
ifneq ($(OPENCV_USE_GIT_HEAD), false)
OPENCV_VER=$(OPENCV_USE_GIT_BRANCH)
endif
OPENCV_CONTRIB_USE_GIT_HEAD ?= false
OPENCV_CONTRIB_GIT_REPO ?= "https://github.com/opencv/opencv_contrib.git"
OPENCV_CONTRIB_VER ?= 4.8.0
OPENCV_CONTRIB_VER ?= 4.9.0
ifneq ($(OPENCV_CONTRIB_USE_GIT_HEAD), false)
OPENCV_CONTRIB_VER=$(OPENCV_CONTRIB_USE_GIT_BRANCH)
endif
Expand Down
4 changes: 2 additions & 2 deletions Makefile.win
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ OPENCV_USE_GIT_HEAD=false
OPENCV_GIT_REPO="https://github.com/opencv/opencv.git"
!ENDIF
!IFNDEF OPENCV_VER
OPENCV_VER=4.8.0
OPENCV_VER=4.9.0
!ENDIF
!IFNDEF OPENCV_CONTRIB_VER
OPENCV_CONTRIB_VER=4.8.0
OPENCV_CONTRIB_VER=4.9.0
!ENDIF
!IF "$(OPENCV_USE_GIT_HEAD)" == "true"
OPENCV_VER=$(OPENCV_USE_GIT_BRANCH)
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ iex> mat = Evision.Mat.from_nx(t)

#### Unsupported Type Map

As OpenCV does not support the following types (yet, as of OpenCV 4.8.0)
As OpenCV does not support the following types (yet, as of OpenCV 4.9.0)

- `{:s, 64}`
- `{:u, 32}`
Expand Down Expand Up @@ -320,6 +320,7 @@ Compatible OpenCV versions:
- 4.6.0
- 4.7.0
- 4.8.0
- 4.9.0

by compatible, it means these versions can compile successfully, and I tested a small range of functions. Tons of tests
should be written, and then we can have a list for tested OpenCV versions.
Expand Down Expand Up @@ -519,7 +520,7 @@ To obtain and compile OpenCV's source code from official releases, the following
# optional
## set OpenCV version
## the corresponding license file should be available at https://github.com/opencv/opencv/blob/${OPENCV_VER}/LICENSE
export OPENCV_VER="4.8.0"
export OPENCV_VER="4.9.0"

# optional
## Use Debug build
Expand Down Expand Up @@ -797,7 +798,7 @@ Say you have the following MIX environment variables:
# set by MIX
MIX_ENV=dev
# set by evision or you
OPENCV_VER=4.8.0
OPENCV_VER=4.9.0
# set by yourself if you're compiling evision to a nerves firmware
MIX_TARGET=rpi4
```
Expand Down
4 changes: 2 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ defmodule Evision.MixProject.Metadata do
def app, do: :evision
def version, do: "0.1.34"
def github_url, do: "https://github.com/cocoa-xu/evision"
def opencv_version, do: "4.8.0"
def opencv_version, do: "4.9.0"
# only means compatible. need to write more tests
def compatible_opencv_versions, do: ["4.5.3", "4.5.4", "4.5.5", "4.6.0", "4.7.0", "4.8.0"]
def compatible_opencv_versions, do: ["4.5.3", "4.5.4", "4.5.5", "4.6.0", "4.7.0", "4.8.0", "4.9.0"]
def default_cuda_version, do: "118"
def all_cuda_version, do: ["111", "114", "118"]
end
Expand Down
2 changes: 1 addition & 1 deletion patches/apply_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


def patch_fix_getLayerShapes(opencv_version: str, opencv_src_root: str):
if opencv_version not in ['4.5.4', '4.5.5', '4.6.0', '4.7.0', '4.8.0']:
if opencv_version not in ['4.5.4', '4.5.5', '4.6.0', '4.7.0', '4.8.0', '4.9.0']:
print(f"warning: applying `patch_fix_getLayerShapes` to opencv version `{opencv_version}`")

# modules/dnn/include/opencv2/dnn/dnn.hpp
Expand Down

0 comments on commit 3f473c9

Please sign in to comment.