chore: upgrade dependencies
This commit is contained in:
1
vendor/gocv.io/x/gocv/.gitignore
generated
vendored
1
vendor/gocv.io/x/gocv/.gitignore
generated
vendored
@ -9,3 +9,4 @@ count.out
|
||||
/build
|
||||
.idea/
|
||||
contrib/data.yaml
|
||||
contrib/testOilPainting.png
|
||||
|
18
vendor/gocv.io/x/gocv/CHANGELOG.md
generated
vendored
18
vendor/gocv.io/x/gocv/CHANGELOG.md
generated
vendored
@ -1,3 +1,21 @@
|
||||
0.31.0
|
||||
---
|
||||
* **all**
|
||||
* update to OpenCV 4.6.0
|
||||
* **build**
|
||||
* Switch to Github Actions for Linux CI build
|
||||
* Use go -tags static when verifying static build
|
||||
* **core**
|
||||
* Add Mat.ElemSize (#964)
|
||||
* avoid index out of range panic in NewPointsVectorFromPoints
|
||||
* **video**
|
||||
* add findTransformECC function
|
||||
* **contrib/ximgproc**
|
||||
* add PeiLinNormalization() function
|
||||
* add anisotropicDiffusion() function
|
||||
* implement edgePreservingFilter()
|
||||
* implement niBlackThreshold and thinning filters
|
||||
|
||||
0.30.0
|
||||
---
|
||||
* **all**
|
||||
|
2
vendor/gocv.io/x/gocv/Dockerfile
generated
vendored
2
vendor/gocv.io/x/gocv/Dockerfile
generated
vendored
@ -1,6 +1,6 @@
|
||||
# to build this docker image:
|
||||
# docker build .
|
||||
FROM gocv/opencv:4.5.5
|
||||
FROM gocv/opencv:4.6.0
|
||||
|
||||
ENV GOPATH /go
|
||||
|
||||
|
2
vendor/gocv.io/x/gocv/Dockerfile-test
generated
vendored
2
vendor/gocv.io/x/gocv/Dockerfile-test
generated
vendored
@ -6,7 +6,7 @@
|
||||
# docker run -it --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix gocv-test
|
||||
# xhost -
|
||||
#
|
||||
FROM gocv/opencv:4.5.5 AS gocv-test
|
||||
FROM gocv/opencv:4.6.0 AS gocv-test
|
||||
|
||||
ENV GOPATH /go
|
||||
|
||||
|
2
vendor/gocv.io/x/gocv/Dockerfile-test.gpu-cuda-10
generated
vendored
2
vendor/gocv.io/x/gocv/Dockerfile-test.gpu-cuda-10
generated
vendored
@ -4,7 +4,7 @@
|
||||
# To run tests:
|
||||
# docker run -it --rm --gpus all gocv-test-gpu-cuda-10
|
||||
#
|
||||
FROM gocv/opencv:4.5.5-gpu-cuda-10 AS gocv-gpu-test-cuda-10
|
||||
FROM gocv/opencv:4.6.0-gpu-cuda-10 AS gocv-gpu-test-cuda-10
|
||||
|
||||
ENV GOPATH /go
|
||||
ENV PATH="${PATH}:/go/bin"
|
||||
|
2
vendor/gocv.io/x/gocv/Dockerfile-test.gpu-cuda-11
generated
vendored
2
vendor/gocv.io/x/gocv/Dockerfile-test.gpu-cuda-11
generated
vendored
@ -4,7 +4,7 @@
|
||||
# To run tests:
|
||||
# docker run -it --rm --gpus all gocv-test-gpu-cuda-11
|
||||
#
|
||||
FROM gocv/opencv:4.5.5-gpu-cuda-11 AS gocv-gpu-test-cuda-11
|
||||
FROM gocv/opencv:4.6.0-gpu-cuda-11 AS gocv-gpu-test-cuda-11
|
||||
|
||||
ENV GOPATH /go
|
||||
ENV PATH="${PATH}:/go/bin"
|
||||
|
2
vendor/gocv.io/x/gocv/Dockerfile.gpu
generated
vendored
2
vendor/gocv.io/x/gocv/Dockerfile.gpu
generated
vendored
@ -1,6 +1,6 @@
|
||||
# to build this docker image:
|
||||
# docker build -f Dockerfile.gpu .
|
||||
FROM gocv/opencv:4.5.5-gpu-cuda-11 AS gocv-gpu
|
||||
FROM gocv/opencv:4.6.0-gpu-cuda-11 AS gocv-gpu
|
||||
|
||||
ENV GOPATH /go
|
||||
|
||||
|
6
vendor/gocv.io/x/gocv/Dockerfile.opencv
generated
vendored
6
vendor/gocv.io/x/gocv/Dockerfile.opencv
generated
vendored
@ -1,6 +1,6 @@
|
||||
# to build this docker image:
|
||||
# docker build -f Dockerfile.opencv -t gocv/opencv:4.5.5 .
|
||||
FROM golang:1.17-buster AS opencv
|
||||
# docker build -f Dockerfile.opencv -t gocv/opencv:4.6.0 .
|
||||
FROM golang:1.18-buster AS opencv
|
||||
LABEL maintainer="hybridgroup"
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
@ -10,7 +10,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
libjpeg-dev libpng-dev libtiff-dev libdc1394-22-dev && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ARG OPENCV_VERSION="4.5.5"
|
||||
ARG OPENCV_VERSION="4.6.0"
|
||||
ENV OPENCV_VERSION $OPENCV_VERSION
|
||||
|
||||
RUN curl -Lo opencv.zip https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip && \
|
||||
|
13
vendor/gocv.io/x/gocv/Dockerfile.opencv-gpu-cuda-10
generated
vendored
13
vendor/gocv.io/x/gocv/Dockerfile.opencv-gpu-cuda-10
generated
vendored
@ -1,8 +1,13 @@
|
||||
# to build this docker image:
|
||||
# docker build -f Dockerfile.opencv-gpu-cuda-10 -t gocv/opencv:4.5.5-gpu-cuda-10 .
|
||||
FROM nvidia/cuda:10.2-cudnn7-devel AS opencv-gpu-base
|
||||
# docker build -f Dockerfile.opencv-gpu-cuda-10 -t gocv/opencv:4.6.0-gpu-cuda-10 .
|
||||
FROM nvidia/cuda:10.2-cudnn8-devel AS opencv-gpu-base
|
||||
LABEL maintainer="hybridgroup"
|
||||
|
||||
# needed for cuda repo key rotation. see:
|
||||
# https://forums.developer.nvidia.com/t/notice-cuda-linux-repository-key-rotation/212771
|
||||
#
|
||||
RUN apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
git build-essential cmake pkg-config unzip libgtk2.0-dev \
|
||||
wget curl ca-certificates libcurl4-openssl-dev libssl-dev \
|
||||
@ -10,7 +15,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
libjpeg-dev libpng-dev libtiff-dev libdc1394-22-dev && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ARG OPENCV_VERSION="4.5.5"
|
||||
ARG OPENCV_VERSION="4.6.0"
|
||||
ENV OPENCV_VERSION $OPENCV_VERSION
|
||||
|
||||
RUN curl -Lo opencv.zip https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip && \
|
||||
@ -54,7 +59,7 @@ RUN curl -Lo opencv.zip https://github.com/opencv/opencv/archive/${OPENCV_VERSIO
|
||||
# install golang here
|
||||
FROM opencv-gpu-base AS opencv-gpu-golang
|
||||
|
||||
ENV GO_RELEASE=1.17.2
|
||||
ENV GO_RELEASE=1.18.3
|
||||
RUN wget https://dl.google.com/go/go${GO_RELEASE}.linux-amd64.tar.gz && \
|
||||
tar xfv go${GO_RELEASE}.linux-amd64.tar.gz -C /usr/local && \
|
||||
rm go${GO_RELEASE}.linux-amd64.tar.gz
|
||||
|
8
vendor/gocv.io/x/gocv/Dockerfile.opencv-gpu-cuda-11
generated
vendored
8
vendor/gocv.io/x/gocv/Dockerfile.opencv-gpu-cuda-11
generated
vendored
@ -1,6 +1,6 @@
|
||||
# to build this docker image:
|
||||
# docker build -f Dockerfile.opencv-gpu-cuda-11 -t gocv/opencv:4.5.5-gpu-cuda-11 .
|
||||
FROM nvidia/cuda:11.4.2-cudnn8-devel-ubuntu20.04 AS opencv-gpu-cuda-11-base
|
||||
# docker build -f Dockerfile.opencv-gpu-cuda-11 -t gocv/opencv:4.6.0-gpu-cuda-11 .
|
||||
FROM nvidia/cuda:11.5.2-cudnn8-devel-ubuntu20.04 AS opencv-gpu-cuda-11-base
|
||||
LABEL maintainer="hybridgroup"
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
@ -11,7 +11,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
libjpeg-dev libpng-dev libtiff-dev libdc1394-22-dev && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ARG OPENCV_VERSION="4.5.5"
|
||||
ARG OPENCV_VERSION="4.6.0"
|
||||
ENV OPENCV_VERSION $OPENCV_VERSION
|
||||
|
||||
RUN curl -Lo opencv.zip https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip && \
|
||||
@ -55,7 +55,7 @@ RUN curl -Lo opencv.zip https://github.com/opencv/opencv/archive/${OPENCV_VERSIO
|
||||
# install golang here
|
||||
FROM opencv-gpu-cuda-11-base AS opencv-gpu-cuda-11-golang
|
||||
|
||||
ENV GO_RELEASE=1.17.2
|
||||
ENV GO_RELEASE=1.18.3
|
||||
RUN wget https://dl.google.com/go/go${GO_RELEASE}.linux-amd64.tar.gz && \
|
||||
tar xfv go${GO_RELEASE}.linux-amd64.tar.gz -C /usr/local && \
|
||||
rm go${GO_RELEASE}.linux-amd64.tar.gz
|
||||
|
10
vendor/gocv.io/x/gocv/Makefile
generated
vendored
10
vendor/gocv.io/x/gocv/Makefile
generated
vendored
@ -2,10 +2,10 @@
|
||||
.PHONY: test deps download build clean astyle cmds docker
|
||||
|
||||
# GoCV version to use.
|
||||
GOCV_VERSION?="v0.30.0"
|
||||
GOCV_VERSION?="v0.31.0"
|
||||
|
||||
# OpenCV version to use.
|
||||
OPENCV_VERSION?=4.5.5
|
||||
OPENCV_VERSION?=4.6.0
|
||||
|
||||
# Go version to use when building Docker image
|
||||
GOVERSION?=1.16.2
|
||||
@ -250,7 +250,7 @@ install_cuda: deps download sudo_pre_install_clean build_cuda sudo_install clean
|
||||
install_openvino: deps download download_openvino sudo_pre_install_clean build_openvino_package sudo_install_openvino build_openvino sudo_install clean verify_openvino
|
||||
|
||||
# Do everything statically.
|
||||
install_static: deps download sudo_pre_install_clean build_static sudo_install clean verify
|
||||
install_static: deps download sudo_pre_install_clean build_static sudo_install clean verify_static
|
||||
|
||||
# Do everything with non-free modules from cpencv_contrib.
|
||||
install_nonfree: deps download sudo_pre_install_clean build_nonfree sudo_install clean verify
|
||||
@ -276,6 +276,10 @@ sudo_install_openvino:
|
||||
verify:
|
||||
go run ./cmd/version/main.go
|
||||
|
||||
# Build a minimal Go app to confirm gocv works with statically built OpenCV.
|
||||
verify_static:
|
||||
go run -tags static ./cmd/version/main.go
|
||||
|
||||
# Build a minimal Go app to confirm gocv cuda works.
|
||||
verify_cuda:
|
||||
go run ./cmd/cuda/main.go
|
||||
|
60
vendor/gocv.io/x/gocv/README.md
generated
vendored
60
vendor/gocv.io/x/gocv/README.md
generated
vendored
@ -3,14 +3,14 @@
|
||||
[](http://gocv.io/)
|
||||
|
||||
[](https://pkg.go.dev/gocv.io/x/gocv)
|
||||
[](https://circleci.com/gh/hybridgroup/gocv/tree/dev)
|
||||
[](https://ci.appveyor.com/project/deadprogram/gocv/branch/dev)
|
||||
[](https://github.com/hybridgroup/gocv/actions/workflows/linux.yml)
|
||||
[](https://ci.appveyor.com/project/deadprogram/gocv/branch/dev)
|
||||
[](https://goreportcard.com/report/github.com/hybridgroup/gocv)
|
||||
[](https://github.com/hybridgroup/gocv/blob/release/LICENSE.txt)
|
||||
|
||||
The GoCV package provides Go language bindings for the [OpenCV 4](http://opencv.org/) computer vision library.
|
||||
|
||||
The GoCV package supports the latest releases of Go and OpenCV (v4.5.5) on Linux, macOS, and Windows. We intend to make the Go language a "first-class" client compatible with the latest developments in the OpenCV ecosystem.
|
||||
The GoCV package supports the latest releases of Go and OpenCV (v4.6.0) on Linux, macOS, and Windows. We intend to make the Go language a "first-class" client compatible with the latest developments in the OpenCV ecosystem.
|
||||
|
||||
GoCV supports [CUDA](https://en.wikipedia.org/wiki/CUDA) for hardware acceleration using Nvidia GPUs. Check out the [CUDA README](./cuda/README.md) for more info on how to use GoCV with OpenCV/CUDA.
|
||||
|
||||
@ -122,7 +122,7 @@ There are examples in the [cmd directory](./cmd) of this repo in the form of var
|
||||
|
||||
## How to install
|
||||
|
||||
To install GoCV, you must first have the matching version of OpenCV installed on your system. The current release of GoCV requires OpenCV 4.5.5.
|
||||
To install GoCV, you must first have the matching version of OpenCV installed on your system. The current release of GoCV requires OpenCV 4.6.0.
|
||||
|
||||
Here are instructions for Ubuntu, Raspian, macOS, and Windows.
|
||||
|
||||
@ -130,7 +130,7 @@ Here are instructions for Ubuntu, Raspian, macOS, and Windows.
|
||||
|
||||
### Installation
|
||||
|
||||
You can use `make` to install OpenCV 4.5.5 with the handy `Makefile` included with this repo. If you already have installed OpenCV, you do not need to do so again. The installation performed by the `Makefile` is minimal, so it may remove OpenCV options such as Python or Java wrappers if you have already installed OpenCV some other way.
|
||||
You can use `make` to install OpenCV 4.6.0 with the handy `Makefile` included with this repo. If you already have installed OpenCV, you do not need to do so again. The installation performed by the `Makefile` is minimal, so it may remove OpenCV options such as Python or Java wrappers if you have already installed OpenCV some other way.
|
||||
|
||||
#### Quick Install
|
||||
|
||||
@ -141,7 +141,7 @@ First, change directories to where you want to install GoCV, and then use git to
|
||||
|
||||
Make sure to change `$HOME/folder/with/your/src/` to where you actually want to save the code.
|
||||
|
||||
Once you have cloned the repo, the following commands should do everything to download and install OpenCV 4.5.5 on Linux:
|
||||
Once you have cloned the repo, the following commands should do everything to download and install OpenCV 4.6.0 on Linux:
|
||||
|
||||
cd gocv
|
||||
make install
|
||||
@ -152,8 +152,8 @@ If you need static opencv libraries
|
||||
|
||||
If it works correctly, at the end of the entire process, the following message should be displayed:
|
||||
|
||||
gocv version: 0.30.0
|
||||
opencv lib version: 4.5.5
|
||||
gocv version: 0.31.0
|
||||
opencv lib version: 4.6.0
|
||||
|
||||
That's it, now you are ready to use GoCV.
|
||||
|
||||
@ -167,7 +167,7 @@ See the [openvino directory](./openvino) for information.
|
||||
|
||||
#### Make Install for OpenVINO and Cuda
|
||||
|
||||
The following commands should do everything to download and install OpenCV 4.5.5 with CUDA and OpenVINO on Linux. Make sure to change `$HOME/folder/with/your/src/` to the directory you used to clone GoCV:
|
||||
The following commands should do everything to download and install OpenCV 4.6.0 with CUDA and OpenVINO on Linux. Make sure to change `$HOME/folder/with/your/src/` to the directory you used to clone GoCV:
|
||||
|
||||
cd $HOME/folder/with/gocv/
|
||||
make install_all
|
||||
@ -178,8 +178,8 @@ If you need static opencv libraries
|
||||
|
||||
If it works correctly, at the end of the entire process, the following message should be displayed:
|
||||
|
||||
gocv version: 0.30.0
|
||||
opencv lib version: 4.5.5-openvino
|
||||
gocv version: 0.31.0
|
||||
opencv lib version: 4.6.0-openvino
|
||||
cuda information:
|
||||
Device 0: "GeForce MX150" 2003Mb, sm_61, Driver/Runtime ver.10.0/10.0
|
||||
|
||||
@ -206,7 +206,7 @@ Next, you need to update the system, and install any required packages:
|
||||
|
||||
#### Download source
|
||||
|
||||
Now, download the OpenCV 4.5.5 and OpenCV Contrib source code:
|
||||
Now, download the OpenCV 4.6.0 and OpenCV Contrib source code:
|
||||
|
||||
make download
|
||||
|
||||
@ -240,8 +240,8 @@ Now you should be able to build or run any of the examples:
|
||||
|
||||
The version program should output the following:
|
||||
|
||||
gocv version: 0.30.0
|
||||
opencv lib version: 4.5.5
|
||||
gocv version: 0.31.0
|
||||
opencv lib version: 4.6.0
|
||||
|
||||
#### Cleanup extra files
|
||||
|
||||
@ -320,7 +320,7 @@ There is a Docker image with Alpine 3.7 that has been created by project contrib
|
||||
|
||||
### Installation
|
||||
|
||||
We have a special installation for the Raspberry Pi that includes some hardware optimizations. You use `make` to install OpenCV 4.5.5 with the handy `Makefile` included with this repo. If you already have installed OpenCV, you do not need to do so again. The installation performed by the `Makefile` is minimal, so it may remove OpenCV options such as Python or Java wrappers if you have already installed OpenCV some other way.
|
||||
We have a special installation for the Raspberry Pi that includes some hardware optimizations. You use `make` to install OpenCV 4.6.0 with the handy `Makefile` included with this repo. If you already have installed OpenCV, you do not need to do so again. The installation performed by the `Makefile` is minimal, so it may remove OpenCV options such as Python or Java wrappers if you have already installed OpenCV some other way.
|
||||
|
||||
#### Quick Install
|
||||
|
||||
@ -331,15 +331,15 @@ First, change directories to where you want to install GoCV, and then use git to
|
||||
|
||||
Make sure to change `$HOME/folder/with/your/src/` to where you actually want to save the code.
|
||||
|
||||
The following make command should do everything to download and install OpenCV 4.5.5 on Raspbian:
|
||||
The following make command should do everything to download and install OpenCV 4.6.0 on Raspbian:
|
||||
|
||||
cd $HOME/folder/with/your/src/gocv
|
||||
make install_raspi
|
||||
|
||||
If it works correctly, at the end of the entire process, the following message should be displayed:
|
||||
|
||||
gocv version: 0.30.0
|
||||
opencv lib version: 4.5.5
|
||||
gocv version: 0.31.0
|
||||
opencv lib version: 4.6.0
|
||||
|
||||
That's it, now you are ready to use GoCV.
|
||||
|
||||
@ -347,13 +347,13 @@ That's it, now you are ready to use GoCV.
|
||||
|
||||
### Installation
|
||||
|
||||
You can install OpenCV 4.5.5 using Homebrew.
|
||||
You can install OpenCV 4.6.0 using Homebrew.
|
||||
|
||||
If you already have an earlier version of OpenCV (3.4.x) installed, you should probably remove it before installing the new version:
|
||||
|
||||
brew uninstall opencv
|
||||
|
||||
You can then install OpenCV 4.5.5:
|
||||
You can then install OpenCV 4.6.0:
|
||||
|
||||
brew install opencv
|
||||
|
||||
@ -377,8 +377,8 @@ Now you should be able to build or run any of the examples:
|
||||
|
||||
The version program should output the following:
|
||||
|
||||
gocv version: 0.30.0
|
||||
opencv lib version: 4.5.5
|
||||
gocv version: 0.31.0
|
||||
opencv lib version: 4.6.0
|
||||
|
||||
### Custom Environment
|
||||
|
||||
@ -387,8 +387,8 @@ By default, pkg-config is used to determine the correct flags for compiling and
|
||||
For example:
|
||||
|
||||
export CGO_CXXFLAGS="--std=c++11"
|
||||
export CGO_CPPFLAGS="-I/usr/local/Cellar/opencv/4.5.5/include"
|
||||
export CGO_LDFLAGS="-L/usr/local/Cellar/opencv/4.5.5/lib -lopencv_stitching -lopencv_superres -lopencv_videostab -lopencv_aruco -lopencv_bgsegm -lopencv_bioinspired -lopencv_ccalib -lopencv_dnn_objdetect -lopencv_dpm -lopencv_face -lopencv_photo -lopencv_fuzzy -lopencv_hfs -lopencv_img_hash -lopencv_line_descriptor -lopencv_optflow -lopencv_reg -lopencv_rgbd -lopencv_saliency -lopencv_stereo -lopencv_structured_light -lopencv_phase_unwrapping -lopencv_surface_matching -lopencv_tracking -lopencv_datasets -lopencv_dnn -lopencv_plot -lopencv_xfeatures2d -lopencv_shape -lopencv_video -lopencv_ml -lopencv_ximgproc -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_flann -lopencv_xobjdetect -lopencv_imgcodecs -lopencv_objdetect -lopencv_xphoto -lopencv_imgproc -lopencv_core"
|
||||
export CGO_CPPFLAGS="-I/usr/local/Cellar/opencv/4.6.0/include"
|
||||
export CGO_LDFLAGS="-L/usr/local/Cellar/opencv/4.6.0/lib -lopencv_stitching -lopencv_superres -lopencv_videostab -lopencv_aruco -lopencv_bgsegm -lopencv_bioinspired -lopencv_ccalib -lopencv_dnn_objdetect -lopencv_dpm -lopencv_face -lopencv_photo -lopencv_fuzzy -lopencv_hfs -lopencv_img_hash -lopencv_line_descriptor -lopencv_optflow -lopencv_reg -lopencv_rgbd -lopencv_saliency -lopencv_stereo -lopencv_structured_light -lopencv_phase_unwrapping -lopencv_surface_matching -lopencv_tracking -lopencv_datasets -lopencv_dnn -lopencv_plot -lopencv_xfeatures2d -lopencv_shape -lopencv_video -lopencv_ml -lopencv_ximgproc -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_flann -lopencv_xobjdetect -lopencv_imgcodecs -lopencv_objdetect -lopencv_xphoto -lopencv_imgproc -lopencv_core"
|
||||
|
||||
Please note that you will need to run these 3 lines of code one time in your current session in order to build or run the code, in order to setup the needed ENV variables. Once you have done so, you can execute code that uses GoCV with your custom environment like this:
|
||||
|
||||
@ -400,7 +400,7 @@ Please note that you will need to run these 3 lines of code one time in your cur
|
||||
|
||||
The following assumes that you are running a 64-bit version of Windows 10.
|
||||
|
||||
In order to build and install OpenCV 4.5.5 on Windows, you must first download and install MinGW-W64 and CMake, as follows.
|
||||
In order to build and install OpenCV 4.6.0 on Windows, you must first download and install MinGW-W64 and CMake, as follows.
|
||||
|
||||
#### MinGW-W64
|
||||
|
||||
@ -416,9 +416,9 @@ Add the `C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bi
|
||||
|
||||
Download and install CMake [https://cmake.org/download/](https://cmake.org/download/) to the default location. CMake installer will add CMake to your system path.
|
||||
|
||||
#### OpenCV 4.5.5 and OpenCV Contrib Modules
|
||||
#### OpenCV 4.6.0 and OpenCV Contrib Modules
|
||||
|
||||
The following commands should do everything to download and install OpenCV 4.5.5 on Windows:
|
||||
The following commands should do everything to download and install OpenCV 4.6.0 on Windows:
|
||||
|
||||
chdir %GOPATH%\src\gocv.io\x\gocv
|
||||
win_build_opencv.cmd
|
||||
@ -439,8 +439,8 @@ Now you should be able to build or run any of the command examples:
|
||||
|
||||
The version program should output the following:
|
||||
|
||||
gocv version: 0.30.0
|
||||
opencv lib version: 4.5.5
|
||||
gocv version: 0.31.0
|
||||
opencv lib version: 4.6.0
|
||||
|
||||
That's it, now you are ready to use GoCV.
|
||||
|
||||
@ -454,7 +454,7 @@ For example:
|
||||
|
||||
set CGO_CXXFLAGS="--std=c++11"
|
||||
set CGO_CPPFLAGS=-IC:\opencv\build\install\include
|
||||
set CGO_LDFLAGS=-LC:\opencv\build\install\x64\mingw\lib -lopencv_core455 -lopencv_face455 -lopencv_videoio455 -lopencv_imgproc455 -lopencv_highgui455 -lopencv_imgcodecs455 -lopencv_objdetect455 -lopencv_features2d455 -lopencv_video455 -lopencv_dnn455 -lopencv_xfeatures2d455 -lopencv_plot455 -lopencv_tracking455 -lopencv_img_hash455
|
||||
set CGO_LDFLAGS=-LC:\opencv\build\install\x64\mingw\lib -lopencv_core460 -lopencv_face460 -lopencv_videoio460 -lopencv_imgproc460 -lopencv_highgui460 -lopencv_imgcodecs460 -lopencv_objdetect460 -lopencv_features2d460 -lopencv_video460 -lopencv_dnn460 -lopencv_xfeatures2d460 -lopencv_plot460 -lopencv_tracking460 -lopencv_img_hash460
|
||||
|
||||
Please note that you will need to run these 3 lines of code one time in your current session in order to build or run the code, in order to setup the needed ENV variables. Once you have done so, you can execute code that uses GoCV with your custom environment like this:
|
||||
|
||||
|
4
vendor/gocv.io/x/gocv/ROADMAP.md
generated
vendored
4
vendor/gocv.io/x/gocv/ROADMAP.md
generated
vendored
@ -395,6 +395,6 @@ Your pull requests will be greatly appreciated!
|
||||
- [ ] viz. 3D Visualizer
|
||||
- [X] **wechat_qrcode. WeChat QR code detector for detecting and parsing QR code**
|
||||
- [ ] **xfeatures2d. Extra 2D Features Framework - WORK STARTED**
|
||||
- [ ] ximgproc. Extended Image Processing
|
||||
- [ ] **ximgproc. Extended Image Processing - WORK STARTED**
|
||||
- [ ] xobjdetect. Extended object detection
|
||||
- [ ] **xphoto. Additional photo processing algorithms - WORK STARTED**
|
||||
- [X] **xphoto. Additional photo processing algorithms**
|
||||
|
18
vendor/gocv.io/x/gocv/appveyor_build_opencv.cmd
generated
vendored
18
vendor/gocv.io/x/gocv/appveyor_build_opencv.cmd
generated
vendored
@ -3,17 +3,17 @@ if not exist "C:\opencv" mkdir "C:\opencv"
|
||||
if not exist "C:\opencv\build" mkdir "C:\opencv\build"
|
||||
if not exist "C:\opencv\testdata" mkdir "C:\opencv\testdata"
|
||||
|
||||
appveyor DownloadFile https://github.com/opencv/opencv/archive/4.5.5.zip -FileName c:\opencv\opencv-4.5.5.zip
|
||||
7z x c:\opencv\opencv-4.5.5.zip -oc:\opencv -y
|
||||
del c:\opencv\opencv-4.5.5.zip /q
|
||||
appveyor DownloadFile https://github.com/opencv/opencv_contrib/archive/4.5.5.zip -FileName c:\opencv\opencv_contrib-4.5.5.zip
|
||||
7z x c:\opencv\opencv_contrib-4.5.5.zip -oc:\opencv -y
|
||||
del c:\opencv\opencv_contrib-4.5.5.zip /q
|
||||
appveyor DownloadFile https://github.com/opencv/opencv/archive/4.6.0.zip -FileName c:\opencv\opencv-4.6.0.zip
|
||||
7z x c:\opencv\opencv-4.6.0.zip -oc:\opencv -y
|
||||
del c:\opencv\opencv-4.6.0.zip /q
|
||||
appveyor DownloadFile https://github.com/opencv/opencv_contrib/archive/4.6.0.zip -FileName c:\opencv\opencv_contrib-4.6.0.zip
|
||||
7z x c:\opencv\opencv_contrib-4.6.0.zip -oc:\opencv -y
|
||||
del c:\opencv\opencv_contrib-4.6.0.zip /q
|
||||
cd C:\opencv\build
|
||||
set PATH=C:\Perl\site\bin;C:\Perl\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\7-Zip;C:\Program Files\Microsoft\Web Platform Installer\;C:\Tools\PsTools;C:\Program Files (x86)\CMake\bin;C:\go\bin;C:\Tools\NuGet;C:\Program Files\LLVM\bin;C:\Tools\curl\bin;C:\ProgramData\chocolatey\bin;C:\Program Files (x86)\Yarn\bin;C:\Users\appveyor\AppData\Local\Yarn\bin;C:\Program Files\AppVeyor\BuildAgent\
|
||||
set PATH=%PATH%;C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin
|
||||
dir C:\opencv
|
||||
cmake C:\opencv\opencv-4.5.5 -G "MinGW Makefiles" -BC:\opencv\build -DENABLE_CXX11=ON -DOPENCV_EXTRA_MODULES_PATH=C:\opencv\opencv_contrib-4.5.5\modules -DBUILD_SHARED_LIBS=ON -DWITH_IPP=OFF -DWITH_MSMF=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -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= -DBUILD_opencv_gapi=OFF -DOPENCV_GENERATE_PKGCONFIG=ON -DOPENCV_ENABLE_NONFREE=ON -DWITH_OPENCL_D3D11_NV=OFF -DOPENCV_ALLOCATOR_STATS_COUNTER_TYPE=int64_t -DWITH_TBB=ON -Wno-dev
|
||||
cmake C:\opencv\opencv-4.6.0 -G "MinGW Makefiles" -BC:\opencv\build -DENABLE_CXX11=ON -DOPENCV_EXTRA_MODULES_PATH=C:\opencv\opencv_contrib-4.6.0\modules -DBUILD_SHARED_LIBS=ON -DWITH_IPP=OFF -DWITH_MSMF=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -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= -DBUILD_opencv_gapi=OFF -DOPENCV_GENERATE_PKGCONFIG=ON -DOPENCV_ENABLE_NONFREE=ON -DWITH_OPENCL_D3D11_NV=OFF -DOPENCV_ALLOCATOR_STATS_COUNTER_TYPE=int64_t -DWITH_TBB=ON -Wno-dev
|
||||
mingw32-make -j%NUMBER_OF_PROCESSORS%
|
||||
mingw32-make install
|
||||
appveyor DownloadFile https://raw.githubusercontent.com/opencv/opencv_extra/master/testdata/dnn/bvlc_googlenet.prototxt -FileName C:\opencv\testdata\bvlc_googlenet.prototxt
|
||||
@ -25,5 +25,5 @@ appveyor DownloadFile http://dl.caffe.berkeleyvision.org/bvlc_googlenet.caffemod
|
||||
appveyor DownloadFile https://storage.googleapis.com/download.tensorflow.org/models/inception5h.zip -FileName C:\opencv\testdata\inception5h.zip
|
||||
appveyor DownloadFile https://github.com/onnx/models/raw/main/vision/classification/inception_and_googlenet/googlenet/model/googlenet-9.onnx -FileName C:\opencv\testdata\googlenet-9.onnx
|
||||
7z x C:\opencv\testdata\inception5h.zip -oC:\opencv\testdata tensorflow_inception_graph.pb -y
|
||||
rmdir c:\opencv\opencv-4.5.5 /s /q
|
||||
rmdir c:\opencv\opencv_contrib-4.5.5 /s /q
|
||||
rmdir c:\opencv\opencv-4.6.0 /s /q
|
||||
rmdir c:\opencv\opencv_contrib-4.6.0 /s /q
|
||||
|
2
vendor/gocv.io/x/gocv/cgo.go
generated
vendored
2
vendor/gocv.io/x/gocv/cgo.go
generated
vendored
@ -9,6 +9,6 @@ package gocv
|
||||
#cgo !windows pkg-config: opencv4
|
||||
#cgo CXXFLAGS: --std=c++11
|
||||
#cgo windows CPPFLAGS: -IC:/opencv/build/install/include
|
||||
#cgo windows LDFLAGS: -LC:/opencv/build/install/x64/mingw/lib -lopencv_core455 -lopencv_face455 -lopencv_videoio455 -lopencv_imgproc455 -lopencv_highgui455 -lopencv_imgcodecs455 -lopencv_objdetect455 -lopencv_features2d455 -lopencv_video455 -lopencv_dnn455 -lopencv_xfeatures2d455 -lopencv_plot455 -lopencv_tracking455 -lopencv_img_hash455 -lopencv_calib3d455 -lopencv_bgsegm455 -lopencv_photo455 -lopencv_aruco455 -lopencv_wechat_qrcode455
|
||||
#cgo windows LDFLAGS: -LC:/opencv/build/install/x64/mingw/lib -lopencv_core460 -lopencv_face460 -lopencv_videoio460 -lopencv_imgproc460 -lopencv_highgui460 -lopencv_imgcodecs460 -lopencv_objdetect460 -lopencv_features2d460 -lopencv_video460 -lopencv_dnn460 -lopencv_xfeatures2d460 -lopencv_plot460 -lopencv_tracking460 -lopencv_img_hash460 -lopencv_calib3d460 -lopencv_bgsegm460 -lopencv_photo460 -lopencv_aruco460 -lopencv_wechat_qrcode460 -lopencv_ximgproc460
|
||||
*/
|
||||
import "C"
|
||||
|
2
vendor/gocv.io/x/gocv/cgo_static.go
generated
vendored
2
vendor/gocv.io/x/gocv/cgo_static.go
generated
vendored
@ -10,6 +10,6 @@ package gocv
|
||||
#cgo !windows CPPFLAGS: -I/usr/local/include -I/usr/local/include/opencv4
|
||||
#cgo !windows LDFLAGS: -L/usr/local/lib -L/usr/local/lib/opencv4/3rdparty -lopencv_gapi -lopencv_stitching -lopencv_aruco -lopencv_bgsegm -lopencv_bioinspired -lopencv_ccalib -lopencv_dnn_objdetect -lopencv_dpm -lopencv_face -lopencv_fuzzy -lopencv_hfs -lopencv_img_hash -lopencv_line_descriptor -lopencv_quality -lopencv_reg -lopencv_rgbd -lopencv_saliency -lopencv_stereo -lopencv_structured_light -lopencv_phase_unwrapping -lopencv_superres -lopencv_optflow -lopencv_surface_matching -lopencv_tracking -lopencv_datasets -lopencv_text -lopencv_highgui -lopencv_dnn -lopencv_plot -lopencv_videostab -lopencv_video -lopencv_videoio -lopencv_xfeatures2d -lopencv_shape -lopencv_ml -lopencv_ximgproc -lopencv_xobjdetect -lopencv_objdetect -lopencv_calib3d -lopencv_imgcodecs -lopencv_features2d -lopencv_flann -lopencv_xphoto -lopencv_wechat_qrcode -lopencv_photo -lopencv_imgproc -lopencv_core -littnotify -llibprotobuf -lIlmImf -lquirc -lippiw -lippicv -lade -lz -ljpeg -ldl -lm -lpthread -lrt -lquadmath
|
||||
#cgo windows CPPFLAGS: -IC:/opencv/build/install/include
|
||||
#cgo windows LDFLAGS: -LC:/opencv/build/install/x64/mingw/staticlib -lopencv_stereo455 -lopencv_tracking455 -lopencv_superres455 -lopencv_stitching455 -lopencv_optflow455 -lopencv_gapi455 -lopencv_face455 -lopencv_dpm455 -lopencv_dnn_objdetect455 -lopencv_ccalib455 -lopencv_bioinspired455 -lopencv_bgsegm455 -lopencv_aruco455 -lopencv_xobjdetect455 -lopencv_ximgproc455 -lopencv_xfeatures2d455 -lopencv_videostab455 -lopencv_video455 -lopencv_structured_light455 -lopencv_shape455 -lopencv_rgbd455 -lopencv_rapid455 -lopencv_objdetect455 -lopencv_mcc455 -lopencv_highgui455 -lopencv_datasets455 -lopencv_calib3d455 -lopencv_videoio455 -lopencv_text455 -lopencv_line_descriptor455 -lopencv_imgcodecs455 -lopencv_img_hash455 -lopencv_hfs455 -lopencv_fuzzy455 -lopencv_features2d455 -lopencv_dnn_superres455 -lopencv_dnn455 -lopencv_xphoto455 -lopencv_wechat_qrcode455 -lopencv_surface_matching455 -lopencv_reg455 -lopencv_quality455 -lopencv_plot455 -lopencv_photo455 -lopencv_phase_unwrapping455 -lopencv_ml455 -lopencv_intensity_transform455 -lopencv_imgproc455 -lopencv_flann455 -lopencv_core455 -lade -lquirc -llibprotobuf -lIlmImf -llibpng -llibopenjp2 -llibwebp -llibtiff -llibjpeg-turbo -lzlib -lkernel32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 -luser32
|
||||
#cgo windows LDFLAGS: -LC:/opencv/build/install/x64/mingw/staticlib -lopencv_stereo460 -lopencv_tracking460 -lopencv_superres460 -lopencv_stitching460 -lopencv_optflow460 -lopencv_gapi460 -lopencv_face460 -lopencv_dpm460 -lopencv_dnn_objdetect460 -lopencv_ccalib460 -lopencv_bioinspired460 -lopencv_bgsegm460 -lopencv_aruco460 -lopencv_xobjdetect460 -lopencv_ximgproc460 -lopencv_xfeatures2d460 -lopencv_videostab460 -lopencv_video460 -lopencv_structured_light460 -lopencv_shape460 -lopencv_rgbd460 -lopencv_rapid460 -lopencv_objdetect460 -lopencv_mcc460 -lopencv_highgui460 -lopencv_datasets460 -lopencv_calib3d460 -lopencv_videoio460 -lopencv_text460 -lopencv_line_descriptor460 -lopencv_imgcodecs460 -lopencv_img_hash460 -lopencv_hfs460 -lopencv_fuzzy460 -lopencv_features2d460 -lopencv_dnn_superres460 -lopencv_dnn460 -lopencv_xphoto460 -lopencv_wechat_qrcode460 -lopencv_surface_matching460 -lopencv_reg460 -lopencv_quality460 -lopencv_plot460 -lopencv_photo460 -lopencv_phase_unwrapping460 -lopencv_ml460 -lopencv_intensity_transform460 -lopencv_imgproc460 -lopencv_flann460 -lopencv_core460 -lade -lquirc -llibprotobuf -lIlmImf -llibpng -llibopenjp2 -llibwebp -llibtiff -llibjpeg-turbo -lzlib -lkernel32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 -luser32
|
||||
*/
|
||||
import "C"
|
||||
|
4
vendor/gocv.io/x/gocv/core.cpp
generated
vendored
4
vendor/gocv.io/x/gocv/core.cpp
generated
vendored
@ -210,6 +210,10 @@ int Mat_Total(Mat m) {
|
||||
return m->total();
|
||||
}
|
||||
|
||||
int Mat_ElemSize(Mat m){
|
||||
return m->elemSize();
|
||||
}
|
||||
|
||||
void Mat_Size(Mat m, IntVector* res) {
|
||||
cv::MatSize ms(m->size);
|
||||
int* ids = new int[ms.dims()];
|
||||
|
8
vendor/gocv.io/x/gocv/core.go
generated
vendored
8
vendor/gocv.io/x/gocv/core.go
generated
vendored
@ -668,6 +668,11 @@ func (m *Mat) Step() int {
|
||||
return int(C.Mat_Step(m.p))
|
||||
}
|
||||
|
||||
// ElemSize returns the matrix element size in bytes.
|
||||
func (m *Mat) ElemSize() int {
|
||||
return int(C.Mat_ElemSize(m.p))
|
||||
}
|
||||
|
||||
// GetUCharAt returns a value from a specific row/col
|
||||
// in this Mat expecting it to be of type uchar aka CV_8U.
|
||||
func (m *Mat) GetUCharAt(row int, col int) uint8 {
|
||||
@ -2119,6 +2124,9 @@ func NewPointsVector() PointsVector {
|
||||
// NewPointsVectorFromPoints returns a new PointsVector that has been
|
||||
// initialized to a slice of slices of image.Point.
|
||||
func NewPointsVectorFromPoints(pts [][]image.Point) PointsVector {
|
||||
if len(pts) <= 0 {
|
||||
return NewPointsVector()
|
||||
}
|
||||
points := make([]C.struct_Points, len(pts))
|
||||
|
||||
for i, pt := range pts {
|
||||
|
1
vendor/gocv.io/x/gocv/core.h
generated
vendored
1
vendor/gocv.io/x/gocv/core.h
generated
vendored
@ -304,6 +304,7 @@ int Mat_Cols(Mat m);
|
||||
int Mat_Channels(Mat m);
|
||||
int Mat_Type(Mat m);
|
||||
int Mat_Step(Mat m);
|
||||
int Mat_ElemSize(Mat m);
|
||||
Mat Eye(int rows, int cols, int type);
|
||||
Mat Zeros(int rows, int cols, int type);
|
||||
Mat Ones(int rows, int cols, int type);
|
||||
|
7
vendor/gocv.io/x/gocv/imgproc.cpp
generated
vendored
7
vendor/gocv.io/x/gocv/imgproc.cpp
generated
vendored
@ -501,6 +501,13 @@ void WarpPerspective(Mat src, Mat dst, Mat m, Size dsize) {
|
||||
cv::warpPerspective(*src, *dst, *m, sz);
|
||||
}
|
||||
|
||||
void WarpPerspectiveWithParams(Mat src, Mat dst, Mat rot_mat, Size dsize, int flags, int borderMode,
|
||||
Scalar borderValue) {
|
||||
cv::Size sz(dsize.width, dsize.height);
|
||||
cv::Scalar c = cv::Scalar(borderValue.val1, borderValue.val2, borderValue.val3, borderValue.val4);
|
||||
cv::warpPerspective(*src, *dst, *rot_mat, sz, flags, borderMode, c);
|
||||
}
|
||||
|
||||
void Watershed(Mat image, Mat markers) {
|
||||
cv::watershed(*image, *markers);
|
||||
}
|
||||
|
25
vendor/gocv.io/x/gocv/imgproc.go
generated
vendored
25
vendor/gocv.io/x/gocv/imgproc.go
generated
vendored
@ -1568,6 +1568,12 @@ const (
|
||||
|
||||
// InterpolationMax indicates use maximum interpolation.
|
||||
InterpolationMax InterpolationFlags = 7
|
||||
|
||||
// WarpFillOutliers fills all of the destination image pixels. If some of them correspond to outliers in the source image, they are set to zero.
|
||||
WarpFillOutliers = 8
|
||||
|
||||
// WarpInverseMap, inverse transformation.
|
||||
WarpInverseMap = 16
|
||||
)
|
||||
|
||||
// Resize resizes an image.
|
||||
@ -1649,6 +1655,7 @@ func WarpAffineWithParams(src Mat, dst *Mat, m Mat, sz image.Point, flags Interp
|
||||
}
|
||||
|
||||
// WarpPerspective applies a perspective transformation to an image.
|
||||
// For more parameters please check WarpPerspectiveWithParams.
|
||||
//
|
||||
// For further details, please see:
|
||||
// https://docs.opencv.org/master/da/d54/group__imgproc__transform.html#gaf73673a7e8e18ec6963e3774e6a94b87
|
||||
@ -1661,6 +1668,24 @@ func WarpPerspective(src Mat, dst *Mat, m Mat, sz image.Point) {
|
||||
C.WarpPerspective(src.p, dst.p, m.p, pSize)
|
||||
}
|
||||
|
||||
// WarpPerspectiveWithParams applies a perspective transformation to an image.
|
||||
//
|
||||
// For further details, please see:
|
||||
// https://docs.opencv.org/master/da/d54/group__imgproc__transform.html#gaf73673a7e8e18ec6963e3774e6a94b87
|
||||
func WarpPerspectiveWithParams(src Mat, dst *Mat, m Mat, sz image.Point, flags InterpolationFlags, borderType BorderType, borderValue color.RGBA) {
|
||||
pSize := C.struct_Size{
|
||||
width: C.int(sz.X),
|
||||
height: C.int(sz.Y),
|
||||
}
|
||||
bv := C.struct_Scalar{
|
||||
val1: C.double(borderValue.B),
|
||||
val2: C.double(borderValue.G),
|
||||
val3: C.double(borderValue.R),
|
||||
val4: C.double(borderValue.A),
|
||||
}
|
||||
C.WarpPerspectiveWithParams(src.p, dst.p, m.p, pSize, C.int(flags), C.int(borderType), bv)
|
||||
}
|
||||
|
||||
// Watershed performs a marker-based image segmentation using the watershed algorithm.
|
||||
//
|
||||
// For further details, please see:
|
||||
|
2
vendor/gocv.io/x/gocv/imgproc.h
generated
vendored
2
vendor/gocv.io/x/gocv/imgproc.h
generated
vendored
@ -104,6 +104,8 @@ void WarpAffine(Mat src, Mat dst, Mat rot_mat, Size dsize);
|
||||
void WarpAffineWithParams(Mat src, Mat dst, Mat rot_mat, Size dsize, int flags, int borderMode,
|
||||
Scalar borderValue);
|
||||
void WarpPerspective(Mat src, Mat dst, Mat m, Size dsize);
|
||||
void WarpPerspectiveWithParams(Mat src, Mat dst, Mat rot_mat, Size dsize, int flags, int borderMode,
|
||||
Scalar borderValue);
|
||||
void Watershed(Mat image, Mat markers);
|
||||
void ApplyColorMap(Mat src, Mat dst, int colormap);
|
||||
void ApplyCustomColorMap(Mat src, Mat dst, Mat colormap);
|
||||
|
2
vendor/gocv.io/x/gocv/version.go
generated
vendored
2
vendor/gocv.io/x/gocv/version.go
generated
vendored
@ -7,7 +7,7 @@ package gocv
|
||||
import "C"
|
||||
|
||||
// GoCVVersion of this package, for display purposes.
|
||||
const GoCVVersion = "0.30.0"
|
||||
const GoCVVersion = "0.31.0"
|
||||
|
||||
// Version returns the current golang package version
|
||||
func Version() string {
|
||||
|
4
vendor/gocv.io/x/gocv/video.cpp
generated
vendored
4
vendor/gocv.io/x/gocv/video.cpp
generated
vendored
@ -47,6 +47,10 @@ void CalcOpticalFlowPyrLKWithParams(Mat prevImg, Mat nextImg, Mat prevPts, Mat n
|
||||
cv::calcOpticalFlowPyrLK(*prevImg, *nextImg, *prevPts, *nextPts, *status, *err, sz, maxLevel, *criteria, flags, minEigThreshold);
|
||||
}
|
||||
|
||||
double FindTransformECC(Mat templateImage, Mat inputImage, Mat warpMatrix, int motionType, TermCriteria criteria, Mat inputMask, int gaussFiltSize){
|
||||
return cv::findTransformECC(*templateImage, *inputImage, *warpMatrix, motionType, *criteria, *inputMask, gaussFiltSize);
|
||||
}
|
||||
|
||||
bool Tracker_Init(Tracker self, Mat image, Rect boundingBox) {
|
||||
cv::Rect bb(boundingBox.x, boundingBox.y, boundingBox.width, boundingBox.height);
|
||||
|
||||
|
23
vendor/gocv.io/x/gocv/video.go
generated
vendored
23
vendor/gocv.io/x/gocv/video.go
generated
vendored
@ -22,6 +22,20 @@ const (
|
||||
OptflowFarnebackGaussian = 256
|
||||
)
|
||||
|
||||
/**
|
||||
cv::MOTION_TRANSLATION = 0,
|
||||
cv::MOTION_EUCLIDEAN = 1,
|
||||
cv::MOTION_AFFINE = 2,
|
||||
cv::MOTION_HOMOGRAPHY = 3
|
||||
For further details, please see: https://docs.opencv.org/4.x/dc/d6b/group__video__track.html#ggaaedb1f94e6b143cef163622c531afd88a01106d6d20122b782ff25eaeffe9a5be
|
||||
*/
|
||||
const (
|
||||
MotionTranslation = 0
|
||||
MotionEuclidean = 1
|
||||
MotionAffine = 2
|
||||
MotionHomography = 3
|
||||
)
|
||||
|
||||
// BackgroundSubtractorMOG2 is a wrapper around the cv::BackgroundSubtractorMOG2.
|
||||
type BackgroundSubtractorMOG2 struct {
|
||||
// C.BackgroundSubtractorMOG2
|
||||
@ -156,6 +170,15 @@ func CalcOpticalFlowPyrLKWithParams(prevImg Mat, nextImg Mat, prevPts Mat, nextP
|
||||
return
|
||||
}
|
||||
|
||||
// FindTransformECC finds the geometric transform (warp) between two images in terms of the ECC criterion.
|
||||
//
|
||||
// For futther details, please see:
|
||||
// https://docs.opencv.org/4.x/dc/d6b/group__video__track.html#ga1aa357007eaec11e9ed03500ecbcbe47
|
||||
//
|
||||
func FindTransformECC(templateImage Mat, inputImage Mat, warpMatrix *Mat, motionType int, criteria TermCriteria, inputMask Mat, gaussFiltSize int) float64 {
|
||||
return float64(C.FindTransformECC(templateImage.p, inputImage.p, warpMatrix.p, C.int(motionType), criteria.p, inputMask.p, C.int(gaussFiltSize)))
|
||||
}
|
||||
|
||||
// Tracker is the base interface for object tracking.
|
||||
//
|
||||
// see: https://docs.opencv.org/master/d0/d0a/classcv_1_1Tracker.html
|
||||
|
2
vendor/gocv.io/x/gocv/video.h
generated
vendored
2
vendor/gocv.io/x/gocv/video.h
generated
vendored
@ -39,6 +39,8 @@ void CalcOpticalFlowPyrLKWithParams(Mat prevImg, Mat nextImg, Mat prevPts, Mat n
|
||||
void CalcOpticalFlowFarneback(Mat prevImg, Mat nextImg, Mat flow, double pyrScale, int levels,
|
||||
int winsize, int iterations, int polyN, double polySigma, int flags);
|
||||
|
||||
double FindTransformECC(Mat templateImage, Mat inputImage, Mat warpMatrix, int motionType, TermCriteria criteria, Mat inputMask, int gaussFiltSize);
|
||||
|
||||
bool Tracker_Init(Tracker self, Mat image, Rect boundingBox);
|
||||
bool Tracker_Update(Tracker self, Mat image, Rect* boundingBox);
|
||||
|
||||
|
22
vendor/gocv.io/x/gocv/win_build_opencv.cmd
generated
vendored
22
vendor/gocv.io/x/gocv/win_build_opencv.cmd
generated
vendored
@ -11,18 +11,18 @@ echo.
|
||||
REM This is why there is no progress bar:
|
||||
REM https://github.com/PowerShell/PowerShell/issues/2138
|
||||
|
||||
echo Downloading: opencv-4.5.5.zip [91MB]
|
||||
powershell -command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -Uri https://github.com/opencv/opencv/archive/4.5.5.zip -OutFile c:\opencv\opencv-4.5.5.zip"
|
||||
echo Downloading: opencv-4.6.0.zip [91MB]
|
||||
powershell -command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -Uri https://github.com/opencv/opencv/archive/4.6.0.zip -OutFile c:\opencv\opencv-4.6.0.zip"
|
||||
echo Extracting...
|
||||
powershell -command "$ProgressPreference = 'SilentlyContinue'; Expand-Archive -Path c:\opencv\opencv-4.5.5.zip -DestinationPath c:\opencv"
|
||||
del c:\opencv\opencv-4.5.5.zip /q
|
||||
powershell -command "$ProgressPreference = 'SilentlyContinue'; Expand-Archive -Path c:\opencv\opencv-4.6.0.zip -DestinationPath c:\opencv"
|
||||
del c:\opencv\opencv-4.6.0.zip /q
|
||||
echo.
|
||||
|
||||
echo Downloading: opencv_contrib-4.5.5.zip [58MB]
|
||||
powershell -command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -Uri https://github.com/opencv/opencv_contrib/archive/4.5.5.zip -OutFile c:\opencv\opencv_contrib-4.5.5.zip"
|
||||
echo Downloading: opencv_contrib-4.6.0.zip [58MB]
|
||||
powershell -command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -Uri https://github.com/opencv/opencv_contrib/archive/4.6.0.zip -OutFile c:\opencv\opencv_contrib-4.6.0.zip"
|
||||
echo Extracting...
|
||||
powershell -command "$ProgressPreference = 'SilentlyContinue'; Expand-Archive -Path c:\opencv\opencv_contrib-4.5.5.zip -DestinationPath c:\opencv"
|
||||
del c:\opencv\opencv_contrib-4.5.5.zip /q
|
||||
powershell -command "$ProgressPreference = 'SilentlyContinue'; Expand-Archive -Path c:\opencv\opencv_contrib-4.6.0.zip -DestinationPath c:\opencv"
|
||||
del c:\opencv\opencv_contrib-4.6.0.zip /q
|
||||
echo.
|
||||
|
||||
echo Done with downloading and extracting sources.
|
||||
@ -38,9 +38,9 @@ if [%1]==[static] (
|
||||
) else (
|
||||
set enable_shared=ON
|
||||
)
|
||||
cmake C:\opencv\opencv-4.5.5 -G "MinGW Makefiles" -BC:\opencv\build -DENABLE_CXX11=ON -DOPENCV_EXTRA_MODULES_PATH=C:\opencv\opencv_contrib-4.5.5\modules -DBUILD_SHARED_LIBS=%enable_shared% -DWITH_IPP=OFF -DWITH_MSMF=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -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 -Wno-dev
|
||||
cmake C:\opencv\opencv-4.6.0 -G "MinGW Makefiles" -BC:\opencv\build -DENABLE_CXX11=ON -DOPENCV_EXTRA_MODULES_PATH=C:\opencv\opencv_contrib-4.6.0\modules -DBUILD_SHARED_LIBS=%enable_shared% -DWITH_IPP=OFF -DWITH_MSMF=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -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 -Wno-dev
|
||||
mingw32-make -j%NUMBER_OF_PROCESSORS%
|
||||
mingw32-make install
|
||||
rmdir c:\opencv\opencv-4.5.5 /s /q
|
||||
rmdir c:\opencv\opencv_contrib-4.5.5 /s /q
|
||||
rmdir c:\opencv\opencv-4.6.0 /s /q
|
||||
rmdir c:\opencv\opencv_contrib-4.6.0 /s /q
|
||||
chdir /D %GOPATH%\src\gocv.io\x\gocv
|
||||
|
Reference in New Issue
Block a user