gocv: gocv.io/x/gocv/cuda Index | Files

package cuda

import "gocv.io/x/gocv/cuda"

Package cuda is the GoCV wrapper around OpenCV cuda.

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

import "gocv.io/x/gocv/cuda"

Package cuda is the GoCV wrapper around OpenCV cuda.

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

import "gocv.io/x/gocv/cuda"

Index

Package Files

cgo.go core.go cuda.go cudabgsegm.go cudaoptflow.go cudawarping.go cudawarping_string.go imgproc.go objdetect.go

func BuildWarpAffineMaps Uses

func BuildWarpAffineMaps(M GpuMat, inverse bool, sz image.Point, xmap, ymap *GpuMat)

BuildWarpAffineMaps builds transformation maps for affine transformation.

For further details. please see: https://docs.opencv.org/master/db/d29/group__cudawarping.html#ga63504590a96e4cc702d994281d17bc1c

func BuildWarpPerspectiveMaps Uses

func BuildWarpPerspectiveMaps(M GpuMat, inverse bool, sz image.Point, xmap, ymap *GpuMat)

BuildWarpPerspectiveMaps builds transformation maps for perspective transformation.

For further details, please see: https://docs.opencv.org/master/db/d29/group__cudawarping.html#ga8d16e3003703bd3b89cca98c913ef864

func CvtColor Uses

func CvtColor(src GpuMat, dst *GpuMat, code gocv.ColorConversionCode)

CvtColor converts an image from one color space to another. It converts the src Mat image to the dst Mat using the code param containing the desired ColorConversionCode color space.

For further details, please see: https://docs.opencv.org/master/db/d8c/group__cudaimgproc__color.html#ga48d0f208181d5ca370d8ff6b62cbe826

func GetCudaEnabledDeviceCount Uses

func GetCudaEnabledDeviceCount() int

GetCudaEnabledDeviceCount returns the number of cuda enabled devices on the system

func PrintCudaDeviceInfo Uses

func PrintCudaDeviceInfo(device int)

PrintCudaDeviceInfo prints extensive cuda device information

func PrintShortCudaDeviceInfo Uses

func PrintShortCudaDeviceInfo(device int)

PrintShortCudaDeviceInfo prints a small amount of cuda device information

func PyrDown Uses

func PyrDown(src GpuMat, dst *GpuMat)

PyrDown blurs an image and downsamples it.

For further details, please see: https://docs.opencv.org/master/db/d29/group__cudawarping.html#ga9c8456de9792d96431e065f407c7a91b

func PyrUp Uses

func PyrUp(src GpuMat, dst *GpuMat)

PyrUp upsamples an image and then blurs it.

For further details, please see: https://docs.opencv.org/master/db/d29/group__cudawarping.html#ga2048da0dfdb9e4a726232c5cef7e5747

func Remap Uses

func Remap(src GpuMat, dst, xmap, ymap *GpuMat, interpolation InterpolationFlags, borderMode BorderType, borderValue color.RGBA)

Remap applies a generic geometrical transformation to an image.

For further details, please see: https://docs.opencv.org/master/db/d29/group__cudawarping.html#ga0ece6c76e8efa3171adb8432d842beb0

func Resize Uses

func Resize(src GpuMat, dst *GpuMat, sz image.Point, fx, fy float64, interp InterpolationFlags)

Resize resizes an image.

For further details, please see: https://docs.opencv.org/master/db/d29/group__cudawarping.html#ga4f5fa0770d1c9efbadb9be1b92a6452a

func Rotate Uses

func Rotate(src GpuMat, dst *GpuMat, sz image.Point, angle, xShift, yShift float64, interp InterpolationFlags)

Rotate rotates an image around the origin (0,0) and then shifts it.

For further details, please see: https://docs.opencv.org/master/db/d29/group__cudawarping.html#ga55d958eceb0f871e04b1be0adc6ef1b5

func Threshold Uses

func Threshold(src GpuMat, dst *GpuMat, thresh, maxval float64, typ int)

Threshold applies a fixed-level threshold to each array element.

For further details, please see: https://docs.opencv.org/master/d8/d34/group__cudaarithm__elem.html#ga40f1c94ae9a9456df3cad48e3cb008e1

