contrib

package
v0.0.0-...-236abc3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

README

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.

Documentation

Overview

Package contrib is the GoCV wrapper around OpenCV Contrib.

For further details, please see: https://github.com/opencv/opencv_contrib

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnisotropicDiffusion

func AnisotropicDiffusion(src gocv.Mat, dst *gocv.Mat, alpha float32, k float32, niters int)

AnisotropicDiffusion performs anisotropic diffusion on an image.

The function applies Perona-Malik anisotropic diffusion to an image.

For further details, please see: https://docs.opencv.org/4.x/df/d2d/group__ximgproc.html#gaffedd976e0a8efb5938107acab185ec2

func ApplyChannelGains

func ApplyChannelGains(src gocv.Mat, dst *gocv.Mat, gainB float32, gainG float32, gainR float32)

func Bm3dDenoising

func Bm3dDenoising(src gocv.Mat, dst *gocv.Mat)

src = Input 8-bit or 16-bit 1-channel image.

func Bm3dDenoisingStep

func Bm3dDenoisingStep(src gocv.Mat, dststep1 *gocv.Mat, dststep2 *gocv.Mat)

src = Input 8-bit or 16-bit 1-channel image.

func Bm3dDenoisingStepWithParams

func Bm3dDenoisingStepWithParams(src gocv.Mat, dststep1 *gocv.Mat, dststep2 *gocv.Mat,
	h float32, templateWindowSize int,
	searchWindowSize int, blockMatchingStep1 int,
	blockMatchingStep2 int, groupSize int,
	slidingStep int, beta float32,
	normType gocv.NormType, step Bm3dSteps,
	transformType TransformTypes)

src = Input 8-bit or 16-bit 1-channel image.

func Bm3dDenoisingWithParams

func Bm3dDenoisingWithParams(src gocv.Mat, dst *gocv.Mat,
	h float32, templateWindowSize int,
	searchWindowSize int, blockMatchingStep1 int,
	blockMatchingStep2 int, groupSize int,
	slidingStep int, beta float32,
	normType gocv.NormType, step Bm3dSteps,
	transformType TransformTypes)

src = Input 8-bit or 16-bit 1-channel image.

func EdgePreservingFilter

func EdgePreservingFilter(src gocv.Mat, dst *gocv.Mat, d int, threshold float32)

EdgePreservingFilter smoothes an image using the Edge-Preserving filter.

For further details, please see: https://docs.opencv.org/4.x/df/d2d/group__ximgproc.html#ga86fcda65ced0aafa2741088d82e9161c

func Inpaint

func Inpaint(src *gocv.Mat, mask *gocv.Mat, dst *gocv.Mat, algorithmType InpaintTypes)

The function implements different single-image inpainting algorithms.

For further details, please see: https://docs.opencv.org/master/de/daa/group__xphoto.html#gab4febba6be53e5fddc480b8cedf51eee

func NewTrackerCSRT

func NewTrackerCSRT() gocv.Tracker

NewTrackerCSRT returns a new TrackerCSRT.

func NewTrackerKCF

func NewTrackerKCF() gocv.Tracker

NewTrackerKCF returns a new TrackerKCF.

func NiblackThreshold

func NiblackThreshold(src gocv.Mat, dst *gocv.Mat, maxValue float32,
	typ gocv.ThresholdType, blockSize int, k float32, binarizationMethod BinarizationMethod, r float32)

NiblackThreshold performs thresholding on input images using Niblack's technique or some of the popular variations it inspired.

For further details, please see: https://docs.opencv.org/4.x/df/d2d/group__ximgproc.html#gab042a5032bbb85275f1fd3e04e7c7660

func OilPainting

func OilPainting(src gocv.Mat, dst *gocv.Mat, size int, dynRatio int)

oilPainting, See the book for details : GerPublished by ard J. Holzmann. Beyond Photography: The Digital Darkroom. Prentice Hall in 1988.

For further details, please see: https://docs.opencv.org/master/de/daa/group__xphoto.html#gac18ef93a7b1e65f703f7dc3b1e8e5235

func OilPaintingWithParams

func OilPaintingWithParams(src gocv.Mat, dst gocv.Mat, size int, dynRatio int, code gocv.ColorConversionCode)

oilPainting, See the book for details : GerPublished by ard J. Holzmann. Beyond Photography: The Digital Darkroom. Prentice Hall in 1988.

For further details, please see: https://docs.opencv.org/master/de/daa/group__xphoto.html#gac050a6e876298cb9713cd2c09db9a027

func PeiLinNormalization

func PeiLinNormalization(src gocv.Mat, dst *gocv.Mat)

