Skip to content

Commit

Permalink
Merge branch 'dev' into feat-demosaicing
Browse files Browse the repository at this point in the history
  • Loading branch information
deadprogram authored Aug 15, 2024
2 parents e46a09c + 343ffaa commit f654f13
Show file tree
Hide file tree
Showing 91 changed files with 4,043 additions and 786 deletions.
68 changes: 34 additions & 34 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
name: Docker
on:
push:
branches: [ build-opencv-images ]
branches: [build-opencv-images]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -28,8 +28,8 @@ jobs:
uses: docker/metadata-action@v4
with:
images: |
gocv/opencv:4.8.1
ghcr.io/${{ github.repository_owner }}/opencv:4.8.1
gocv/opencv:4.10.0
ghcr.io/${{ github.repository_owner }}/opencv:4.10.0
tags: |
type=sha,format=long
type=raw,value=latest
Expand All @@ -53,9 +53,9 @@ jobs:
push: true
tags: |
gocv/opencv:latest
gocv/opencv:4.8.1
gocv/opencv:4.10.0
ghcr.io/${{ github.repository_owner }}/opencv:latest
ghcr.io/${{ github.repository_owner }}/opencv:4.8.1
ghcr.io/${{ github.repository_owner }}/opencv:4.10.0
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
Expand All @@ -78,8 +78,8 @@ jobs:
uses: docker/metadata-action@v4
with:
images: |
gocv/opencv:4.8.1-static
ghcr.io/${{ github.repository_owner }}/opencv:4.8.1-static
gocv/opencv:4.10.0-static
ghcr.io/${{ github.repository_owner }}/opencv:4.10.0-static
tags: |
type=sha,format=long
type=raw,value=latest
Expand All @@ -102,8 +102,8 @@ jobs:
context: .
push: true
tags: |
gocv/opencv:4.8.1-static
ghcr.io/${{ github.repository_owner }}/opencv:4.8.1-static
gocv/opencv:4.10.0-static
ghcr.io/${{ github.repository_owner }}/opencv:4.10.0-static
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
Expand Down Expand Up @@ -156,8 +156,8 @@ jobs:
uses: docker/metadata-action@v4
with:
images: |
gocv/opencv:4.8.1-gpu-cuda-11
ghcr.io/${{ github.repository_owner }}/opencv:4.8.1-gpu-cuda-11
gocv/opencv:4.10.0-gpu-cuda-11
ghcr.io/${{ github.repository_owner }}/opencv:4.10.0-gpu-cuda-11
tags: |
type=sha,format=long
type=raw,value=latest
Expand All @@ -180,8 +180,8 @@ jobs:
context: .
push: true
tags: |
gocv/opencv:4.8.1-gpu-cuda-11
ghcr.io/${{ github.repository_owner }}/opencv:4.8.1-gpu-cuda-11
gocv/opencv:4.10.0-gpu-cuda-11
ghcr.io/${{ github.repository_owner }}/opencv:4.10.0-gpu-cuda-11
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
Expand Down Expand Up @@ -234,8 +234,8 @@ jobs:
uses: docker/metadata-action@v4
with:
images: |
gocv/opencv:4.8.1-gpu-cuda-11.2.2
ghcr.io/${{ github.repository_owner }}/opencv:4.8.1-gpu-cuda-11.2.2
gocv/opencv:4.10.0-gpu-cuda-11.2.2
ghcr.io/${{ github.repository_owner }}/opencv:4.10.0-gpu-cuda-11.2.2
tags: |
type=sha,format=long
type=raw,value=latest
Expand All @@ -258,8 +258,8 @@ jobs:
context: .
push: true
tags: |
gocv/opencv:4.8.1-gpu-cuda-11.2.2
ghcr.io/${{ github.repository_owner }}/opencv:4.8.1-gpu-cuda-11.2.2
gocv/opencv:4.10.0-gpu-cuda-11.2.2
ghcr.io/${{ github.repository_owner }}/opencv:4.10.0-gpu-cuda-11.2.2
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
Expand Down Expand Up @@ -312,8 +312,8 @@ jobs:
uses: docker/metadata-action@v4
with:
images: |
gocv/opencv:4.8.1-gpu-cuda-12
ghcr.io/${{ github.repository_owner }}/opemcv:4.8.1-gpu-cuda-12
gocv/opencv:4.10.0-gpu-cuda-12
ghcr.io/${{ github.repository_owner }}/opemcv:4.10.0-gpu-cuda-12
tags: |
type=sha,format=long
type=raw,value=latest
Expand All @@ -336,12 +336,12 @@ jobs:
context: .
push: true
tags: |
gocv/opencv:4.8.1-gpu-cuda-12
ghcr.io/${{ github.repository_owner }}/opencv:4.8.1-gpu-cuda-12
gocv/opencv:4.10.0-gpu-cuda-12
ghcr.io/${{ github.repository_owner }}/opencv:4.10.0-gpu-cuda-12
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