func WarpAffine Uses

func WarpAffine(src GpuMat, dst *GpuMat, m GpuMat, sz image.Point, flags InterpolationFlags, borderType BorderType, borderValue color.RGBA)

WarpAffine applies an affine transformation to an image. For more parameters please check WarpAffineWithParams

For further details, please see: https://docs.opencv.org/master/db/d29/group__cudawarping.html#ga9e8dd9e73b96bdc8e27d85c0e83f1130

func WarpPerspective Uses

func WarpPerspective(src GpuMat, dst *GpuMat, m GpuMat, sz image.Point, flags InterpolationFlags, borderType BorderType, borderValue color.RGBA)

WarpPerspective applies a perspective transformation to an image.

For further details, please see: https://docs.opencv.org/master/db/d29/group__cudawarping.html#ga7a6cf95065536712de6b155f3440ccff

type BackgroundSubtractorMOG Uses

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

BackgroundSubtractorMOG is a wrapper around the cv::cuda::BackgroundSubtractorMOG.

func NewBackgroundSubtractorMOG Uses

func NewBackgroundSubtractorMOG() BackgroundSubtractorMOG

NewBackgroundSubtractorMOG returns a new BackgroundSubtractor algorithm of type MOG. MOG is a Gaussian Mixture-based Background/Foreground Segmentation Algorithm.

For further details, please see: https://docs.opencv.org/master/dc/d3d/cudabgsegm_8hpp.html

func (*BackgroundSubtractorMOG) Apply Uses

func (b *BackgroundSubtractorMOG) Apply(src GpuMat, dst *GpuMat)

Apply computes a foreground mask using the current BackgroundSubtractorMOG.

For further details, please see: https://docs.opencv.org/master/d1/dfe/classcv_1_1cuda_1_1BackgroundSubtractorMOG.html#a8f52d2f7abd1c77c84243efc53972cbf

func (*BackgroundSubtractorMOG) Close Uses

func (b *BackgroundSubtractorMOG) Close() error

Close BackgroundSubtractorMOG.

type BackgroundSubtractorMOG2 Uses

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

BackgroundSubtractorMOG2 is a wrapper around the cv::cuda::BackgroundSubtractorMOG2.

func NewBackgroundSubtractorMOG2 Uses

func NewBackgroundSubtractorMOG2() BackgroundSubtractorMOG2

NewBackgroundSubtractorMOG2 returns a new BackgroundSubtractor algorithm of type MOG2. MOG2 is a Gaussian Mixture-based Background/Foreground Segmentation Algorithm.

For further details, please see: https://docs.opencv.org/master/dc/d3d/cudabgsegm_8hpp.html

func (*BackgroundSubtractorMOG2) Apply Uses

func (b *BackgroundSubtractorMOG2) Apply(src GpuMat, dst *GpuMat)

Apply computes a foreground mask using the current BackgroundSubtractorMOG2.

For further details, please see: https://docs.opencv.org/master/df/d23/classcv_1_1cuda_1_1BackgroundSubtractorMOG2.html#a92408f07bf1268c1b778cb186b3113b0

func (*BackgroundSubtractorMOG2) Close Uses

func (b *BackgroundSubtractorMOG2) Close() error

Close BackgroundSubtractorMOG2.

type BorderType Uses

type BorderType int

BorderType type of border.

const (
    // BorderConstant border type
    BorderConstant BorderType = 0

    // BorderReplicate border type
    BorderReplicate BorderType = 1

    // BorderReflect border type
    BorderReflect BorderType = 2

    // BorderWrap border type
    BorderWrap BorderType = 3

    // BorderReflect101 border type
    BorderReflect101 BorderType = 4

    // BorderTransparent border type
    BorderTransparent BorderType = 5

    // BorderDefault border type
    BorderDefault = BorderReflect101

    // BorderIsolated border type
    BorderIsolated BorderType = 16
)

func (BorderType) String Uses

func (c BorderType) String() string

type CannyEdgeDetector Uses

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

CannyEdgeDetector

For further details, please see: https://docs.opencv.org/master/d0/d43/classcv_1_1cuda_1_1CannyEdgeDetector.html