PeiLinNormalization calculates an affine transformation that normalize given image using Pei&Lin Normalization.

For further details, please see: https://docs.opencv.org/4.x/df/d2d/group__ximgproc.html#ga50d064b92f63916f4162474eea22d656

func Thinning

func Thinning(src gocv.Mat, dst *gocv.Mat, typ ThinningType)

Thinning applies a binary blob thinning operation, to achieve a skeletization of the input image.

The function transforms a binary blob image into a skeletized form using the technique of Zhang-Suen.

For further details, please see: https://docs.opencv.org/4.x/df/d2d/group__ximgproc.html#ga37002c6ca80c978edb6ead5d6b39740c

Types

type AverageHash

type AverageHash struct{}

AverageHash is implementation of the AverageHash algorithm.

func (AverageHash) Compare

func (hash AverageHash) Compare(a, b gocv.Mat) float64

Compare compares the hash value between a and b using AverageHash.

For further information, see: https://docs.opencv.org/master/de/d29/classcv_1_1img__hash_1_1ImgHashBase.html#a444a3e9ec792cf029385809393f84ad5

func (AverageHash) Compute

func (hash AverageHash) Compute(input gocv.Mat, output *gocv.Mat)

Compute computes hash of the input image using AverageHash.

For further information, see: https://docs.opencv.org/master/de/d29/classcv_1_1img__hash_1_1ImgHashBase.html#ae2d9288db370089dfd8aab85d5e0b0f3

type BackgroundSubtractorCNT

type BackgroundSubtractorCNT struct {
	// contains filtered or unexported fields
}

BackgroundSubtractorCNT is a wrapper around the cv::BackgroundSubtractorCNT.

func NewBackgroundSubtractorCNT

func NewBackgroundSubtractorCNT() BackgroundSubtractorCNT

NewBackgroundSubtractorCNT returns a new BackgroundSubtractor algorithm of type CNT. CNT is Background subtraction algorithm based on counting. About as fast as MOG2 on a high end system. More than twice faster than MOG2 on cheap hardware (benchmarked on Raspberry Pi3). Algorithm by Sagi Zeevi

For further details, please see: https://docs.opencv.org/3.4/de/dca/classcv_1_1bgsegm_1_1BackgroundSubtractorCNT.html

func (*BackgroundSubtractorCNT) Apply

func (b *BackgroundSubtractorCNT) Apply(src gocv.Mat, dst *gocv.Mat)

Apply computes a foreground mask using the current BackgroundSubtractorCNT.

For further details, please see: https://docs.opencv.org/3.4/de/dca/classcv_1_1bgsegm_1_1BackgroundSubtractorCNT.html

func (*BackgroundSubtractorCNT) Close

func (b *BackgroundSubtractorCNT) Close() error

Close BackgroundSubtractorCNT.

type BinarizationMethod

type BinarizationMethod int
const (
	BinarizationNiblack BinarizationMethod = iota
	BinarizationSauvola
	BinarizationWolf
	BinarizationNICK
)

type BlockMeanHash

type BlockMeanHash struct {
	Mode BlockMeanHashMode
}

BlockMeanHash is implementation of the BlockMeanHash algorithm.

func (BlockMeanHash) Compare

func (hash BlockMeanHash) Compare(a, b gocv.Mat) float64

Compare compares the hash value between a and b using BlockMeanHash.

For further information, see: https://docs.opencv.org/master/de/d29/classcv_1_1img__hash_1_1ImgHashBase.html#a444a3e9ec792cf029385809393f84ad5

func (BlockMeanHash) Compute

func (hash BlockMeanHash) Compute(input gocv.Mat, output *gocv.Mat)

Compute computes hash of the input image using BlockMeanHash.

For further information, see: https://docs.opencv.org/master/de/d29/classcv_1_1img__hash_1_1ImgHashBase.html#ae2d9288db370089dfd8aab85d5e0b0f3

type BlockMeanHashMode

type BlockMeanHashMode int
const (
	BlockMeanHashMode0 BlockMeanHashMode = iota
	BlockMeanHashMode1
	BlockMeanHashModeDefault = BlockMeanHashMode0
)

func (BlockMeanHashMode) String

func (c BlockMeanHashMode) String() string

type Bm3dSteps

type Bm3dSteps int

Bm3dSteps is the type for the various BM3D algorithm steps

const (
	Bm3dAlgoStepAll Bm3dSteps = 0
	Bm3dAlgoSte1    Bm3dSteps = 1
	Bm3dAlgoSte2    Bm3dSteps = 2
)

type ColorMomentHash

type ColorMomentHash struct{}