opencv-ubuntu-18-04:
name: opencv-ubuntu-18-04
runs-on: ubuntu-latest
Expand All @@ -358,8 +358,8 @@ jobs:
uses: docker/metadata-action@v4
with:
images: |
gocv/opencv:4.8.1-ubuntu-18.04
ghcr.io/${{ github.repository_owner }}/opencv:4.8.1-ubuntu-18.04
gocv/opencv:4.10.0-ubuntu-18.04
ghcr.io/${{ github.repository_owner }}/opencv:4.10.0-ubuntu-18.04
tags: |
type=sha,format=long
type=raw,value=latest
Expand All @@ -382,8 +382,8 @@ jobs:
context: .
push: true
tags: |
gocv/opencv:4.8.1-ubuntu-18.04
ghcr.io/${{ github.repository_owner }}/opencv:4.8.1-ubuntu-18.04
gocv/opencv:4.10.0-ubuntu-18.04
ghcr.io/${{ github.repository_owner }}/opencv:4.10.0-ubuntu-18.04
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
Expand All @@ -404,8 +404,8 @@ jobs:
uses: docker/metadata-action@v4
with:
images: |
gocv/opencv:4.8.1-ubuntu-20.04
ghcr.io/${{ github.repository_owner }}/opencv:4.8.1-ubuntu-20.04
gocv/opencv:4.10.0-ubuntu-20.04
ghcr.io/${{ github.repository_owner }}/opencv:4.10.0-ubuntu-20.04
tags: |
type=sha,format=long
type=raw,value=latest
Expand All @@ -428,8 +428,8 @@ jobs:
context: .
push: true
tags: |
gocv/opencv:4.8.1-ubuntu-20.04
ghcr.io/${{ github.repository_owner }}/opencv:4.8.1-ubuntu-20.04
gocv/opencv:4.10.0-ubuntu-20.04
ghcr.io/${{ github.repository_owner }}/opencv:4.10.0-ubuntu-20.04
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
Expand All @@ -450,8 +450,8 @@ jobs:
uses: docker/metadata-action@v4
with:
images: |
gocv/opencv:4.8.1-ubuntu-22.04
ghcr.io/${{ github.repository_owner }}/opencv:4.8.1-ubuntu-22.04
gocv/opencv:4.10.0-ubuntu-22.04
ghcr.io/${{ github.repository_owner }}/opencv:4.10.0-ubuntu-22.04
tags: |
type=sha,format=long
type=raw,value=latest
Expand All @@ -474,8 +474,8 @@ jobs:
context: .
push: true
tags: |
gocv/opencv:4.8.1-ubuntu-22.04
ghcr.io/${{ github.repository_owner }}/opencv:4.8.1-ubuntu-22.04
gocv/opencv:4.10.0-ubuntu-22.04
ghcr.io/${{ github.repository_owner }}/opencv:4.10.0-ubuntu-22.04
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
12 changes: 6 additions & 6 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
container: ghcr.io/hybridgroup/opencv:4.8.1
container: ghcr.io/hybridgroup/opencv:4.10.0

