Skip to content

Files

Latest commit

6cf0b38 · Oct 15, 2020

History

History
This branch is 381 commits behind hybridgroup/gocv:release.

contrib

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Dec 4, 2017
Mar 13, 2019
Dec 23, 2019
Dec 23, 2019
Dec 23, 2019
Dec 23, 2019
Oct 15, 2020
Nov 30, 2017
Mar 15, 2018
Mar 23, 2018
Dec 5, 2017
Dec 5, 2017
Apr 12, 2018
Apr 12, 2018
Apr 12, 2018
Dec 8, 2019
Apr 12, 2018
Mar 15, 2018
Mar 23, 2018
Mar 15, 2018
Aug 14, 2019
Jul 20, 2020
Jul 20, 2020
Jul 20, 2020
Jul 20, 2020

Using OpenCV Contrib

The OpenCV Contrib library contains experimental or non-free (aka patented) algorithms.

GoCV support for OpenCV Contrib can be found here in the "gocv.io/x/gocv/contrib" package.

For more information about OpenCV Contrib, please go to:

https://github.com/opencv/opencv_contrib

How to use

If you have followed the installation instructions from the main README, then the OpenCV contrib modules have already been compiled and installed.

First, you must include the contrib subpackage:

import (
    "gocv.io/x/gocv"
    "gocv.io/x/gocv/contrib"
)

Then you will be able to use the functions within the contrib subpackage. For example, this uses the SIFT feature identitification algorithm that is within the xfeatures2d module of OpenCV:

si := contrib.NewSIFT()
kp := si.Detect(img)

Note that some of the features in this package require building OpenCV with the OPENCV_ENABLE_NONFREE=ON option. You can run make build_nonfree to build with this option.