ColorMomentHash is implementation of the ColorMomentHash algorithm.

func (ColorMomentHash) Compare

func (hash ColorMomentHash) Compare(a, b gocv.Mat) float64

Compare compares the hash value between a and b using ColorMomentHash.

For further information, see: https://docs.opencv.org/master/de/d29/classcv_1_1img__hash_1_1ImgHashBase.html#a444a3e9ec792cf029385809393f84ad5

func (ColorMomentHash) Compute

func (hash ColorMomentHash) Compute(input gocv.Mat, output *gocv.Mat)

Compute computes hash of the input image using ColorMomentHash.

For further information, see: https://docs.opencv.org/master/de/d29/classcv_1_1img__hash_1_1ImgHashBase.html#ae2d9288db370089dfd8aab85d5e0b0f3

type GrayworldWB

type GrayworldWB struct {
	// contains filtered or unexported fields
}

GrayworldWB is a wrapper around the cv::xphoto::GrayworldWB.

func NewGrayworldWB

func NewGrayworldWB() GrayworldWB

NewGrayworldWBWithParams returns a new Gray-world white balance algorithm. of type GrayworldWB with customized parameters. GrayworldWB algorithm scales the values of pixels based on a gray-world assumption which states that the average of all channels should result in a gray image.

For further details, please see: https://docs.opencv.org/master/de/daa/group__xphoto.html https://docs.opencv.org/master/d7/d71/classcv_1_1xphoto_1_1GrayworldWB.html

func (*GrayworldWB) BalanceWhite

func (b *GrayworldWB) BalanceWhite(src gocv.Mat, dst *gocv.Mat)

BalanceWhite computes a Gray-world white balance using the current GrayworldWB.

For further details, please see: https://docs.opencv.org/master/d7/d71/classcv_1_1xphoto_1_1GrayworldWB.html#details

func (*GrayworldWB) Close

func (b *GrayworldWB) Close() error

Close GrayworldWB.

func (*GrayworldWB) GetSaturationThreshold

func (b *GrayworldWB) GetSaturationThreshold() float32

GetSaturationThreshold return the Maximum saturation for a pixel to be included in the gray-world assumption.

For further details, please see: https://docs.opencv.org/master/de/daa/group__xphoto.html https://docs.opencv.org/master/d7/d71/classcv_1_1xphoto_1_1GrayworldWB.html https://docs.opencv.org/master/d7/d71/classcv_1_1xphoto_1_1GrayworldWB.html#ac6e17766e394adc15588b8522202cc71

func (*GrayworldWB) SetSaturationThreshold

func (b *GrayworldWB) SetSaturationThreshold(saturationThreshold float32)

SetSaturationThreshold set a Maximum saturation for a pixel to be included in the gray-world assumption.

For further details, please see: https://docs.opencv.org/master/de/daa/group__xphoto.html https://docs.opencv.org/master/d7/d71/classcv_1_1xphoto_1_1GrayworldWB.html https://docs.opencv.org/master/d7/d71/classcv_1_1xphoto_1_1GrayworldWB.html#ac6e17766e394adc15588b8522202cc71

type ImgHashBase

type ImgHashBase interface {
	Compare(a, b gocv.Mat) float64
	Compute(inputArr gocv.Mat, outputArr *gocv.Mat)
}

ImgHashBase defines the interface used for all of the img_hash algorithms.

type InpaintTypes

type InpaintTypes int
const (
	ShitMap InpaintTypes = 0
	FsrBest InpaintTypes = 1
	FsrFast InpaintTypes = 2
)

type LBPHFaceRecognizer

type LBPHFaceRecognizer struct {
	// contains filtered or unexported fields
}

LBPHFaceRecognizer is a wrapper for the OpenCV Local Binary Patterns Histograms face recognizer.

func NewLBPHFaceRecognizer

func NewLBPHFaceRecognizer() *LBPHFaceRecognizer

NewLBPHFaceRecognizer creates a new LBPH Recognizer model.

For further information, see: https://docs.opencv.org/master/df/d25/classcv_1_1face_1_1LBPHFaceRecognizer.html

func (*LBPHFaceRecognizer) GetNeighbors

func (fr *LBPHFaceRecognizer) GetNeighbors() int

GetNeighbors returns the neighbors value of the model.

For further information, see: https://docs.opencv.org/master/df/d25/classcv_1_1face_1_1LBPHFaceRecognizer.html#a50a3e2ca6e8464166e153c9df84b0a77

func (*LBPHFaceRecognizer) LoadFile

func (fr *LBPHFaceRecognizer) LoadFile(fname string)

LoadFile loads a trained model data from file.