steps:
- name: Checkout
Expand All @@ -29,13 +29,13 @@ jobs:
curl -sL https://raw.githubusercontent.com/WeChatCV/opencv_3rdparty/wechat_qrcode/sr.prototxt > ${GITHUB_WORKSPACE}/testdata/sr.prototxt
- name: Install Tensorflow test model
run: |
mkdir -p ${GITHUB_WORKSPACE}/testdata
curl -sL https://storage.googleapis.com/download.tensorflow.org/models/inception5h.zip > ${GITHUB_WORKSPACE}/testdata/inception5h.zip
unzip -o ${GITHUB_WORKSPACE}/testdata/inception5h.zip tensorflow_inception_graph.pb -d ${GITHUB_WORKSPACE}/testdata
mkdir -p ${GITHUB_WORKSPACE}/testdata
curl -sL https://storage.googleapis.com/download.tensorflow.org/models/inception5h.zip > ${GITHUB_WORKSPACE}/testdata/inception5h.zip
unzip -o ${GITHUB_WORKSPACE}/testdata/inception5h.zip tensorflow_inception_graph.pb -d ${GITHUB_WORKSPACE}/testdata
- name: Install ONNX test model
run: |
mkdir -p ${GITHUB_WORKSPACE}/testdata
curl -sL https://github.com/onnx/models/blob/master/vision/classification/inception_and_googlenet/googlenet/model/googlenet-9.onnx\?raw\=true > ${GITHUB_WORKSPACE}/testdata/googlenet-9.onnx
mkdir -p ${GITHUB_WORKSPACE}/testdata
curl -sL https://github.com/onnx/models/blob/master/vision/classification/inception_and_googlenet/googlenet/model/googlenet-9.onnx\?raw\=true > ${GITHUB_WORKSPACE}/testdata/googlenet-9.onnx
- name: Run main tests
run: xvfb-run -a --error-file /var/log/xvfb_error.log --server-args="-screen 0 1024x768x24 +extension RANDR" go test -v -coverprofile=/tmp/coverage.out -count=1 -tags matprofile .
env:
Expand Down
91 changes: 91 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Windows

on:
pull_request:
push:
branches:
- dev
- release

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build-windows:
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
cache: true
- name: Restore cached OpenCV source
uses: actions/cache/restore@v4
id: cache-opencv-source
with:
key: opencv-source-4100-windows-v1a
path: |
./opencv/opencv-4.10.0
./opencv/opencv_contrib-4.10.0
- name: Download OpenCV source
if: steps.cache-opencv-source.outputs.cache-hit != 'true'
shell: bash
run: |
mkdir -p ./opencv
curl -Lo ./opencv/opencv-4.10.0.zip https://github.com/opencv/opencv/archive/4.10.0.zip
curl -Lo ./opencv/opencv_contrib-4.10.0.zip https://github.com/opencv/opencv_contrib/archive/4.10.0.zip
- name: Extract OpenCV source
if: steps.cache-opencv-source.outputs.cache-hit != 'true'
shell: bash
run: |
cd ./opencv
mkdir -p opencv-4.10.0
mkdir -p opencv_contrib-4.10.0
7z x opencv-4.10.0.zip
7z x opencv_contrib-4.10.0.zip
- name: Save cached OpenCV source
uses: actions/cache/save@v4
if: steps.cache-opencv-source.outputs.cache-hit != 'true'
with:
key: ${{ steps.cache-opencv-source.outputs.cache-primary-key }}
path: |
./opencv/opencv-4.10.0
./opencv/opencv_contrib-4.10.0
- name: Restore cached OpenCV build
uses: actions/cache/restore@v4
id: cache-opencv-build
with:
key: opencv-build-4100-windows-v1d
path: |
./opencv/build
- name: Build OpenCV
if: steps.cache-opencv-build.outputs.cache-hit != 'true'
run: |
mkdir -p ./opencv/build
cd ./opencv/build
cmake -G "MinGW Makefiles" -DENABLE_CXX11=ON -DOPENCV_EXTRA_MODULES_PATH="../opencv_contrib-4.10.0/modules" -DBUILD_SHARED_LIBS=ON -DWITH_IPP=OFF -DWITH_MSMF=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=ON -DBUILD_opencv_java=OFF -DBUILD_opencv_python=OFF -DBUILD_opencv_python2=OFF -DBUILD_opencv_python3=OFF -DBUILD_DOCS=OFF -DENABLE_PRECOMPILED_HEADERS=OFF -DBUILD_opencv_saliency=OFF -DBUILD_opencv_wechat_qrcode=ON -DCPU_DISPATCH= -DOPENCV_GENERATE_PKGCONFIG=ON -DWITH_OPENCL_D3D11_NV=OFF -DOPENCV_ALLOCATOR_STATS_COUNTER_TYPE=int64_t -DOPENCV_ENABLE_NONFREE=ON -Wno-dev ../opencv-4.10.0
cmake --build . --target install
- name: Save cached OpenCV build
uses: actions/cache/save@v4
if: steps.cache-opencv-build.outputs.cache-hit != 'true'
with:
key: ${{ steps.cache-opencv-build.outputs.cache-primary-key }}
path: |
./opencv/build
- name: Set GoCV env
run: |
go env
echo "CGO_CXXFLAGS=--std=c++11" >> $env:GITHUB_ENV
echo "CGO_CPPFLAGS=-I${env:GITHUB_WORKSPACE}\opencv\build\install\include" >> $env:GITHUB_ENV
echo "CGO_LDFLAGS=-L${env:GITHUB_WORKSPACE}\opencv\build\install\x64\mingw\lib -lopencv_core4100 -lopencv_face4100 -lopencv_videoio4100 -lopencv_imgproc4100 -lopencv_highgui4100 -lopencv_imgcodecs4100 -lopencv_objdetect4100 -lopencv_features2d4100 -lopencv_video4100 -lopencv_dnn4100 -lopencv_xfeatures2d4100 -lopencv_plot4100 -lopencv_tracking4100 -lopencv_img_hash4100 -lopencv_calib3d4100 -lopencv_bgsegm4100 -lopencv_photo4100 -lopencv_aruco4100 -lopencv_wechat_qrcode4100 -lopencv_ximgproc4100 -lopencv_xphoto4100" >> $env:GITHUB_ENV
echo "${env:GITHUB_WORKSPACE}/opencv/build/install/x64/mingw/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Test GoCV
run: |
go env
go test -v -tags="matprofile,customenv" .
- name: Test GoCV Contrib
run: |
go test -v -tags="matprofile,customenv" ./contrib
59 changes: 59 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,62 @@
0.37.0
---
* **all**
* Add support for OpenCV 4.10.0