func CreateCannyEdgeDetector Uses

func CreateCannyEdgeDetector(lowThresh, highThresh float64, appertureSize int, L2gradient bool) CannyEdgeDetector

NewCascadeClassifier_GPU returns a new CascadeClassifier.

func (*CannyEdgeDetector) Detect Uses

func (h *CannyEdgeDetector) Detect(img GpuMat) GpuMat

Detect finds edges in an image using the Canny algorithm.

For further details, please see: https://docs.opencv.org/master/d0/d43/classcv_1_1cuda_1_1CannyEdgeDetector.html#a6438cf8453f2dfd6703ceb50056de309

func (*CannyEdgeDetector) GetAppertureSize Uses

func (h *CannyEdgeDetector) GetAppertureSize() int

GetAppertureSize

For further details, please see: https://docs.opencv.org/master/d0/d43/classcv_1_1cuda_1_1CannyEdgeDetector.html#a19c2963ff255b0c18387594a704439d3

func (*CannyEdgeDetector) GetHighThreshold Uses

func (h *CannyEdgeDetector) GetHighThreshold() float64

GetHighThreshold

For further details, please see: https://docs.opencv.org/master/d0/d43/classcv_1_1cuda_1_1CannyEdgeDetector.html#a8366296a57059487dcfd7b30f4a9e3b1

func (*CannyEdgeDetector) GetL2Gradient Uses

func (h *CannyEdgeDetector) GetL2Gradient() bool

GetL2Gradient

For further details, please see: https://docs.opencv.org/master/d0/d43/classcv_1_1cuda_1_1CannyEdgeDetector.html#a8fe4ed887c226b12ab44084789b4c6dd

func (*CannyEdgeDetector) GetLowThreshold Uses

func (h *CannyEdgeDetector) GetLowThreshold() float64

GetLowThreshold

For further details, please see: https://docs.opencv.org/master/d0/d43/classcv_1_1cuda_1_1CannyEdgeDetector.html#aaf5a8944a8ac11093cf7a093b45cd3a8

func (*CannyEdgeDetector) SetAppertureSize Uses

func (h *CannyEdgeDetector) SetAppertureSize(appertureSize int)

SetAppertureSize

For further details, please see: https://docs.opencv.org/master/d0/d43/classcv_1_1cuda_1_1CannyEdgeDetector.html#aac7d0602338e1a2a783811a929967714

func (*CannyEdgeDetector) SetHighThreshold Uses

func (h *CannyEdgeDetector) SetHighThreshold(highThresh float64)

SetHighThreshold

For further details, please see: https://docs.opencv.org/master/d0/d43/classcv_1_1cuda_1_1CannyEdgeDetector.html#a63d352fe7f3bad640e63f4e394619235

func (*CannyEdgeDetector) SetL2Gradient Uses

func (h *CannyEdgeDetector) SetL2Gradient(L2gradient bool)

SetL2Gradient

For further details, please see: https://docs.opencv.org/master/d0/d43/classcv_1_1cuda_1_1CannyEdgeDetector.html#ac2e8a675cc30cb3e621ac684e22f89d1

func (*CannyEdgeDetector) SetLowThreshold Uses

func (h *CannyEdgeDetector) SetLowThreshold(lowThresh float64)

SetLowThreshold

For further details, please see: https://docs.opencv.org/master/d0/d43/classcv_1_1cuda_1_1CannyEdgeDetector.html#a6bdc1479c1557288a69c6314c61d1548

type CascadeClassifier Uses

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

CascadeClassifier_GPU is a cascade classifier class for object detection.

For further details, please see: https://docs.opencv.org/master/d9/d80/classcv_1_1cuda_1_1CascadeClassifier.html

func NewCascadeClassifier Uses

func NewCascadeClassifier(name string) CascadeClassifier

NewCascadeClassifier_GPU returns a new CascadeClassifier.

func (*CascadeClassifier) DetectMultiScale Uses

func (c *CascadeClassifier) DetectMultiScale(img GpuMat) []image.Rectangle

DetectMultiScale detects objects of different sizes in the input Mat image. The detected objects are returned as a slice of image.Rectangle structs.