For further information, see: https://docs.opencv.org/master/dd/d65/classcv_1_1face_1_1FaceRecognizer.html#acc42e5b04595dba71f0777c7179af8c3

func (*LBPHFaceRecognizer) Predict

func (fr *LBPHFaceRecognizer) Predict(sample gocv.Mat) int

Predict predicts a label for a given input image. It returns the label for correctly predicted image or -1 if not found.

For further information, see: https://docs.opencv.org/master/dd/d65/classcv_1_1face_1_1FaceRecognizer.html#aa2d2f02faffab1bf01317ae6502fb631

func (*LBPHFaceRecognizer) PredictExtendedResponse

func (fr *LBPHFaceRecognizer) PredictExtendedResponse(sample gocv.Mat) PredictResponse

PredictExtendedResponse returns a label and associated confidence (e.g. distance) for a given input image. It is the extended version of `Predict()`.

For further information, see: https://docs.opencv.org/master/dd/d65/classcv_1_1face_1_1FaceRecognizer.html#ab0d593e53ebd9a0f350c989fcac7f251

func (*LBPHFaceRecognizer) SaveFile

func (fr *LBPHFaceRecognizer) SaveFile(fname string)

SaveFile saves the trained model data to file.

For further information, see: https://docs.opencv.org/master/dd/d65/classcv_1_1face_1_1FaceRecognizer.html#a2adf2d555550194244b05c91fefcb4d6

func (*LBPHFaceRecognizer) SetNeighbors

func (fr *LBPHFaceRecognizer) SetNeighbors(neighbors int)

SetNeighbors sets the neighbors value of the model, i.e. the number of sample points to build a Circular Local Binary Pattern from. Note that wrong neighbors can raise OpenCV exception!

For further information, see: https://docs.opencv.org/master/df/d25/classcv_1_1face_1_1LBPHFaceRecognizer.html#ab225f7bf353ce8697a506eda10124a92

func (*LBPHFaceRecognizer) SetRadius

func (fr *LBPHFaceRecognizer) SetRadius(radius int)

SetRadius sets the radius used for building the Circular Local Binary Pattern.

For further information, see: https://docs.opencv.org/master/df/d25/classcv_1_1face_1_1LBPHFaceRecognizer.html#a62d94c75cade902fd3b487b1ef9883fc

func (*LBPHFaceRecognizer) SetThreshold

func (fr *LBPHFaceRecognizer) SetThreshold(threshold float32)

SetThreshold sets the threshold value of the model, i.e. the threshold applied in the prediction.

For further information, see: https://docs.opencv.org/master/dd/d65/classcv_1_1face_1_1FaceRecognizer.html#a3182081e5f8023e658ad8ab96656dd63

func (*LBPHFaceRecognizer) Train

func (fr *LBPHFaceRecognizer) Train(images []gocv.Mat, labels []int)

Train loaded model with images and their labels

see https://docs.opencv.org/master/dd/d65/classcv_1_1face_1_1FaceRecognizer.html#ac8680c2aa9649ad3f55e27761165c0d6

func (*LBPHFaceRecognizer) Update

func (fr *LBPHFaceRecognizer) Update(newImages []gocv.Mat, newLabels []int)

Update updates the existing trained model with new images and labels.

For further information, see: https://docs.opencv.org/master/dd/d65/classcv_1_1face_1_1FaceRecognizer.html#a8a4e73ea878dcd0c235d0487189d25f3

type LearningBasedWB

type LearningBasedWB struct {
	// contains filtered or unexported fields
}

LearningBasedWB is a wrapper around the cv::xphoto::LearningBasedWB.

func NewLearningBasedWBWithParams

func NewLearningBasedWBWithParams(pathmodel string) LearningBasedWB

NewLearningBasedWBWithParams returns more sophisticated learning-based automatic white balance algorithm. A type LearningBasedWB algorithm with path model parameters.

For further details, please see: https://docs.opencv.org/master/de/daa/group__xphoto.html https://docs.opencv.org/master/d4/d3b/classcv_1_1xphoto_1_1LearningBasedWB.html https://docs.opencv.org/master/de/daa/group__xphoto.html#gac8fb5636b27eac575f4a4c9c54dd1c7c

func (*LearningBasedWB) BalanceWhite

func (b *LearningBasedWB) BalanceWhite(src gocv.Mat, dst *gocv.Mat)

BalanceWhite computes a learning-based white balance using the current LearningBasedWB.

For further details, please see: https://docs.opencv.org/master/d9/d7a/classcv_1_1xphoto_1_1WhiteBalancer.html#ae23838a1a54f101b255bca1a97418aa3

