contrib

package
v0.36.1 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 5 Imported by: 36

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 added in v0.31.0

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 added in v0.28.0

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

func Bm3dDenoising added in v0.28.0

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

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

func Bm3dDenoisingStep added in v0.28.0

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

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

func Bm3dDenoisingStepWithParams added in v0.28.0

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 added in v0.28.0

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 added in v0.31.0

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 added in v0.28.0

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 added in v0.16.0

func NewTrackerCSRT() gocv.Tracker

NewTrackerCSRT returns a new TrackerCSRT.

func NewTrackerKCF added in v0.16.0

func NewTrackerKCF() gocv.Tracker

NewTrackerKCF returns a new TrackerKCF.

func NiblackThreshold added in v0.31.0

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 added in v0.28.0

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 added in v0.28.0

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 added in v0.31.0

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 added in v0.31.0

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 added in v0.16.0

type AverageHash struct{}

AverageHash is implementation of the AverageHash algorithm.

func (AverageHash) Compare added in v0.16.0

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 added in v0.16.0

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 added in v0.22.0

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

BackgroundSubtractorCNT is a wrapper around the cv::BackgroundSubtractorCNT.

func NewBackgroundSubtractorCNT added in v0.22.0

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 added in v0.22.0

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 added in v0.22.0

func (b *BackgroundSubtractorCNT) Close() error

Close BackgroundSubtractorCNT.

type BinarizationMethod added in v0.31.0

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

type BlockMeanHash added in v0.16.0

type BlockMeanHash struct {
	Mode BlockMeanHashMode
}

BlockMeanHash is implementation of the BlockMeanHash algorithm.

func (BlockMeanHash) Compare added in v0.16.0

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 added in v0.16.0

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 added in v0.16.0

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

func (BlockMeanHashMode) String added in v0.22.0

func (c BlockMeanHashMode) String() string

type Bm3dSteps added in v0.28.0

type Bm3dSteps int

Bm3dSteps is the type for the various BM3D algorithm steps

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

type BriefDescriptorExtractor added in v0.36.0

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

BriefDescriptorExtractor is a wrapper around the cv::BriefDescriptorExtractor algorithm.

func NewBriefDescriptorExtractor added in v0.36.0

func NewBriefDescriptorExtractor() BriefDescriptorExtractor

NewBriefDescriptorExtractor returns a new BriefDescriptorExtractor algorithm.

For further details, please see: https://docs.opencv.org/master/d1/d93/classcv_1_1xfeatures2d_1_1BriefDescriptorExtractor.html

func NewBriefDescriptorExtractorWithParams added in v0.36.0

func NewBriefDescriptorExtractorWithParams(bytes int, useOrientation bool) BriefDescriptorExtractor

NewBriefDescriptorExtractorWithParams returns a new BriefDescriptorExtractor algorithm algorithm with parameters

For further details, please see: https://docs.opencv.org/master/d1/d93/classcv_1_1xfeatures2d_1_1BriefDescriptorExtractor.html#ae3bc52666010fb137ab6f0d32de51f60

func (*BriefDescriptorExtractor) Close added in v0.36.0

func (d *BriefDescriptorExtractor) Close() error

Close BriefDescriptorExtractor.

func (*BriefDescriptorExtractor) Compute added in v0.36.0

func (b *BriefDescriptorExtractor) Compute(keyPoints []gocv.KeyPoint, src gocv.Mat) gocv.Mat

Compute descriptors with given keypoints using BriefDescriptorExtractor

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

type ColorMomentHash added in v0.16.0

type ColorMomentHash struct{}

ColorMomentHash is implementation of the ColorMomentHash algorithm.

func (ColorMomentHash) Compare added in v0.16.0

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 added in v0.16.0

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 added in v0.28.0

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

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

func NewGrayworldWB added in v0.28.0

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 added in v0.28.0

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 added in v0.28.0

func (b *GrayworldWB) Close() error

Close GrayworldWB.

func (*GrayworldWB) GetSaturationThreshold added in v0.28.0

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 added in v0.28.0

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 added in v0.16.0

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 added in v0.28.0

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 added in v0.28.0

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

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

func NewLearningBasedWB added in v0.28.0

func NewLearningBasedWB() LearningBasedWB

