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/c

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

Index

Package Files

cgo.go cuda.go cudabgsegm.go cudaoptflow.go cudawarping.go cudawarping_string.go

Constants

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

    // InterpolationLinear is bilinear interpolation.
    InterpolationLinear = 1

    // InterpolationCubic is bicube interpolation.
    InterpolationCubic = 2

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

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

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

    // InterpolationMax indicates use maximum interpolation.
    InterpolationMax = 7
)
const (
    // BorderConstant border type
    BorderConstant BorderType = 0

    // BorderReplicate border type
    BorderReplicate = 1

    // BorderReflect border type
    BorderReflect = 2

    // BorderWrap border type
    BorderWrap = 3

    // BorderReflect101 border type
    BorderReflect101 = 4

    // BorderTransparent border type
    BorderTransparent = 5

    // BorderDefault border type
    BorderDefault = BorderReflect101

    // BorderIsolated border type
    BorderIsolated = 16
)

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 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 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.

func (BorderType) String Uses

func (c BorderType) String() string

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) 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 InterpolationFlags Uses

type InterpolationFlags int

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

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 5 packages (graph). Updated 2019-12-28. Refresh now. Tools for package owners.