func (*LearningBasedWB) Close

func (b *LearningBasedWB) Close() error

Close LearningBasedWB.

func (*LearningBasedWB) ExtractSimpleFeatures

func (b *LearningBasedWB) ExtractSimpleFeatures(src gocv.Mat, dst *gocv.Mat)

ExtractSimpleFeatures Implements the feature extraction part of the algorithm.

For further details, please see: https://docs.opencv.org/master/d4/d3b/classcv_1_1xphoto_1_1LearningBasedWB.html#aeeaca052262a01d0feed6312ccb9a76e

func (*LearningBasedWB) GetHistBinNum

func (b *LearningBasedWB) GetHistBinNum() int

GetHistBinNum Defines the size of one dimension of a three-dimensional RGB histogram that is used internally by the algorithm.

For further details, please see: https://docs.opencv.org/master/d4/d3b/classcv_1_1xphoto_1_1LearningBasedWB.html#abfe7d3983f8245a7eba0a7f9de40e3e1

func (*LearningBasedWB) GetRangeMaxVal

func (b *LearningBasedWB) GetRangeMaxVal() int

GetRangeMaxVal Maximum possible value of the input image (e.g. 255 for 8 bit images, 4095 for 12 bit images)

For further details, please see: https://docs.opencv.org/master/d4/d3b/classcv_1_1xphoto_1_1LearningBasedWB.html#a764b51265b5a1bd7bd11ce9d14d6f75f

func (*LearningBasedWB) GetSaturationThreshold

func (b *LearningBasedWB) GetSaturationThreshold() float32

GetSaturationThreshold Threshold that is used to determine saturated pixels

For further details, please see: https://docs.opencv.org/master/d4/d3b/classcv_1_1xphoto_1_1LearningBasedWB.html#ae7eb310249709c2aef41d6399ebd7660

func (*LearningBasedWB) SetHistBinNum

func (b *LearningBasedWB) SetHistBinNum(val int)

SetHistBinNum Defines the size of one dimension of a three-dimensional RGB histogram that is used internally by the algorithm.

For further details, please see: https://docs.opencv.org/master/d4/d3b/classcv_1_1xphoto_1_1LearningBasedWB.html#a3381bd425bc4201133c9669071908e7f

func (*LearningBasedWB) SetRangeMaxVal

func (b *LearningBasedWB) SetRangeMaxVal(val int)

SetRangeMaxVal Maximum possible value of the input image (e.g. 255 for 8 bit images, 4095 for 12 bit images)

For further details, please see: https://docs.opencv.org/master/d4/d3b/classcv_1_1xphoto_1_1LearningBasedWB.html#a3d9395274be8053b2f09e46d11a24a65

func (*LearningBasedWB) SetSaturationThreshold

func (b *LearningBasedWB) SetSaturationThreshold(val float32)

SetSaturationThreshold Threshold that is used to determine saturated pixels

For further details, please see: https://docs.opencv.org/master/d4/d3b/classcv_1_1xphoto_1_1LearningBasedWB.html#a9bff5a507d4dffc58e16d85b1d07f35f

type MarrHildrethHash

type MarrHildrethHash struct {
	Alpha float32
	Scale float32
}

MarrHildrethHash is implementation of the MarrHildrethHash algorithm.

func NewMarrHildrethHash

func NewMarrHildrethHash() MarrHildrethHash

func (MarrHildrethHash) Compare

func (hash MarrHildrethHash) Compare(a, b gocv.Mat) float64

Compare compares the hash value between a and b using MarrHildrethHash.

For further information, see: https://docs.opencv.org/master/de/d29/classcv_1_1img__hash_1_1ImgHashBase.html#a444a3e9ec792cf029385809393f84ad5

func (MarrHildrethHash) Compute

func (hash MarrHildrethHash) Compute(input gocv.Mat, output *gocv.Mat)

Compute computes hash of the input image using MarrHildrethHash.

For further information, see: https://docs.opencv.org/master/de/d29/classcv_1_1img__hash_1_1ImgHashBase.html#ae2d9288db370089dfd8aab85d5e0b0f3

type PHash

type PHash struct{}

PHash is implementation of the PHash algorithm.

func (PHash) Compare

func (hash PHash) Compare(a, b gocv.Mat) float64

Compare compares the hash value between a and b using PHash.

For further information, see: https://docs.opencv.org/master/de/d29/classcv_1_1img__hash_1_1ImgHashBase.html#a444a3e9ec792cf029385809393f84ad5

func (PHash) Compute

func (hash PHash) Compute(input gocv.Mat, output *gocv.Mat)

Compute computes hash of the input image using PHash.

