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
|
||||
|
||||
52
vendor/gocv.io/x/gocv/CHANGELOG.md
generated
vendored
52
vendor/gocv.io/x/gocv/CHANGELOG.md
generated
vendored
@@ -1,3 +1,55 @@
|
||||
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**
|
||||
* update to OpenCV 4.5.5
|
||||
* **build**
|
||||
* add install_nonfree make task to build all opencv_contrib modules
|
||||
* correct download location for onnx test file
|
||||
* Update Makefile for missing version changes
|
||||
* **core**
|
||||
* correct how memory is being allocated for Eye(), Zeros(), and Ones() to address issue #930
|
||||
* **calib3d**
|
||||
* Adding support for estimateAffine2DWithParams (#924)
|
||||
* **imgproc**
|
||||
* Add DrawContoursWithParams function
|
||||
* **photo**
|
||||
* Add bindings for fastNlMeansDenoising and fastNlMeansDenoisingColored
|
||||
* add detailEnhance function
|
||||
* add EdgePreservingFilter function
|
||||
* add PencilSketch function
|
||||
* add stylization function
|
||||
* **docs**
|
||||
* add godoc comments for FastNlMeansDenoising functions
|
||||
* update README with info on latest mingw-w64 t use for Windows builds
|
||||
* dnn pose detect examples correct the order of the argument variable name
|
||||
* **examples**
|
||||
* Fixed memory leaks in the motion detection example
|
||||
* **openvino**
|
||||
* Update env.sh and README.md
|
||||
* **windows**
|
||||
* use mingw-w64 8.1.0 for protobuf compile
|
||||
* **contrib**
|
||||
* add cv::wechat_qrcode::WeChatQRCode (#949)
|
||||
* Update cgo_static.go
|
||||
|
||||
0.29.0
|
||||
---
|
||||
* **all**
|
||||
|
||||
2
vendor/gocv.io/x/gocv/CONTRIBUTING.md
generated
vendored
2
vendor/gocv.io/x/gocv/CONTRIBUTING.md
generated
vendored
@@ -81,7 +81,7 @@ go test ./openvino/...
|
||||
|
||||
## Contributing workflow
|
||||
|
||||
This section provides a short description of one of many possible workflows you can follow to contribute to `CoCV`. This workflow is based on multiple [git remotes](https://git-scm.com/docs/git-remote) and it's by no means the only workflow you can use to contribute to `GoCV`. However, it's an option that might help you get started quickly without too much hassle as this workflow lets you work off the `gocv` repo directory path!
|
||||
This section provides a short description of one of many possible workflows you can follow to contribute to `GoCV`. This workflow is based on multiple [git remotes](https://git-scm.com/docs/git-remote) and it's by no means the only workflow you can use to contribute to `GoCV`. However, it's an option that might help you get started quickly without too much hassle as this workflow lets you work off the `gocv` repo directory path!
|
||||
|
||||
Assuming you have already forked the `gocv` repo, you need to add a new `git remote` which will point to your GitHub fork. Notice below that you **must** `cd` to `gocv` repo directory before you add the new `git remote`:
|
||||
|
||||
|
||||
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.4
|
||||
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.4 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.4-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.4-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.4-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.4 .
|
||||
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.4"
|
||||
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.4-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.4"
|
||||
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.4-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.4"
|
||||
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
|
||||
|
||||
2
vendor/gocv.io/x/gocv/LICENSE.txt
generated
vendored
2
vendor/gocv.io/x/gocv/LICENSE.txt
generated
vendored
@@ -1,4 +1,4 @@
|
||||
Copyright (c) 2017-2021 The Hybrid Group
|
||||
Copyright (c) 2017-2022 The Hybrid Group and friends
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
13
vendor/gocv.io/x/gocv/Makefile
generated
vendored
13
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.26.0"
|
||||
GOCV_VERSION?="v0.31.0"
|
||||
|
||||
# OpenCV version to use.
|
||||
OPENCV_VERSION?=4.5.3
|
||||
OPENCV_VERSION?=4.6.0
|
||||
|
||||
# Go version to use when building Docker image
|
||||
GOVERSION?=1.16.2
|
||||
@@ -250,7 +250,10 @@ 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
|
||||
|
||||
# Do everything with openvino and cuda.
|
||||
install_all: deps download download_openvino sudo_pre_install_clean build_openvino_package sudo_install_openvino build_all sudo_install clean verify_openvino verify_cuda
|
||||
@@ -273,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
|
||||
|
||||
68
vendor/gocv.io/x/gocv/README.md
generated
vendored
68
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.4) 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.4.
|
||||
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.4 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.4 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.29.0
|
||||
opencv lib version: 4.5.4
|
||||
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.4 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.29.0
|
||||
opencv lib version: 4.5.4-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.4 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.29.0
|
||||
opencv lib version: 4.5.4
|
||||
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.4 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.4 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.29.0
|
||||
opencv lib version: 4.5.4
|
||||
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.4 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.4:
|
||||
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.29.0
|
||||
opencv lib version: 4.5.4
|
||||
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.4/include"
|
||||
export CGO_LDFLAGS="-L/usr/local/Cellar/opencv/4.5.4/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,25 +400,25 @@ 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.4 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
|
||||
|
||||
Download and run the MinGW-W64 compiler installer from [https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/7.3.0/](https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/7.3.0/).
|
||||
Download and run the MinGW-W64 compiler installer from [https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/8.1.0/](https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/8.1.0/).
|
||||
|
||||
The latest version of the MinGW-W64 toolchain is `7.3.0`, but any version from `7.X` on should work.
|
||||
The latest version of the MinGW-W64 toolchain is `8.1.0`, but any version from `8.X` on should work.
|
||||
|
||||
Choose the options for "posix" threads, and for "seh" exceptions handling, then install to the default location `c:\Program Files\mingw-w64\x86_64-7.3.0-posix-seh-rt_v5-rev2`.
|
||||
Choose the options for "posix" threads, and for "seh" exceptions handling, then install to the default location `c:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0`.
|
||||
|
||||
Add the `C:\Program Files\mingw-w64\x86_64-7.3.0-posix-seh-rt_v5-rev2\mingw64\bin` path to your System Path.
|
||||
Add the `C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin` path to your System Path.
|
||||
|
||||
#### CMake
|
||||
|
||||
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.4 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.4 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.29.0
|
||||
opencv lib version: 4.5.4
|
||||
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_core454 -lopencv_face454 -lopencv_videoio454 -lopencv_imgproc454 -lopencv_highgui454 -lopencv_imgcodecs454 -lopencv_objdetect454 -lopencv_features2d454 -lopencv_video454 -lopencv_dnn454 -lopencv_xfeatures2d454 -lopencv_plot454 -lopencv_tracking454 -lopencv_img_hash454
|
||||
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:
|
||||
|
||||
|
||||
20
vendor/gocv.io/x/gocv/ROADMAP.md
generated
vendored
20
vendor/gocv.io/x/gocv/ROADMAP.md
generated
vendored
@@ -188,9 +188,9 @@ Your pull requests will be greatly appreciated!
|
||||
- [ ] **photo. Computational Photography - WORK STARTED** The following functions still need implementation:
|
||||
- [ ] [inpaint](https://docs.opencv.org/master/d7/d8b/group__photo__inpaint.html#gaedd30dfa0214fec4c88138b51d678085)
|
||||
- [ ] [denoise_TVL1](https://docs.opencv.org/master/d1/d79/group__photo__denoise.html#ga7602ed5ae17b7de40152b922227c4e4f)
|
||||
- [ ] [fastNlMeansDenoising](https://docs.opencv.org/master/d1/d79/group__photo__denoise.html#ga4c6b0031f56ea3f98f768881279ffe93)
|
||||
- [ ] [fastNlMeansDenoisingColored](https://docs.opencv.org/master/d1/d79/group__photo__denoise.html#ga03aa4189fc3e31dafd638d90de335617)
|
||||
- [ ] [fastNlMeansDenoisingMulti](https://docs.opencv.org/master/d1/d79/group__photo__denoise.html#gaf4421bf068c4d632ea7f0aa38e0bf172)
|
||||
- [X] [fastNlMeansDenoising](https://docs.opencv.org/master/d1/d79/group__photo__denoise.html#ga4c6b0031f56ea3f98f768881279ffe93)
|
||||
- [X] [fastNlMeansDenoisingColored](https://docs.opencv.org/master/d1/d79/group__photo__denoise.html#ga03aa4189fc3e31dafd638d90de335617)
|
||||
- [X] [fastNlMeansDenoisingMulti](https://docs.opencv.org/master/d1/d79/group__photo__denoise.html#gaf4421bf068c4d632ea7f0aa38e0bf172)
|
||||
- [ ] [createCalibrateDebevec](https://docs.opencv.org/master/d6/df5/group__photo__hdr.html#ga7fed9707ad5f2cc0e633888867109f90)
|
||||
- [ ] [createCalibrateRobertson](https://docs.opencv.org/master/d6/df5/group__photo__hdr.html#gae77813a21cd351a596619e5ff013be5d)
|
||||
- [ ] [createMergeDebevec](https://docs.opencv.org/master/d6/df5/group__photo__hdr.html#gaa8eab36bc764abb2a225db7c945f87f9)
|
||||
@@ -200,10 +200,10 @@ Your pull requests will be greatly appreciated!
|
||||
- [ ] [createTonemapMantiuk](https://docs.opencv.org/master/d6/df5/group__photo__hdr.html#ga3b3f3bf083b7515802f039a6a70f2d21)
|
||||
- [ ] [createTonemapReinhard](https://docs.opencv.org/master/d6/df5/group__photo__hdr.html#gadabe7f6bf1fa96ad0fd644df9182c2fb)
|
||||
- [ ] [decolor](https://docs.opencv.org/master/d4/d32/group__photo__decolor.html#ga4864d4c007bda5dacdc5e9d4ed7e222c)
|
||||
- [ ] [detailEnhance](https://docs.opencv.org/master/df/dac/group__photo__render.html#ga0de660cb6f371a464a74c7b651415975)
|
||||
- [ ] [edgePreservingFilter](https://docs.opencv.org/master/df/dac/group__photo__render.html#gafaee2977597029bc8e35da6e67bd31f7)
|
||||
- [ ] [pencilSketch](https://docs.opencv.org/master/df/dac/group__photo__render.html#gae5930dd822c713b36f8529b21ddebd0c)
|
||||
- [ ] [stylization](https://docs.opencv.org/master/df/dac/group__photo__render.html#gacb0f7324017df153d7b5d095aed53206)
|
||||
- [X] [detailEnhance](https://docs.opencv.org/master/df/dac/group__photo__render.html#ga0de660cb6f371a464a74c7b651415975)
|
||||
- [X] [edgePreservingFilter](https://docs.opencv.org/master/df/dac/group__photo__render.html#gafaee2977597029bc8e35da6e67bd31f7)
|
||||
- [X] [pencilSketch](https://docs.opencv.org/master/df/dac/group__photo__render.html#gae5930dd822c713b36f8529b21ddebd0c)
|
||||
- [X] [stylization](https://docs.opencv.org/master/df/dac/group__photo__render.html#gacb0f7324017df153d7b5d095aed53206)
|
||||
|
||||
- [ ] stitching. Images stitching
|
||||
|
||||
@@ -393,8 +393,8 @@ Your pull requests will be greatly appreciated!
|
||||
- [ ] **tracking. Tracking API - WORK STARTED**
|
||||
- [ ] videostab. Video Stabilization
|
||||
- [ ] viz. 3D Visualizer
|
||||
- [ ] wechat_qrcode. WeChat QR code detector for detecting and parsing QR code.
|
||||
- [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**
|
||||
|
||||
26
vendor/gocv.io/x/gocv/appveyor_build_opencv.cmd
generated
vendored
26
vendor/gocv.io/x/gocv/appveyor_build_opencv.cmd
generated
vendored
@@ -3,23 +3,27 @@ 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.4.zip -FileName c:\opencv\opencv-4.5.4.zip
|
||||
7z x c:\opencv\opencv-4.5.4.zip -oc:\opencv -y
|
||||
del c:\opencv\opencv-4.5.4.zip /q
|
||||
appveyor DownloadFile https://github.com/opencv/opencv_contrib/archive/4.5.4.zip -FileName c:\opencv\opencv_contrib-4.5.4.zip
|
||||
7z x c:\opencv\opencv_contrib-4.5.4.zip -oc:\opencv -y
|
||||
del c:\opencv\opencv_contrib-4.5.4.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-7.3.0-posix-seh-rt_v5-rev0\mingw64\bin
|
||||
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.4 -G "MinGW Makefiles" -BC:\opencv\build -DENABLE_CXX11=ON -DOPENCV_EXTRA_MODULES_PATH=C:\opencv\opencv_contrib-4.5.4\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=OFF -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
|
||||
appveyor DownloadFile https://raw.githubusercontent.com/WeChatCV/opencv_3rdparty/wechat_qrcode/detect.caffemodel -FileName C:\opencv\testdata\detect.caffemodel
|
||||
appveyor DownloadFile https://raw.githubusercontent.com/WeChatCV/opencv_3rdparty/wechat_qrcode/detect.prototxt -FileName C:\opencv\testdata\detect.prototxt
|
||||
appveyor DownloadFile https://raw.githubusercontent.com/WeChatCV/opencv_3rdparty/wechat_qrcode/sr.caffemodel -FileName C:\opencv\testdata\sr.caffemodel
|
||||
appveyor DownloadFile https://raw.githubusercontent.com/WeChatCV/opencv_3rdparty/wechat_qrcode/sr.prototxt -FileName C:\opencv\testdata\sr.prototxt
|
||||
appveyor DownloadFile http://dl.caffe.berkeleyvision.org/bvlc_googlenet.caffemodel -FileName C:\opencv\testdata\bvlc_googlenet.caffemodel
|
||||
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/master/vision/classification/inception_and_googlenet/googlenet/model/googlenet-9.onnx -FileName C:\opencv\testdata\googlenet-9.onnx
|
||||
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.4 /s /q
|
||||
rmdir c:\opencv\opencv_contrib-4.5.4 /s /q
|
||||
rmdir c:\opencv\opencv-4.6.0 /s /q
|
||||
rmdir c:\opencv\opencv_contrib-4.6.0 /s /q
|
||||
|
||||
4
vendor/gocv.io/x/gocv/calib3d.cpp
generated
vendored
4
vendor/gocv.io/x/gocv/calib3d.cpp
generated
vendored
@@ -76,3 +76,7 @@ Mat EstimateAffinePartial2D(Point2fVector from, Point2fVector to) {
|
||||
Mat EstimateAffine2D(Point2fVector from, Point2fVector to) {
|
||||
return new cv::Mat(cv::estimateAffine2D(*from, *to));
|
||||
}
|
||||
|
||||
Mat EstimateAffine2DWithParams(Point2fVector from, Point2fVector to, Mat inliers, int method, double ransacReprojThreshold, size_t maxIters, double confidence, size_t refineIters) {
|
||||
return new cv::Mat(cv::estimateAffine2D(*from, *to, *inliers, method, ransacReprojThreshold, maxIters, confidence, refineIters));
|
||||
}
|
||||
|
||||
9
vendor/gocv.io/x/gocv/calib3d.go
generated
vendored
9
vendor/gocv.io/x/gocv/calib3d.go
generated
vendored
@@ -245,3 +245,12 @@ func EstimateAffinePartial2D(from, to Point2fVector) Mat {
|
||||
func EstimateAffine2D(from, to Point2fVector) Mat {
|
||||
return newMat(C.EstimateAffine2D(from.p, to.p))
|
||||
}
|
||||
|
||||
// EstimateAffine2DWithParams Computes an optimal affine transformation between two 2D point sets
|
||||
// with additional optional parameters.
|
||||
//
|
||||
// For further details, please see:
|
||||
// https://docs.opencv.org/4.0.0/d9/d0c/group__calib3d.html#ga27865b1d26bac9ce91efaee83e94d4dd
|
||||
func EstimateAffine2DWithParams(from Point2fVector, to Point2fVector, inliers Mat, method int, ransacReprojThreshold float64, maxIters uint, confidence float64, refineIters uint) Mat {
|
||||
return newMat(C.EstimateAffine2DWithParams(from.p, to.p, inliers.p, C.int(method), C.double(ransacReprojThreshold), C.size_t(maxIters), C.double(confidence), C.size_t(refineIters)))
|
||||
}
|
||||
|
||||
3
vendor/gocv.io/x/gocv/calib3d.h
generated
vendored
3
vendor/gocv.io/x/gocv/calib3d.h
generated
vendored
@@ -28,8 +28,9 @@ bool FindChessboardCornersSBWithMeta(Mat image, Size patternSize, Mat corners, i
|
||||
void DrawChessboardCorners(Mat image, Size patternSize, Mat corners, bool patternWasFound);
|
||||
Mat EstimateAffinePartial2D(Point2fVector from, Point2fVector to);
|
||||
Mat EstimateAffine2D(Point2fVector from, Point2fVector to);
|
||||
Mat EstimateAffine2DWithParams(Point2fVector from, Point2fVector to, Mat inliers, int method, double ransacReprojThreshold, size_t maxIters, double confidence, size_t refineIters);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif //_OPENCV3_CALIB_H
|
||||
#endif //_OPENCV3_CALIB_H
|
||||
|
||||
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_core454 -lopencv_face454 -lopencv_videoio454 -lopencv_imgproc454 -lopencv_highgui454 -lopencv_imgcodecs454 -lopencv_objdetect454 -lopencv_features2d454 -lopencv_video454 -lopencv_dnn454 -lopencv_xfeatures2d454 -lopencv_plot454 -lopencv_tracking454 -lopencv_img_hash454 -lopencv_calib3d454 -lopencv_bgsegm454 -lopencv_photo454 -lopencv_aruco454
|
||||
#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"
|
||||
|
||||
5
vendor/gocv.io/x/gocv/cgo_static.go
generated
vendored
5
vendor/gocv.io/x/gocv/cgo_static.go
generated
vendored
@@ -1,3 +1,4 @@
|
||||
//go:build !customenv && static
|
||||
// +build !customenv,static
|
||||
|
||||
package gocv
|
||||
@@ -7,8 +8,8 @@ package gocv
|
||||
/*
|
||||
#cgo CXXFLAGS: --std=c++11
|
||||
#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_photo -lopencv_imgproc -lopencv_core -littnotify -llibprotobuf -lIlmImf -lquirc -lippiw -lippicv -lade -lz -ljpeg -ldl -lm -lpthread -lrt -lquadmath
|
||||
#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_stereo452 -lopencv_tracking452 -lopencv_superres452 -lopencv_stitching452 -lopencv_optflow452 -lopencv_gapi452 -lopencv_face452 -lopencv_dpm452 -lopencv_dnn_objdetect452 -lopencv_ccalib452 -lopencv_bioinspired452 -lopencv_bgsegm452 -lopencv_aruco452 -lopencv_xobjdetect452 -lopencv_ximgproc452 -lopencv_xfeatures2d452 -lopencv_videostab452 -lopencv_video452 -lopencv_structured_light452 -lopencv_shape452 -lopencv_rgbd452 -lopencv_rapid452 -lopencv_objdetect452 -lopencv_mcc452 -lopencv_highgui452 -lopencv_datasets452 -lopencv_calib3d452 -lopencv_videoio452 -lopencv_text452 -lopencv_line_descriptor452 -lopencv_imgcodecs452 -lopencv_img_hash452 -lopencv_hfs452 -lopencv_fuzzy452 -lopencv_features2d452 -lopencv_dnn_superres452 -lopencv_dnn452 -lopencv_xphoto452 -lopencv_surface_matching452 -lopencv_reg452 -lopencv_quality452 -lopencv_plot452 -lopencv_photo452 -lopencv_phase_unwrapping452 -lopencv_ml452 -lopencv_intensity_transform452 -lopencv_imgproc452 -lopencv_flann452 -lopencv_core452 -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"
|
||||
|
||||
19
vendor/gocv.io/x/gocv/core.cpp
generated
vendored
19
vendor/gocv.io/x/gocv/core.cpp
generated
vendored
@@ -59,18 +59,21 @@ Mat Mat_NewWithSizesFromBytes(IntVector sizes, int type, struct ByteArray buf) {
|
||||
}
|
||||
|
||||
Mat Eye(int rows, int cols, int type) {
|
||||
cv::Mat temp = cv::Mat::eye(rows, cols, type);
|
||||
return new cv::Mat(rows, cols, type, temp.data);
|
||||
cv::Mat* mat = new cv::Mat(rows, cols, type);
|
||||
*mat = cv::Mat::eye(rows, cols, type);
|
||||
return mat;
|
||||
}
|
||||
|
||||
Mat Zeros(int rows, int cols, int type) {
|
||||
cv::Mat temp = cv::Mat::zeros(rows, cols, type);
|
||||
return new cv::Mat(rows, cols, type, temp.data);
|
||||
cv::Mat* mat = new cv::Mat(rows, cols, type);
|
||||
*mat = cv::Mat::zeros(rows, cols, type);
|
||||
return mat;
|
||||
}
|
||||
|
||||
Mat Ones(int rows, int cols, int type) {
|
||||
cv::Mat temp = cv::Mat::ones(rows, cols, type);
|
||||
return new cv::Mat(rows, cols, type, temp.data);
|
||||
cv::Mat* mat = new cv::Mat(rows, cols, type);
|
||||
*mat = cv::Mat::ones(rows, cols, type);
|
||||
return mat;
|
||||
}
|
||||
|
||||
Mat Mat_FromPtr(Mat m, int rows, int cols, int type, int prow, int pcol) {
|
||||
@@ -207,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);
|
||||
|
||||
20
vendor/gocv.io/x/gocv/imgproc.cpp
generated
vendored
20
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);
|
||||
}
|
||||
@@ -550,6 +557,19 @@ void DrawContours(Mat src, PointsVector contours, int contourIdx, Scalar color,
|
||||
cv::drawContours(*src, *contours, contourIdx, c, thickness);
|
||||
}
|
||||
|
||||
void DrawContoursWithParams(Mat src, PointsVector contours, int contourIdx, Scalar color, int thickness, int lineType, Mat hierarchy, int maxLevel, Point offset) {
|
||||
cv::Scalar c = cv::Scalar(color.val1, color.val2, color.val3, color.val4);
|
||||
cv::Point offsetPt(offset.x, offset.y);
|
||||
|
||||
std::vector<cv::Vec4i> vecHierarchy;
|
||||
if (hierarchy->empty() == 0) {
|
||||
for (int j = 0; j < hierarchy->cols; ++j) {
|
||||
vecHierarchy.push_back(hierarchy->at<cv::Vec4i>(0, j));
|
||||
}
|
||||
}
|
||||
cv::drawContours(*src, *contours, contourIdx, c, thickness, lineType, vecHierarchy, maxLevel, offsetPt);
|
||||
}
|
||||
|
||||
void Sobel(Mat src, Mat dst, int ddepth, int dx, int dy, int ksize, double scale, double delta, int borderType) {
|
||||
cv::Sobel(*src, *dst, ddepth, dx, dy, ksize, scale, delta, borderType);
|
||||
}
|
||||
|
||||
45
vendor/gocv.io/x/gocv/imgproc.go
generated
vendored
45
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:
|
||||
@@ -1780,6 +1805,26 @@ func DrawContours(img *Mat, contours PointsVector, contourIdx int, c color.RGBA,
|
||||
C.DrawContours(img.p, contours.p, C.int(contourIdx), sColor, C.int(thickness))
|
||||
}
|
||||
|
||||
// DrawContoursWithParams draws contours outlines or filled contours.
|
||||
//
|
||||
// For further details, please see:
|
||||
// https://docs.opencv.org/master/d6/d6e/group__imgproc__draw.html#ga746c0625f1781f1ffc9056259103edbc
|
||||
//
|
||||
func DrawContoursWithParams(img *Mat, contours PointsVector, contourIdx int, c color.RGBA, thickness int, lineType LineType, hierarchy Mat, maxLevel int, offset image.Point) {
|
||||
sColor := C.struct_Scalar{
|
||||
val1: C.double(c.B),
|
||||
val2: C.double(c.G),
|
||||
val3: C.double(c.R),
|
||||
val4: C.double(c.A),
|
||||
}
|
||||
offsetP := C.struct_Point{
|
||||
x: C.int(offset.X),
|
||||
y: C.int(offset.Y),
|
||||
}
|
||||
|
||||
C.DrawContoursWithParams(img.p, contours.p, C.int(contourIdx), sColor, C.int(thickness), C.int(lineType), hierarchy.p, C.int(maxLevel), offsetP)
|
||||
}
|
||||
|
||||
// Remap applies a generic geometrical transformation to an image.
|
||||
//
|
||||
// For further details, please see:
|
||||
|
||||
3
vendor/gocv.io/x/gocv/imgproc.h
generated
vendored
3
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);
|
||||
@@ -113,6 +115,7 @@ Mat GetAffineTransform(PointVector src, PointVector dst);
|
||||
Mat GetAffineTransform2f(Point2fVector src, Point2fVector dst);
|
||||
Mat FindHomography(Mat src, Mat dst, int method, double ransacReprojThreshold, Mat mask, const int maxIters, const double confidence) ;
|
||||
void DrawContours(Mat src, PointsVector contours, int contourIdx, Scalar color, int thickness);
|
||||
void DrawContoursWithParams(Mat src, PointsVector contours, int contourIdx, Scalar color, int thickness, int lineType, Mat hierarchy, int maxLevel, Point offset);
|
||||
void Sobel(Mat src, Mat dst, int ddepth, int dx, int dy, int ksize, double scale, double delta, int borderType);
|
||||
void SpatialGradient(Mat src, Mat dx, Mat dy, int ksize, int borderType);
|
||||
void Remap(Mat src, Mat dst, Mat map1, Mat map2, int interpolation, int borderMode, Scalar borderValue);
|
||||
|
||||
32
vendor/gocv.io/x/gocv/photo.cpp
generated
vendored
32
vendor/gocv.io/x/gocv/photo.cpp
generated
vendored
@@ -84,3 +84,35 @@ void AlignMTB_Process(AlignMTB b, struct Mats src, struct Mats *dst) {
|
||||
}
|
||||
dst->length = (int)dstMats.size();
|
||||
}
|
||||
|
||||
void FastNlMeansDenoising(Mat src, Mat dst) {
|
||||
cv::fastNlMeansDenoising(*src, *dst);
|
||||
}
|
||||
|
||||
void FastNlMeansDenoisingWithParams(Mat src, Mat dst, float h, int templateWindowSize, int searchWindowSize) {
|
||||
cv::fastNlMeansDenoising(*src, *dst, h, templateWindowSize, searchWindowSize);
|
||||
}
|
||||
|
||||
void FastNlMeansDenoisingColored(Mat src, Mat dst) {
|
||||
cv::fastNlMeansDenoisingColored(*src, *dst);
|
||||
}
|
||||
|
||||
void FastNlMeansDenoisingColoredWithParams(Mat src, Mat dst, float h, float hColor, int templateWindowSize, int searchWindowSize) {
|
||||
cv::fastNlMeansDenoisingColored(*src, *dst, h, hColor, templateWindowSize, searchWindowSize);
|
||||
}
|
||||
|
||||
void EdgePreservingFilter(Mat src, Mat dst, int filter, float sigma_s, float sigma_r) {
|
||||
cv::edgePreservingFilter(*src, *dst, filter, sigma_s, sigma_r);
|
||||
}
|
||||
|
||||
void DetailEnhance(Mat src, Mat dst, float sigma_s, float sigma_r) {
|
||||
cv::detailEnhance(*src, *dst, sigma_s, sigma_r);
|
||||
}
|
||||
|
||||
void PencilSketch(Mat src, Mat dst1, Mat dst2, float sigma_s, float sigma_r, float shade_factor) {
|
||||
cv::pencilSketch(*src, *dst1, *dst2, sigma_s, sigma_r, shade_factor);
|
||||
}
|
||||
|
||||
void Stylization(Mat src, Mat dst, float sigma_s, float sigma_r) {
|
||||
cv::stylization(*src, *dst, sigma_s, sigma_r);
|
||||
}
|
||||
|
||||
89
vendor/gocv.io/x/gocv/photo.go
generated
vendored
89
vendor/gocv.io/x/gocv/photo.go
generated
vendored
@@ -5,6 +5,7 @@ package gocv
|
||||
#include "photo.h"
|
||||
*/
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"image"
|
||||
"unsafe"
|
||||
@@ -225,3 +226,91 @@ func (b *AlignMTB) Process(src []Mat, dst *[]Mat) {
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// FastNlMeansDenoising performs image denoising using Non-local Means Denoising algorithm
|
||||
// http://www.ipol.im/pub/algo/bcm_non_local_means_denoising/
|
||||
//
|
||||
// For further details, please see:
|
||||
// https://docs.opencv.org/4.x/d1/d79/group__photo__denoise.html#ga4c6b0031f56ea3f98f768881279ffe93
|
||||
//
|
||||
func FastNlMeansDenoising(src Mat, dst *Mat) {
|
||||
C.FastNlMeansDenoising(src.p, dst.p)
|
||||
}
|
||||
|
||||
// FastNlMeansDenoisingWithParams performs image denoising using Non-local Means Denoising algorithm
|
||||
// http://www.ipol.im/pub/algo/bcm_non_local_means_denoising/
|
||||
//
|
||||
// For further details, please see:
|
||||
// https://docs.opencv.org/4.x/d1/d79/group__photo__denoise.html#ga4c6b0031f56ea3f98f768881279ffe93
|
||||
//
|
||||
func FastNlMeansDenoisingWithParams(src Mat, dst *Mat, h float32, templateWindowSize int, searchWindowSize int) {
|
||||
C.FastNlMeansDenoisingWithParams(src.p, dst.p, C.float(h), C.int(templateWindowSize), C.int(searchWindowSize))
|
||||
}
|
||||
|
||||
// FastNlMeansDenoisingColored is a modification of fastNlMeansDenoising function for colored images.
|
||||
//
|
||||
// For further details, please see:
|
||||
// https://docs.opencv.org/4.x/d1/d79/group__photo__denoise.html#ga21abc1c8b0e15f78cd3eff672cb6c476
|
||||
//
|
||||
func FastNlMeansDenoisingColored(src Mat, dst *Mat) {
|
||||
C.FastNlMeansDenoisingColored(src.p, dst.p)
|
||||
}
|
||||
|
||||
// FastNlMeansDenoisingColoredWithParams is a modification of fastNlMeansDenoising function for colored images.
|
||||
//
|
||||
// For further details, please see:
|
||||
// https://docs.opencv.org/4.x/d1/d79/group__photo__denoise.html#ga21abc1c8b0e15f78cd3eff672cb6c476
|
||||
//
|
||||
func FastNlMeansDenoisingColoredWithParams(src Mat, dst *Mat, h float32, hColor float32, templateWindowSize int, searchWindowSize int) {
|
||||
C.FastNlMeansDenoisingColoredWithParams(src.p, dst.p, C.float(h), C.float(hColor), C.int(templateWindowSize), C.int(searchWindowSize))
|
||||
}
|
||||
|
||||
// DetailEnhance filter enhances the details of a particular image
|
||||
//
|
||||
// For further details, please see:
|
||||
// https://docs.opencv.org/4.x/df/dac/group__photo__render.html#gae5930dd822c713b36f8529b21ddebd0c
|
||||
//
|
||||
func DetailEnhance(src Mat, dst *Mat, sigma_s, sigma_r float32) {
|
||||
C.DetailEnhance(src.p, dst.p, C.float(sigma_s), C.float(sigma_r))
|
||||
}
|
||||
|
||||
type EdgeFilter int
|
||||
|
||||
const (
|
||||
// RecursFilter Recursive Filtering.
|
||||
RecursFilter EdgeFilter = 1
|
||||
|
||||
// NormconvFilter Normalized Convolution Filtering.
|
||||
NormconvFilter = 2
|
||||
)
|
||||
|
||||
// EdgePreservingFilter filtering is the fundamental operation in image and video processing.
|
||||
// Edge-preserving smoothing filters are used in many different applications.
|
||||
//
|
||||
// For further details, please see:
|
||||
// https://docs.opencv.org/4.x/df/dac/group__photo__render.html#gafaee2977597029bc8e35da6e67bd31f7
|
||||
//
|
||||
func EdgePreservingFilter(src Mat, dst *Mat, filter EdgeFilter, sigma_s, sigma_r float32) {
|
||||
C.EdgePreservingFilter(src.p, dst.p, C.int(filter), C.float(sigma_s), C.float(sigma_r))
|
||||
}
|
||||
|
||||
// PencilSketch pencil-like non-photorealistic line drawing.
|
||||
//
|
||||
// For further details, please see:
|
||||
// https://docs.opencv.org/4.x/df/dac/group__photo__render.html#gae5930dd822c713b36f8529b21ddebd0c
|
||||
//
|
||||
func PencilSketch(src Mat, dst1, dst2 *Mat, sigma_s, sigma_r, shade_factor float32) {
|
||||
C.PencilSketch(src.p, dst1.p, dst2.p, C.float(sigma_s), C.float(sigma_r), C.float(shade_factor))
|
||||
}
|
||||
|
||||
// Stylization aims to produce digital imagery with a wide variety of effects
|
||||
// not focused on photorealism. Edge-aware filters are ideal for stylization,
|
||||
// as they can abstract regions of low contrast while preserving, or enhancing,
|
||||
// high-contrast features.
|
||||
//
|
||||
// For further details, please see:
|
||||
// https://docs.opencv.org/4.x/df/dac/group__photo__render.html#gacb0f7324017df153d7b5d095aed53206
|
||||
//
|
||||
func Stylization(src Mat, dst *Mat, sigma_s, sigma_r float32) {
|
||||
C.Stylization(src.p, dst.p, C.float(sigma_s), C.float(sigma_r))
|
||||
}
|
||||
|
||||
11
vendor/gocv.io/x/gocv/photo.h
generated
vendored
11
vendor/gocv.io/x/gocv/photo.h
generated
vendored
@@ -4,7 +4,6 @@
|
||||
#ifdef __cplusplus
|
||||
#include <opencv2/opencv.hpp>
|
||||
#include <opencv2/photo.hpp>
|
||||
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -29,8 +28,11 @@ void IlluminationChange(Mat src, Mat mask, Mat dst, float alpha, float beta);
|
||||
void TextureFlattening(Mat src, Mat mask, Mat dst, float low_threshold, float high_threshold, int kernel_size);
|
||||
|
||||
void FastNlMeansDenoisingColoredMulti(struct Mats src, Mat dst, int imgToDenoiseIndex, int temporalWindowSize);
|
||||
|
||||
void FastNlMeansDenoisingColoredMultiWithParams(struct Mats src, Mat dst, int imgToDenoiseIndex, int temporalWindowSize, float h, float hColor, int templateWindowSize, int searchWindowSize );
|
||||
void FastNlMeansDenoising(Mat src, Mat dst);
|
||||
void FastNlMeansDenoisingWithParams(Mat src, Mat dst, float h, int templateWindowSize, int searchWindowSize);
|
||||
void FastNlMeansDenoisingColored(Mat src, Mat dst);
|
||||
void FastNlMeansDenoisingColoredWithParams(Mat src, Mat dst, float h, float hColor, int templateWindowSize, int searchWindowSize);
|
||||
|
||||
MergeMertens MergeMertens_Create();
|
||||
MergeMertens MergeMertens_CreateWithParams(float contrast_weight, float saturation_weight, float exposure_weight);
|
||||
@@ -42,6 +44,11 @@ AlignMTB AlignMTB_CreateWithParams(int max_bits, int exclude_range, bool cut);
|
||||
void AlignMTB_Process(AlignMTB b, struct Mats src, struct Mats *dst);
|
||||
void AlignMTB_Close(AlignMTB b);
|
||||
|
||||
void DetailEnhance(Mat src, Mat dst, float sigma_s, float sigma_r);
|
||||
void EdgePreservingFilter(Mat src, Mat dst, int filter, float sigma_s, float sigma_r);
|
||||
void PencilSketch(Mat src, Mat dst1, Mat dst2, float sigma_s, float sigma_r, float shade_factor);
|
||||
void Stylization(Mat src, Mat dst, float sigma_s, float sigma_r);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
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.29.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);
|
||||
|
||||
|
||||
24
vendor/gocv.io/x/gocv/win_build_opencv.cmd
generated
vendored
24
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.4.zip [91MB]
|
||||
powershell -command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -Uri https://github.com/opencv/opencv/archive/4.5.4.zip -OutFile c:\opencv\opencv-4.5.4.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.4.zip -DestinationPath c:\opencv"
|
||||
del c:\opencv\opencv-4.5.4.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.4.zip [58MB]
|
||||
powershell -command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -Uri https://github.com/opencv/opencv_contrib/archive/4.5.4.zip -OutFile c:\opencv\opencv_contrib-4.5.4.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.4.zip -DestinationPath c:\opencv"
|
||||
del c:\opencv\opencv_contrib-4.5.4.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.
|
||||
@@ -31,16 +31,16 @@ echo.
|
||||
echo on
|
||||
|
||||
cd /D C:\opencv\build
|
||||
set PATH=%PATH%;C:\Program Files (x86)\CMake\bin;C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin
|
||||
set PATH=%PATH%;C:\Program Files (x86)\CMake\bin;C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin
|
||||
if [%1]==[static] (
|
||||
echo Build static opencv
|
||||
set enable_shared=OFF
|
||||
) else (
|
||||
set enable_shared=ON
|
||||
)
|
||||
cmake C:\opencv\opencv-4.5.4 -G "MinGW Makefiles" -BC:\opencv\build -DENABLE_CXX11=ON -DOPENCV_EXTRA_MODULES_PATH=C:\opencv\opencv_contrib-4.5.4\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=OFF -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.4 /s /q
|
||||
rmdir c:\opencv\opencv_contrib-4.5.4 /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