0.36.1
---
* **bugfix**
* Correct error in CUDA function signature
* **test**
* correct CUDA tests
* **docker**
* add test image for CUDA 12

0.36.0
---
* **all**
* Add support for OpenCV 4.9.0
* update Go to version 1.22
* update minimum go version to 1.21
* **bugfix**
* aruco: correct test from latest OpenCV update
* **build**
* add GH action for Windows
* remove appveyor
* adjusted Makefile to build for debian bookworm
* **core**
* Add additional signature for MinMaxLoc.
* add color conversion alias
* add Mahalanobis(), Inv(), Row(), amd Col() functions
* add MulTransposed() function
* add PCABackProject() and PCAProject() functions
* add PSNR() function
* add SVBackSubst() and SVDecomp() functions
* **calib3d**
* add FisheyeCalibrate, FisheyeDistortPoints, and CheckChessboard functions
* Add func comments and update readme
* add Rodrigues function
* add SolvePnP function
* Add more smoke tests
* Initial commit of more stereo bindings
* **feature2d**
* Add interface for `Feature2D` algorithms
* Asserting some algorithms conform to `Feature2D`
* Prepend "Feature2D" prefix to component interfaces of Feature2D
* **imgproc**
* add CreateHanningWindow()
* add EMD()
* Add float version of BoxPoints and MinAreaRect
* Add new binding for cv::Erode.
* **videoio**
* add Retrieve function
* **contrib/xfeatures2d**
* Add BriefDescriptorExtractor to xfeatures2d (#1114)
* add NewSURFWithParams func
* Add separate "Compute" bindings for detection algorithms (#1117)
* **cuda/core**
* ADD Cuda MultiplyWithStream (#1142)

0.35.0
---
* **all**
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# to build this docker image:
# docker build .
FROM ghcr.io/hybridgroup/opencv:4.8.1
FROM ghcr.io/hybridgroup/opencv:4.10.0

ENV GOPATH /go

COPY . /go/src/gocv.io/x/gocv/

WORKDIR /go/src/gocv.io/x/gocv
RUN go build -tags example -o /build/gocv_version -i ./cmd/version/
RUN go build -tags example -o /build/gocv_version ./cmd/version/

CMD ["/build/gocv_version"]
2 changes: 1 addition & 1 deletion Dockerfile-test
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# docker run -it --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix gocv-test-4.x
# xhost -
#
FROM ghcr.io/hybridgroup/opencv:4.8.1 AS gocv-test-4.7
FROM ghcr.io/hybridgroup/opencv:4.10.0 AS gocv-test-4.7

ENV GOPATH /go

Expand Down
Loading

0 comments on commit f654f13

Please sign in to comment.