For further information, see: https://docs.opencv.org/master/de/d29/classcv_1_1img__hash_1_1ImgHashBase.html#ae2d9288db370089dfd8aab85d5e0b0f3

type PredictResponse

type PredictResponse struct {
	Label      int32   `json:"label"`
	Confidence float32 `json:"confidence"`
}

PredictResponse represents a predicted label and associated confidence.

type RadialVarianceHash

type RadialVarianceHash struct {
	Sigma          float64
	NumOfAngleLine int
}

RadialVarianceHash is implementation of the RadialVarianceHash algorithm.

func NewRadialVarianceHash

func NewRadialVarianceHash() RadialVarianceHash

func (RadialVarianceHash) Compare

func (hash RadialVarianceHash) Compare(a, b gocv.Mat) float64

Compare compares the hash value between a and b using RadialVarianceHash.

For further information, see: https://docs.opencv.org/master/de/d29/classcv_1_1img__hash_1_1ImgHashBase.html#a444a3e9ec792cf029385809393f84ad5

func (RadialVarianceHash) Compute

func (hash RadialVarianceHash) Compute(input gocv.Mat, output *gocv.Mat)

Compute computes hash of the input image using RadialVarianceHash.

For further information, see: https://docs.opencv.org/master/de/d29/classcv_1_1img__hash_1_1ImgHashBase.html#ae2d9288db370089dfd8aab85d5e0b0f3

type SURF

type SURF struct {
	// contains filtered or unexported fields
}

SURF is a wrapper around the cv::SURF algorithm. Due to being a patented algorithm you must set the OpenCV contrib build flag OPENCV_ENABLE_NONFREE=1 in order to use it.

func NewSURF

func NewSURF() SURF

NewSURF returns a new SURF algorithm.

For further details, please see: https://docs.opencv.org/master/d5/df7/classcv_1_1xfeatures2d_1_1SURF.html

func (*SURF) Close

func (d *SURF) Close() error

Close SURF.

func (*SURF) Detect

func (d *SURF) Detect(src gocv.Mat) []gocv.KeyPoint

Detect keypoints in an image using SURF.

For further details, please see: https://docs.opencv.org/master/d0/d13/classcv_1_1Feature2D.html#aa4e9a7082ec61ebc108806704fbd7887

func (*SURF) DetectAndCompute

func (d *SURF) DetectAndCompute(src gocv.Mat, mask gocv.Mat) ([]gocv.KeyPoint, gocv.Mat)

DetectAndCompute detects and computes keypoints in an image using SURF.

For further details, please see: https://docs.opencv.org/master/d0/d13/classcv_1_1Feature2D.html#a8be0d1c20b08eb867184b8d74c15a677

type SimpleWB

type SimpleWB struct {
	// contains filtered or unexported fields
}

SimpleWB is a wrapper around the cv::xphoto::SimpleWB.

func NewSimpleWB

func NewSimpleWB() SimpleWB

NewSimpleWBWithParams returns more sophisticated learning-based automatic white balance algorithm. A type SimpleWB algorithm with path model parameters.

For further details, please see: https://docs.opencv.org/master/de/daa/group__xphoto.html https://docs.opencv.org/master/d1/d8b/classcv_1_1xphoto_1_1SimpleWB.html https://docs.opencv.org/master/de/daa/group__xphoto.html#ga2b48b3b384b5c5ee1b15a2a01c26d5f1

func (*SimpleWB) BalanceWhite

func (b *SimpleWB) BalanceWhite(src gocv.Mat, dst *gocv.Mat)

BalanceWhite computes a learning-based white balance using the current LearningBasedWB.

For further details, please see: https://docs.opencv.org/master/d9/d7a/classcv_1_1xphoto_1_1WhiteBalancer.html#ae23838a1a54f101b255bca1a97418aa3

func (*SimpleWB) Close

func (b *SimpleWB) Close() error

Close SimpleWB.

func (*SimpleWB) GetInputMax

func (b *SimpleWB) GetInputMax() float32

GetInputMax Input image range maximum value.

For further details, please see: https://docs.opencv.org/master/d1/d8b/classcv_1_1xphoto_1_1SimpleWB.html#a45fef780842168cba868212c71ad8318

func (*SimpleWB) GetInputMin

func (b *SimpleWB) GetInputMin() float32

GetInputMin Input image range minimum value.

For further details, please see: https://docs.opencv.org/master/d1/d8b/classcv_1_1xphoto_1_1SimpleWB.html#a69ee7c05e5ca45cac60040371a4a648c

func (*SimpleWB) GetOutputMax

func (b *SimpleWB) GetOutputMax() float32