NewLearningBasedWB returns more sophisticated learning-based automatic white balance algorithm.

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 NewLearningBasedWBWithParams added in v0.28.0

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 added in v0.28.0

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 added in v0.28.0

func (b *LearningBasedWB) Close() error

Close LearningBasedWB.

func (*LearningBasedWB) ExtractSimpleFeatures added in v0.28.0

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 added in v0.28.0

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 added in v0.28.0

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 added in v0.28.0

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 added in v0.28.0

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 added in v0.28.0

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 added in v0.28.0

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 added in v0.16.0

type MarrHildrethHash struct {
	Alpha float32
	Scale float32
}

MarrHildrethHash is implementation of the MarrHildrethHash algorithm.

func NewMarrHildrethHash added in v0.16.0

func NewMarrHildrethHash() MarrHildrethHash

func (MarrHildrethHash) Compare added in v0.16.0

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 added in v0.16.0

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 added in v0.16.0

type PHash struct{}

PHash is implementation of the PHash algorithm.

func (PHash) Compare added in v0.16.0

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 added in v0.16.0

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 added in v0.16.0

type RadialVarianceHash struct {
	Sigma          float64
	NumOfAngleLine int
}

RadialVarianceHash is implementation of the RadialVarianceHash algorithm.

func NewRadialVarianceHash added in v0.16.0

func NewRadialVarianceHash() RadialVarianceHash

func (RadialVarianceHash) Compare added in v0.16.0

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 added in v0.16.0

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 NewSURFWithParams added in v0.36.0

func NewSURFWithParams(hessianThreshold float64, nOctaves int, nOctaveLayers int, extended bool, upright bool) SURF

NewSURFWithParams returns a new SURF algorithm algorithm with parameters

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

func (*SURF) Close

func (d *SURF) Close() error

Close SURF.

func (*SURF) Compute added in v0.36.0

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

Compute keypoints in an image using SURF.

For further details, please see: https://docs.opencv.org/4.x/d0/d13/classcv_1_1Feature2D.html#ab3cce8d56f4fc5e1d530b5931e1e8dc0

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 added in v0.28.0

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

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

func NewSimpleWB added in v0.28.0

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 added in v0.28.0

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 added in v0.28.0

func (b *SimpleWB) Close() error

Close SimpleWB.

func (*SimpleWB) GetInputMax added in v0.28.0

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 added in v0.28.0

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 added in v0.28.0

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 added in v0.28.0

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 added in v0.28.0

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 added in v0.28.0

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 added in v0.28.0

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 added in v0.28.0

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 added in v0.28.0

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 added in v0.28.0

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 added in v0.31.0

type ThinningType int
const (
	ThinningZhangSuen ThinningType = iota
	ThinningGuoHall
)

type TonemapDurand added in v0.28.0

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

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

func NewTonemapDurand added in v0.28.0

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 added in v0.28.0

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 added in v0.28.0

func (b *TonemapDurand) Close() error

Close TonemapDurand.

func (*TonemapDurand) GetContrast added in v0.28.0

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 added in v0.28.0

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 added in v0.28.0

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 added in v0.28.0

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 added in v0.28.0

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 added in v0.28.0

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 added in v0.28.0

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 added in v0.28.0

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 added in v0.28.0

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 added in v0.28.0

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 added in v0.28.0

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 added in v0.16.0

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 added in v0.16.0

func (trk TrackerCSRT) Close() error

Close closes this Tracker.

func (TrackerCSRT) Init added in v0.16.0

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

Init initializes this Tracker.

func (TrackerCSRT) Update added in v0.16.0

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

Update updates this Tracker.

type TrackerKCF added in v0.16.0

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 added in v0.16.0

func (trk TrackerKCF) Close() error

Close closes this Tracker.

func (TrackerKCF) Init added in v0.16.0

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

Init initializes this Tracker.

func (TrackerKCF) Update added in v0.16.0

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

Update updates this Tracker.

type TransformTypes added in v0.28.0

type TransformTypes int
const (
	Bm3dTypeHaar TransformTypes = 0
)

type WeChatQRCode added in v0.30.0

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

func NewWeChatQRCode added in v0.30.0

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

func (*WeChatQRCode) DetectAndDecode added in v0.30.0

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