For further details, please see: https://docs.opencv.org/master/d9/d80/classcv_1_1cuda_1_1CascadeClassifier.html#a182656b878046eb3f0e9c0f0ee327f08

type DescriptorStorageFormat Uses

type DescriptorStorageFormat int
const (
    DESCR_FORMAT_COL_BY_COL DescriptorStorageFormat = 0

    DESCR_FORMAT_COL_BY_ROW DescriptorStorageFormat = 1
)

type GpuMat Uses

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

GpuMat is the GPU version of a Mat

For further details, please see: https://docs.opencv.org/master/d0/d60/classcv_1_1cuda_1_1GpuMat.html

func NewGpuMat Uses

func NewGpuMat() GpuMat

NewGpuMat returns a new empty GpuMat

func NewGpuMatFromMat Uses

func NewGpuMatFromMat(mat gocv.Mat) GpuMat

NewGpuMatFromMat returns a new GpuMat based on a Mat

func (*GpuMat) Close Uses

func (g *GpuMat) Close() error

Close the GpuMat object

func (*GpuMat) ConvertTo Uses

func (m *GpuMat) ConvertTo(dst *GpuMat, mt gocv.MatType)

ConvertTo converts GpuMat into destination GpuMat.

For further details, please see: https://docs.opencv.org/master/d0/d60/classcv_1_1cuda_1_1GpuMat.html#a3a1b076e54d8a8503014e27a5440d98a

func (*GpuMat) Download Uses

func (g *GpuMat) Download(dst *gocv.Mat)

Download performs data download from GpuMat (Blocking call)

For further details, please see: https://docs.opencv.org/master/d0/d60/classcv_1_1cuda_1_1GpuMat.html#a027e74e4364ddfd9687b58aa5db8d4e8

func (*GpuMat) Empty Uses

func (g *GpuMat) Empty() bool

Empty returns true if GpuMat is empty

func (*GpuMat) Upload Uses

func (g *GpuMat) Upload(data gocv.Mat)

Upload performs data upload to GpuMat (Blocking call)

For further details, please see: https://docs.opencv.org/master/d0/d60/classcv_1_1cuda_1_1GpuMat.html#a00ef5bfe18d14623dcf578a35e40a46b

type HOG Uses

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

HOG is a Histogram Of Gradiants (HOG) for object detection.

For further details, please see: https://docs.opencv.org/master/d5/d33/structcv_1_1HOG.html#a723b95b709cfd3f95cf9e616de988fc8

func CreateHOG Uses

func CreateHOG() HOG

NewHOG returns a new HOG.

func CreateHOGWithParams Uses

func CreateHOGWithParams(winSize, blockSize, blockStride, cellSize image.Point, nbins int) HOG

func (*HOG) Compute Uses

func (h *HOG) Compute(img GpuMat) GpuMat

Compute returns block descriptors computed for the whole image.

For further details, please see: https://docs.opencv.org/master/de/da6/classcv_1_1cuda_1_1HOG.html#ab4287267081959ec77c01269dbfcd373

func (*HOG) DetectMultiScale Uses

func (h *HOG) DetectMultiScale(img GpuMat) []image.Rectangle

DetectMultiScale detects objects in the input Mat image. The detected objects are returned as a slice of image.Rectangle structs.

For further details, please see: https://docs.opencv.org/master/d5/d33/structcv_1_1HOG.html#a660e5cd036fd5ddf0f5767b352acd948

func (*HOG) GetBlockHistogramSize Uses

func (h *HOG) GetBlockHistogramSize() int

GetBlockHistogramSize returns the block histogram size.

For further details, please see: https://docs.opencv.org/master/de/da6/classcv_1_1cuda_1_1HOG.html#a016f9ffced8b2f4b20bdd06a775017d1

func (*HOG) GetDefaultPeopleDetector Uses

func (h *HOG) GetDefaultPeopleDetector() C.Mat

GetDefaultPeopleDetector returns a new Mat with the HOG DefaultPeopleDetector.

For further details, please see: https://docs.opencv.org/master/de/da6/classcv_1_1cuda_1_1HOG.html#a016f9ffced8b2f4b20bdd06a775017d1

func (*HOG) GetDescriptorFormat Uses

func (h *HOG) GetDescriptorFormat() DescriptorStorageFormat

GetDescriptorFormat

For further details, please see: https://docs.opencv.org/master/de/da6/classcv_1_1cuda_1_1HOG.html#adad29ed960a953aa13dc59c410683620

func (*HOG) GetDescriptorSize Uses

func (h *HOG) GetDescriptorSize() int

GetDescriptorFormat returns the number of coefficients required for the classification.

For further details, please see: https://docs.opencv.org/master/de/da6/classcv_1_1cuda_1_1HOG.html#adb8c714cba1a025b8869d5a0e152f824

func (*HOG) GetGammaCorrection Uses

func (h *HOG) GetGammaCorrection() bool

GetGammaCorrection

For further details, please see: https://docs.opencv.org/master/de/da6/classcv_1_1cuda_1_1HOG.html#a7032eed27cf7a004b727a6e522c2404e

func (*HOG) GetGroupThreshold Uses

func (h *HOG) GetGroupThreshold() int

GetGroupThreshold

For further details, please see: https://docs.opencv.org/master/de/da6/classcv_1_1cuda_1_1HOG.html#a7032eed27cf7a004b727a6e522c2404e

func (*HOG) GetHitThreshold Uses

func (h *HOG) GetHitThreshold() float64

GetHitThreshold

For further details, please see: https://docs.opencv.org/master/de/da6/classcv_1_1cuda_1_1HOG.html#ae0de149980ea47fbd39b7766df565b27

func (*HOG) GetL2HysThreshold Uses

func (h *HOG) GetL2HysThreshold() float64

GetL2HysThreshold

For further details, please see: https://docs.opencv.org/master/de/da6/classcv_1_1cuda_1_1HOG.html#a6853c9a66889fed996678f7972df9660

func (*HOG) GetNumLevels Uses

func (h *HOG) GetNumLevels() int

GetNumLevels

For further details, please see: https://docs.opencv.org/master/de/da6/classcv_1_1cuda_1_1HOG.html#a15238eb6f52a1ddeedd015773c46efd8

func (*HOG) GetScaleFactor Uses

func (h *HOG) GetScaleFactor() float64

GetScaleFactor

For further details, please see: https://docs.opencv.org/master/de/da6/classcv_1_1cuda_1_1HOG.html#a89c59564625bb2c691af8c2cf49aab9e

func (*HOG) GetWinSigma Uses

func (h *HOG) GetWinSigma() float64

GetWinSigma

For further details, please see: https://docs.opencv.org/master/de/da6/classcv_1_1cuda_1_1HOG.html#a22d03fa05b251b4f19cfa1fab36e754e

func (*HOG) GetWinStride Uses

func (h *HOG) GetWinStride() image.Point

GetWinStride

For further details, please see: https://docs.opencv.org/master/de/da6/classcv_1_1cuda_1_1HOG.html#a6c63504790b51963ca33496a0b039b48

func (*HOG) SetDescriptorFormat Uses

func (h *HOG) SetDescriptorFormat(descrFormat DescriptorStorageFormat)

SetDescriptorFormat

For further details, please see: https://docs.opencv.org/master/de/da6/classcv_1_1cuda_1_1HOG.html#a6e3e1075a567268f2dfb2151b1c99cb6

func (*HOG) SetGammaCorrection Uses

func (h *HOG) SetGammaCorrection(gammaCorrection bool)

SetGammaCorrection

For further details, please see: https://docs.opencv.org/master/de/da6/classcv_1_1cuda_1_1HOG.html#a0eb2f1ecf59ccc599bffac3a0a55562f

func (*HOG) SetGroupThreshold Uses

func (h *HOG) SetGroupThreshold(groupThreshold int)

SetGroupThreshold

For further details, please see: https://docs.opencv.org/master/de/da6/classcv_1_1cuda_1_1HOG.html#adad9af4e4ed0e0a045a70cd44520eefd

func (*HOG) SetHitThreshold Uses

func (h *HOG) SetHitThreshold(hitThreshold float64)

SetHitThreshold

For further details, please see: https://docs.opencv.org/master/de/da6/classcv_1_1cuda_1_1HOG.html#a8b623393c11d18b89fa373269b97aea4

func (*HOG) SetL2HysThreshold Uses

func (h *HOG) SetL2HysThreshold(thresholdL2hys float64)

SetL2HysThreshold

For further details, please see: https://docs.opencv.org/master/de/da6/classcv_1_1cuda_1_1HOG.html#a30e5c88864fff774f403313993947d62

func (*HOG) SetNumLevels Uses

func (h *HOG) SetNumLevels(nlevels int)

SetNumLevels

For further details, please see: https://docs.opencv.org/master/de/da6/classcv_1_1cuda_1_1HOG.html#a7602088f3e792de196f8f7efcd9bd448

func (*HOG) SetSVMDetector Uses

func (h *HOG) SetSVMDetector(det C.Mat) error

SetSVMDetector sets the data for the HOG.

For further details, please see: https://docs.opencv.org/master/de/da6/classcv_1_1cuda_1_1HOG.html#a5d12db2277b7c3c849d75258eec8d1d4

func (*HOG) SetScaleFactor Uses

func (h *HOG) SetScaleFactor(scale0 float64)

SetScaleFactor

For further details, please see: https://docs.opencv.org/master/de/da6/classcv_1_1cuda_1_1HOG.html#a21dc5e3dc6272030694d52e83352b337

func (*HOG) SetWinSigma Uses

func (h *HOG) SetWinSigma(winSigma float64)

SetWinSigma

For further details, please see: https://docs.opencv.org/master/de/da6/classcv_1_1cuda_1_1HOG.html#ab291779ff8ac649174b102f64c5f9012

func (*HOG) SetWinStride Uses

func (h *HOG) SetWinStride(sz image.Point)

SetWinStride

For further details, please see: https://docs.opencv.org/master/de/da6/classcv_1_1cuda_1_1HOG.html#a5e74646651209ae13f1b3dd18179773f

type InterpolationFlags Uses

type InterpolationFlags int

InterpolationFlags are bit flags that control the interpolation algorithm that is used.

const (
    // InterpolationNearestNeighbor is nearest neighbor. (fast but low quality)
    InterpolationNearestNeighbor InterpolationFlags = 0

    // InterpolationLinear is bilinear interpolation.
    InterpolationLinear InterpolationFlags = 1

    // InterpolationCubic is bicube interpolation.
    InterpolationCubic InterpolationFlags = 2

    // InterpolationArea uses pixel area relation. It is preferred for image
    // decimation as it gives moire-free results.
    InterpolationArea InterpolationFlags = 3

    // InterpolationLanczos4 is Lanczos interpolation over 8x8 neighborhood.
    InterpolationLanczos4 InterpolationFlags = 4

    // InterpolationDefault is an alias for InterpolationLinear.
    InterpolationDefault = InterpolationLinear

    // InterpolationMax indicates use maximum interpolation.
    InterpolationMax InterpolationFlags = 7
)

func (InterpolationFlags) String Uses

func (c InterpolationFlags) String() string

type SparsePyrLKOpticalFlow Uses

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

SparsePyrLKOpticalFlow is a wrapper around the cv::cuda::SparsePyrLKOpticalFlow.

func NewSparsePyrLKOpticalFlow Uses

func NewSparsePyrLKOpticalFlow() SparsePyrLKOpticalFlow

NewSparsePyrLKOpticalFlow returns a new SparsePyrLKOpticalFlow

For further details, please see: https://docs.opencv.org/master/d7/d05/classcv_1_1cuda_1_1SparsePyrLKOpticalFlow.html#a6bcd2d457532d7db76c3e7f11b60063b

func (SparsePyrLKOpticalFlow) Calc Uses

func (s SparsePyrLKOpticalFlow) Calc(prevImg, nextImg, prevPts, nextPts, status GpuMat)

Calc calculates a sparse optical flow.

For further details, please see: https://docs.opencv.org/master/d5/dcf/classcv_1_1cuda_1_1SparseOpticalFlow.html#a80d5efbb7788e3dc4c49e6226ba34347

Package cuda imports 6 packages (graph). Updated 2021-01-15. Refresh now. Tools for package owners.