GetOutputMax Output image range maximum value.

For further details, please see: https://docs.opencv.org/master/d1/d8b/classcv_1_1xphoto_1_1SimpleWB.html#af8b051a0b2d3e8ad0aa323c195d966c1

func (*SimpleWB) GetOutputMin

func (b *SimpleWB) GetOutputMin() float32

GetOutputMin Output image range minimum value.

For further details, please see: https://docs.opencv.org/master/d1/d8b/classcv_1_1xphoto_1_1SimpleWB.html#ada11ef4159bd6354a98d371f5be68b44

func (*SimpleWB) GetP

func (b *SimpleWB) GetP() float32

GetP Percent of top/bottom values to ignore.

For further details, please see: https://docs.opencv.org/master/d1/d8b/classcv_1_1xphoto_1_1SimpleWB.html#a49d63fd73572fc88c944f5ffbcb085a3

func (*SimpleWB) SetInputMax

func (b *SimpleWB) SetInputMax(val float32)

SetInputMax Input image range maximum value.

For further details, please see: https://docs.opencv.org/master/d1/d8b/classcv_1_1xphoto_1_1SimpleWB.html#a6b2523a8740b353ef50e136d0399bf3a

func (*SimpleWB) SetInputMin

func (b *SimpleWB) SetInputMin(val float32)

SetInputMin Input image range minimum value.

For further details, please see: https://docs.opencv.org/master/d1/d8b/classcv_1_1xphoto_1_1SimpleWB.html#a1b08a24a8589aae886fbf96ba27691a0

func (*SimpleWB) SetOutputMax

func (b *SimpleWB) SetOutputMax(val float32)

SetOutputMax Output image range maximum value.

For further details, please see: https://docs.opencv.org/master/d1/d8b/classcv_1_1xphoto_1_1SimpleWB.html#a06962b042d9089366bc6347e608481b6

func (*SimpleWB) SetOutputMin

func (b *SimpleWB) SetOutputMin(val float32)

SetOutputMin Output image range minimum value.

For further details, please see: https://docs.opencv.org/master/d1/d8b/classcv_1_1xphoto_1_1SimpleWB.html#a60d1e06b122747d416c4f1563167c740

func (*SimpleWB) SetP

func (b *SimpleWB) SetP(val float32)

SetP Percent of top/bottom values to ignore.

For further details, please see: https://docs.opencv.org/master/d1/d8b/classcv_1_1xphoto_1_1SimpleWB.html#a31b6bb5452afdb5a444920013417f018

type ThinningType

type ThinningType int
const (
	ThinningZhangSuen ThinningType = iota
	ThinningGuoHall
)

type TonemapDurand

type TonemapDurand struct {
	// contains filtered or unexported fields
}

TonemapDurand is a wrapper around the cv::xphoto::TonemapDurand.

func NewTonemapDurand

func NewTonemapDurand() TonemapDurand

NewTonemapDurand returns more sophisticated learning-based automatic white balance algorithm. A type TonemapDurand algorithm with path model parameters.

For further details, please see: https://docs.opencv.org/master/de/daa/group__xphoto.html https://docs.opencv.org/master/d1/db3/classcv_1_1xphoto_1_1TonemapDurand.html https://docs.opencv.org/master/de/daa/group__xphoto.html#ga51a091aa54e26b3546316ce2c1df190b

func NewTonemapDurandWithParams

func NewTonemapDurandWithParams(gamma float32, contrast float32, saturation float32,
	sigma_color float32, sigma_space float32) TonemapDurand

NewTonemapDurandWithParams returns more sophisticated learning-based automatic white balance algorithm. A type TonemapDurand algorithm with path model parameters.

For further details, please see: https://docs.opencv.org/master/de/daa/group__xphoto.html https://docs.opencv.org/master/d1/db3/classcv_1_1xphoto_1_1TonemapDurand.html https://docs.opencv.org/master/de/daa/group__xphoto.html#ga51a091aa54e26b3546316ce2c1df190b

func (*TonemapDurand) Close

func (b *TonemapDurand) Close() error

Close TonemapDurand.

func (*TonemapDurand) GetContrast

func (b *TonemapDurand) GetContrast() float32

GetContrast

For further details, please see: https://docs.opencv.org/master/de/daa/group__xphoto.html#ga2df693dd285a7e7fd3b4fc8a8a750cce

func (*TonemapDurand) GetGamma

func (b *TonemapDurand) GetGamma() float32

GetGamma

For further details, please see: https://docs.opencv.org/master/d8/d5e/classcv_1_1Tonemap.html#a147c2b57ed5a5a0566001f4db2ddc0dd

func (*TonemapDurand) GetSaturation

func (b *TonemapDurand) GetSaturation() float32

GetSaturation

For further details, please see: https://docs.opencv.org/master/de/daa/group__xphoto.html#gad8ab5850af6fdb3f6bc51d5c9371bbfe

func (*TonemapDurand) GetSigmaColor

func (b *TonemapDurand) GetSigmaColor() float32

GetSigmaColor

For further details, please see: https://docs.opencv.org/master/de/daa/group__xphoto.html#ga31d7588db7e47fb81890cba7ff014edb

func (*TonemapDurand) GetSigmaSpace

func (b *TonemapDurand) GetSigmaSpace() float32

GetSigmaSpace

For further details, please see: https://docs.opencv.org/master/de/daa/group__xphoto.html#ga078b11014d8a41920f50cab57fce9515

func (*TonemapDurand) Process

func (b *TonemapDurand) Process(src gocv.Mat, dst *gocv.Mat)

Process Tonemaps image with gocv.MatTypeCV32FC3 type image For further details, please see: https://docs.opencv.org/master/d8/d5e/classcv_1_1Tonemap.html#aa705c3b7226f7028a5c117dffab60fe4

func (*TonemapDurand) SetContrast

func (b *TonemapDurand) SetContrast(val float32)

SetContrast

For further details, please see: https://docs.opencv.org/master/de/daa/group__xphoto.html#ga99eaaa24dc25ba387093e957bfca1cad

func (*TonemapDurand) SetGamma

func (b *TonemapDurand) SetGamma(val float32)

SetGamma

For further details, please see: https://docs.opencv.org/master/d8/d5e/classcv_1_1Tonemap.html#ac809d2967f942b038b4bf21c97f8b1b7

func (*TonemapDurand) SetSaturation

func (b *TonemapDurand) SetSaturation(val float32)

SetSaturation

For further details, please see: https://docs.opencv.org/master/de/daa/group__xphoto.html#ga9c7de9517f95fd046910fc818e256d55

func (*TonemapDurand) SetSigmaColor

func (b *TonemapDurand) SetSigmaColor(val float32)

SetSigmaColor

For further details, please see: https://docs.opencv.org/master/de/daa/group__xphoto.html#ga7dec866735ecbae9e05224958d4585fd

func (*TonemapDurand) SetSigmaSpace

func (b *TonemapDurand) SetSigmaSpace(val float32)

SetSigmaSpace

For further details, please see: https://docs.opencv.org/master/de/daa/group__xphoto.html#ga8869068912fae078699ce931bdc17fc4

type TrackerCSRT

type TrackerCSRT struct {
	// contains filtered or unexported fields
}

TrackerCSRT is an implementation of Discriminative Correlation Filter Tracker with Channel and Spatial Reliability.

For further details, please see: https://docs.opencv.org/master/d2/da2/classcv_1_1TrackerCSRT.html

func (TrackerCSRT) Close

func (trk TrackerCSRT) Close() error

Close closes this Tracker.

func (TrackerCSRT) Init

func (trk TrackerCSRT) Init(img gocv.Mat, boundingBox image.Rectangle) bool

Init initializes this Tracker.

func (TrackerCSRT) Update

func (trk TrackerCSRT) Update(img gocv.Mat) (image.Rectangle, bool)

Update updates this Tracker.

type TrackerKCF

type TrackerKCF struct {
	// contains filtered or unexported fields
}

TrackerKCF is a Tracker based on KCF, which is a novel tracking framework that utilizes properties of circulant matrix to enhance the processing speed.

For further details, please see: https://docs.opencv.org/master/d2/dff/classcv_1_1TrackerKCF.html

func (TrackerKCF) Close

func (trk TrackerKCF) Close() error

Close closes this Tracker.

func (TrackerKCF) Init

func (trk TrackerKCF) Init(img gocv.Mat, boundingBox image.Rectangle) bool

Init initializes this Tracker.

func (TrackerKCF) Update

func (trk TrackerKCF) Update(img gocv.Mat) (image.Rectangle, bool)

Update updates this Tracker.

type TransformTypes

type TransformTypes int
const (
	Bm3dTypeHaar TransformTypes = 0
)

type WeChatQRCode

type WeChatQRCode struct {
	// contains filtered or unexported fields
}

func NewWeChatQRCode

func NewWeChatQRCode(detectProtoTxt, detectCaffe, superProtoTxt, superCaffe string) *WeChatQRCode

func (*WeChatQRCode) DetectAndDecode

func (wq *WeChatQRCode) DetectAndDecode(img gocv.Mat, point *[]gocv.Mat) []string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL