go-opencv: github.com/lazywei/go-opencv/opencv Index | Files

package opencv

import "github.com/lazywei/go-opencv/opencv"

Bindings for Intel's OpenCV computer vision library.

Index

Package Files

cluster.go cv.go cvaux.go cxcore.go cxtype.go doc.go goimage.go highgui.go imgproc.go opencv.go

Constants

const (
    /* Select random initial centers in each attempt. */
    KMEANS_RANDOM_CENTERS = 0

    /* Use kmeans++ center initialization by Arthur and Vassilvitskii [Arthur2007]. */
    KMEANS_PP_CENTERS = 2
)
const (
    CV_BGR2GRAY  = C.CV_BGR2GRAY
    CV_RGB2GRAY  = C.CV_RGB2GRAY
    CV_GRAY2BGR  = C.CV_GRAY2BGR
    CV_GRAY2RGB  = C.CV_GRAY2RGB
    CV_BGR2BGRA  = C.CV_BGR2BGRA
    CV_RGBA2BGRA = C.CV_RGBA2BGRA

    CV_BLUR_NO_SCALE = C.CV_BLUR_NO_SCALE
    CV_BLUR          = C.CV_BLUR
    CV_GAUSSIAN      = C.CV_GAUSSIAN
    CV_MEDIAN        = C.CV_MEDIAN
    CV_BILATERAL     = C.CV_BILATERAL

    CV_8U  = C.CV_8U
    CV_8S  = C.CV_8S
    CV_16U = C.CV_16U
    CV_16S = C.CV_16S
    CV_32S = C.CV_32S
    CV_32F = C.CV_32F
    CV_64F = C.CV_64F
)
const (
    CV_INPAINT_NS    = C.CV_INPAINT_NS
    CV_INPAINT_TELEA = C.CV_INPAINT_TELEA
)
const (
    CV_THRESH_BINARY     = C.CV_THRESH_BINARY
    CV_THRESH_BINARY_INV = C.CV_THRESH_BINARY_INV
    CV_THRESH_TRUNC      = C.CV_THRESH_TRUNC
    CV_THRESH_TOZERO     = C.CV_THRESH_TOZERO
    CV_THRESH_TOZERO_INV = C.CV_THRESH_TOZERO_INV
)
const (
    CV_ADAPTIVE_THRESH_MEAN_C     = C.CV_ADAPTIVE_THRESH_MEAN_C
    CV_ADAPTIVE_THRESH_GAUSSIAN_C = C.CV_ADAPTIVE_THRESH_GAUSSIAN_C
)
const (
    CV_MORPH_RECT    = 0
    CV_MORPH_ELLIPSE = 1
    CV_MORPH_CROSS   = 2
)
const (
    CV_MORPH_OPEN     = C.CV_MOP_OPEN
    CV_MORPH_CLOSE    = C.CV_MOP_CLOSE
    CV_MORPH_GRADIENT = C.CV_MOP_GRADIENT
    CV_MORPH_TOPHAT   = C.CV_MOP_TOPHAT
    CV_MORPH_BLACKHAT = C.CV_MOP_BLACKHAT
)
const (
    // different sequence flags to use in CreateSeq()
    CV_SEQ_ELTYPE_POINT   = C.CV_SEQ_ELTYPE_POINT
    CV_32FC2              = C.CV_32FC2
    CV_SEQ_ELTYPE_POINT3D = C.CV_SEQ_ELTYPE_POINT3D
)
const (
    CV_FONT_HERSHEY_SIMPLEX        = int(C.CV_FONT_HERSHEY_SIMPLEX)
    CV_FONT_HERSHEY_PLAIN          = int(C.CV_FONT_HERSHEY_PLAIN)
    CV_FONT_HERSHEY_DUPLEX         = int(C.CV_FONT_HERSHEY_DUPLEX)
    CV_FONT_HERSHEY_COMPLEX        = int(C.CV_FONT_HERSHEY_COMPLEX)
    CV_FONT_HERSHEY_TRIPLEX        = int(C.CV_FONT_HERSHEY_TRIPLEX)
    CV_FONT_HERSHEY_COMPLEX_SMALL  = int(C.CV_FONT_HERSHEY_COMPLEX_SMALL)
    CV_FONT_HERSHEY_SCRIPT_SIMPLEX = int(C.CV_FONT_HERSHEY_SCRIPT_SIMPLEX)
    CV_FONT_HERSHEY_SCRIPT_COMPLEX = int(C.CV_FONT_HERSHEY_SCRIPT_COMPLEX)
    CV_FONT_ITALIC                 = int(C.CV_FONT_ITALIC)
)
const (
    CV_MAJOR_VERSION    = int(C.CV_MAJOR_VERSION)
    CV_MINOR_VERSION    = int(C.CV_MINOR_VERSION)
    CV_SUBMINOR_VERSION = int(C.CV_SUBMINOR_VERSION)
)
const (
    CV_StsOk                     = C.CV_StsOk
    CV_StsBackTrace              = C.CV_StsBackTrace
    CV_StsError                  = C.CV_StsError
    CV_StsInternal               = C.CV_StsInternal
    CV_StsNoMem                  = C.CV_StsNoMem
    CV_StsBadArg                 = C.CV_StsBadArg
    CV_StsBadFunc                = C.CV_StsBadFunc
    CV_StsNoConv                 = C.CV_StsNoConv
    CV_StsAutoTrace              = C.CV_StsAutoTrace
    CV_HeaderIsNull              = C.CV_HeaderIsNull
    CV_BadImageSize              = C.CV_BadImageSize
    CV_BadOffset                 = C.CV_BadOffset
    CV_BadDataPtr                = C.CV_BadDataPtr
    CV_BadStep                   = C.CV_BadStep
    CV_BadModelOrChSeq           = C.CV_BadModelOrChSeq
    CV_BadNumChannels            = C.CV_BadNumChannels
    CV_BadNumChannel1U           = C.CV_BadNumChannel1U
    CV_BadDepth                  = C.CV_BadDepth
    CV_BadAlphaChannel           = C.CV_BadAlphaChannel
    CV_BadOrder                  = C.CV_BadOrder
    CV_BadOrigin                 = C.CV_BadOrigin
    CV_BadAlign                  = C.CV_BadAlign
    CV_BadCallBack               = C.CV_BadCallBack
    CV_BadTileSize               = C.CV_BadTileSize
    CV_BadCOI                    = C.CV_BadCOI
    CV_BadROISize                = C.CV_BadROISize
    CV_MaskIsTiled               = C.CV_MaskIsTiled
    CV_StsNullPtr                = C.CV_StsNullPtr
    CV_StsVecLengthErr           = C.CV_StsVecLengthErr
    CV_StsFilterStructContentErr = C.CV_StsFilterStructContentErr
    CV_StsKernelStructContentErr = C.CV_StsKernelStructContentErr
    CV_StsFilterOffsetErr        = C.CV_StsFilterOffsetErr
    CV_StsBadSize                = C.CV_StsBadSize
    CV_StsDivByZero              = C.CV_StsDivByZero
    CV_StsInplaceNotSupported    = C.CV_StsInplaceNotSupported
    CV_StsObjectNotFound         = C.CV_StsObjectNotFound
    CV_StsUnmatchedFormats       = C.CV_StsUnmatchedFormats
    CV_StsBadFlag                = C.CV_StsBadFlag
    CV_StsBadPoint               = C.CV_StsBadPoint
    CV_StsBadMask                = C.CV_StsBadMask
    CV_StsUnmatchedSizes         = C.CV_StsUnmatchedSizes
    CV_StsUnsupportedFormat      = C.CV_StsUnsupportedFormat
    CV_StsOutOfRange             = C.CV_StsOutOfRange
    CV_StsParseError             = C.CV_StsParseError
    CV_StsNotImplemented         = C.CV_StsNotImplemented
    CV_StsBadMemBlock            = C.CV_StsBadMemBlock
    CV_StsAssert                 = C.CV_StsAssert
)
const (
    CV_PI   = 3.1415926535897932384626433832795
    CV_LOG2 = 0.69314718055994530941723212145818
)
const (
    IPL_DEPTH_SIGN = C.IPL_DEPTH_SIGN

    IPL_DEPTH_1U  = C.IPL_DEPTH_1U
    IPL_DEPTH_8U  = C.IPL_DEPTH_8U
    IPL_DEPTH_16U = C.IPL_DEPTH_16U
    IPL_DEPTH_32F = C.IPL_DEPTH_32F

    IPL_DEPTH_8S  = C.IPL_DEPTH_8S
    IPL_DEPTH_16S = C.IPL_DEPTH_16S
    IPL_DEPTH_32S = C.IPL_DEPTH_32S

    IPL_DATA_ORDER_PIXEL = C.IPL_DATA_ORDER_PIXEL
    IPL_DATA_ORDER_PLANE = C.IPL_DATA_ORDER_PLANE

    IPL_ORIGIN_TL = C.IPL_ORIGIN_TL
    IPL_ORIGIN_BL = C.IPL_ORIGIN_BL

    IPL_ALIGN_4BYTES  = C.IPL_ALIGN_4BYTES
    IPL_ALIGN_8BYTES  = C.IPL_ALIGN_8BYTES
    IPL_ALIGN_16BYTES = C.IPL_ALIGN_16BYTES
    IPL_ALIGN_32BYTES = C.IPL_ALIGN_32BYTES

    IPL_ALIGN_DWORD = C.IPL_ALIGN_DWORD
    IPL_ALIGN_QWORD = C.IPL_ALIGN_QWORD

    IPL_BORDER_CONSTANT  = C.IPL_BORDER_CONSTANT
    IPL_BORDER_REPLICATE = C.IPL_BORDER_REPLICATE
    IPL_BORDER_REFLECT   = C.IPL_BORDER_REFLECT
    IPL_BORDER_WRAP      = C.IPL_BORDER_WRAP
)

* The following definitions (until #endif) * is an extract from IPL headers. * Copyright (c) 1995 Intel Corporation.

const (
    IPL_IMAGE_HEADER = C.IPL_IMAGE_HEADER
    IPL_IMAGE_DATA   = C.IPL_IMAGE_DATA
    IPL_IMAGE_ROI    = C.IPL_IMAGE_ROI
)
const (
    CV_MATND_MAGIC_VAL = C.CV_MATND_MAGIC_VAL
    CV_TYPE_NAME_MATND = C.CV_TYPE_NAME_MATND

    CV_MAX_DIM      = C.CV_MAX_DIM
    CV_MAX_DIM_HEAP = C.CV_MAX_DIM_HEAP
)
const (
    CV_SPARSE_MAT_MAGIC_VAL = C.CV_SPARSE_MAT_MAGIC_VAL
    CV_TYPE_NAME_SPARSE_MAT = C.CV_TYPE_NAME_SPARSE_MAT
)
const (
    CV_HIST_MAGIC_VAL    = C.CV_HIST_MAGIC_VAL
    CV_HIST_UNIFORM_FLAG = C.CV_HIST_UNIFORM_FLAG

    /* indicates whether bin ranges are set already or not */
    CV_HIST_RANGES_FLAG = C.CV_HIST_RANGES_FLAG

    CV_HIST_ARRAY  = C.CV_HIST_ARRAY
    CV_HIST_SPARSE = C.CV_HIST_SPARSE
    CV_HIST_TREE   = C.CV_HIST_TREE

    /* should be used as a parameter only,
       it turns to CV_HIST_UNIFORM_FLAG of hist->type */
    CV_HIST_UNIFORM = C.CV_HIST_UNIFORM
)
const (
    CV_TERMCRIT_ITER   = C.CV_TERMCRIT_ITER
    CV_TERMCRIT_NUMBER = C.CV_TERMCRIT_NUMBER
    CV_TERMCRIT_EPS    = C.CV_TERMCRIT_EPS
)
const (
    CV_RETR_EXTERNAL = C.CV_RETR_EXTERNAL
    CV_RETR_LIST     = C.CV_RETR_LIST
    CV_RETR_CCOMP    = C.CV_RETR_CCOMP
    CV_RETR_TREE     = C.CV_RETR_TREE

    CV_CHAIN_APPROX_NONE      = C.CV_CHAIN_APPROX_NONE
    CV_CHAIN_APPROX_SIMPLE    = C.CV_CHAIN_APPROX_SIMPLE
    CV_CHAIN_APPROX_TC89_L1   = C.CV_CHAIN_APPROX_TC89_L1
    CV_CHAIN_APPROX_TC89_KCOS = C.CV_CHAIN_APPROX_TC89_KCOS
)
const (
    CV_STORAGE_READ         = C.CV_STORAGE_READ
    CV_STORAGE_WRITE        = C.CV_STORAGE_WRITE
    CV_STORAGE_WRITE_TEXT   = C.CV_STORAGE_WRITE_TEXT
    CV_STORAGE_WRITE_BINARY = C.CV_STORAGE_WRITE_BINARY
    CV_STORAGE_APPEND       = C.CV_STORAGE_APPEND
)

Storage flags:

const (
    CV_WND_PROP_FULLSCREEN = int(C.CV_WND_PROP_FULLSCREEN)
    CV_WND_PROP_AUTOSIZE   = int(C.CV_WND_PROP_AUTOSIZE)
    CV_WINDOW_NORMAL       = int(C.CV_WINDOW_NORMAL)
    CV_WINDOW_FULLSCREEN   = int(C.CV_WINDOW_FULLSCREEN)
)

--------- YV ---------

const (
    CV_EVENT_MOUSEMOVE     = int(C.CV_EVENT_MOUSEMOVE)
    CV_EVENT_LBUTTONDOWN   = int(C.CV_EVENT_LBUTTONDOWN)
    CV_EVENT_RBUTTONDOWN   = int(C.CV_EVENT_RBUTTONDOWN)
    CV_EVENT_MBUTTONDOWN   = int(C.CV_EVENT_MBUTTONDOWN)
    CV_EVENT_LBUTTONUP     = int(C.CV_EVENT_LBUTTONUP)
    CV_EVENT_RBUTTONUP     = int(C.CV_EVENT_RBUTTONUP)
    CV_EVENT_MBUTTONUP     = int(C.CV_EVENT_MBUTTONUP)
    CV_EVENT_LBUTTONDBLCLK = int(C.CV_EVENT_LBUTTONDBLCLK)
    CV_EVENT_RBUTTONDBLCLK = int(C.CV_EVENT_RBUTTONDBLCLK)
    CV_EVENT_MBUTTONDBLCLK = int(C.CV_EVENT_MBUTTONDBLCLK)

    CV_EVENT_FLAG_LBUTTON  = int(C.CV_EVENT_FLAG_LBUTTON)
    CV_EVENT_FLAG_RBUTTON  = int(C.CV_EVENT_FLAG_RBUTTON)
    CV_EVENT_FLAG_MBUTTON  = int(C.CV_EVENT_FLAG_MBUTTON)
    CV_EVENT_FLAG_CTRLKEY  = int(C.CV_EVENT_FLAG_CTRLKEY)
    CV_EVENT_FLAG_SHIFTKEY = int(C.CV_EVENT_FLAG_SHIFTKEY)
    CV_EVENT_FLAG_ALTKEY   = int(C.CV_EVENT_FLAG_ALTKEY)
)
const (
    /* 8bit, color or not */
    CV_LOAD_IMAGE_UNCHANGED = int(C.CV_LOAD_IMAGE_UNCHANGED)
    /* 8bit, gray */
    CV_LOAD_IMAGE_GRAYSCALE = int(C.CV_LOAD_IMAGE_GRAYSCALE)
    /* ?, color */
    CV_LOAD_IMAGE_COLOR = int(C.CV_LOAD_IMAGE_COLOR)
    /* any depth, ? */
    CV_LOAD_IMAGE_ANYDEPTH = int(C.CV_LOAD_IMAGE_ANYDEPTH)
    /* ?, any color */
    CV_LOAD_IMAGE_ANYCOLOR = int(C.CV_LOAD_IMAGE_ANYCOLOR)
)
const (
    CV_IMWRITE_JPEG_QUALITY    = int(C.CV_IMWRITE_JPEG_QUALITY)
    CV_IMWRITE_PNG_COMPRESSION = int(C.CV_IMWRITE_PNG_COMPRESSION)
    CV_IMWRITE_PXM_BINARY      = int(C.CV_IMWRITE_PXM_BINARY)
)
const (
    CV_CVTIMG_FLIP    = int(C.CV_CVTIMG_FLIP)
    CV_CVTIMG_SWAP_RB = int(C.CV_CVTIMG_SWAP_RB)
)
const (
    CV_CAP_ANY = int(C.CV_CAP_ANY) // autodetect

    CV_CAP_MIL = int(C.CV_CAP_MIL) // MIL proprietary drivers

    CV_CAP_VFW  = int(C.CV_CAP_VFW) // platform native
    CV_CAP_V4L  = int(C.CV_CAP_V4L)
    CV_CAP_V4L2 = int(C.CV_CAP_V4L2)

    CV_CAP_FIREWARE = int(C.CV_CAP_FIREWARE) // IEEE 1394 drivers
    CV_CAP_FIREWIRE = int(C.CV_CAP_FIREWIRE)
    CV_CAP_IEEE1394 = int(C.CV_CAP_IEEE1394)
    CV_CAP_DC1394   = int(C.CV_CAP_DC1394)
    CV_CAP_CMU1394  = int(C.CV_CAP_CMU1394)

    CV_CAP_STEREO = int(C.CV_CAP_STEREO) // TYZX proprietary drivers
    CV_CAP_TYZX   = int(C.CV_CAP_TYZX)
    CV_TYZX_LEFT  = int(C.CV_TYZX_LEFT)
    CV_TYZX_RIGHT = int(C.CV_TYZX_RIGHT)
    CV_TYZX_COLOR = int(C.CV_TYZX_COLOR)
    CV_TYZX_Z     = int(C.CV_TYZX_Z)

    CV_CAP_QT = int(C.CV_CAP_QT) // QuickTime

    CV_CAP_UNICAP = int(C.CV_CAP_UNICAP) // Unicap drivers

    CV_CAP_DSHOW = int(C.CV_CAP_DSHOW) // DirectShow (via videoInput)

    CV_CAP_PVAPI = int(C.CV_CAP_PVAPI) // PvAPI, Prosilica GigE SDK
)
const (
    CV_CAP_PROP_POS_MSEC      = int(C.CV_CAP_PROP_POS_MSEC)
    CV_CAP_PROP_POS_FRAMES    = int(C.CV_CAP_PROP_POS_FRAMES)
    CV_CAP_PROP_POS_AVI_RATIO = int(C.CV_CAP_PROP_POS_AVI_RATIO)
    CV_CAP_PROP_FRAME_WIDTH   = int(C.CV_CAP_PROP_FRAME_WIDTH)
    CV_CAP_PROP_FRAME_HEIGHT  = int(C.CV_CAP_PROP_FRAME_HEIGHT)
    CV_CAP_PROP_FPS           = int(C.CV_CAP_PROP_FPS)
    CV_CAP_PROP_FOURCC        = int(C.CV_CAP_PROP_FOURCC)
    CV_CAP_PROP_FRAME_COUNT   = int(C.CV_CAP_PROP_FRAME_COUNT)
    CV_CAP_PROP_FORMAT        = int(C.CV_CAP_PROP_FORMAT)
    CV_CAP_PROP_MODE          = int(C.CV_CAP_PROP_MODE)
    CV_CAP_PROP_BRIGHTNESS    = int(C.CV_CAP_PROP_BRIGHTNESS)
    CV_CAP_PROP_CONTRAST      = int(C.CV_CAP_PROP_CONTRAST)
    CV_CAP_PROP_SATURATION    = int(C.CV_CAP_PROP_SATURATION)
    CV_CAP_PROP_HUE           = int(C.CV_CAP_PROP_HUE)
    CV_CAP_PROP_GAIN          = int(C.CV_CAP_PROP_GAIN)
    CV_CAP_PROP_EXPOSURE      = int(C.CV_CAP_PROP_EXPOSURE)
    CV_CAP_PROP_CONVERT_RGB   = int(C.CV_CAP_PROP_CONVERT_RGB)
    // CV_CAP_PROP_WHITE_BALANCE = int(C.CV_CAP_PROP_WHITE_BALANCE)
    CV_CAP_PROP_RECTIFICATION = int(C.CV_CAP_PROP_RECTIFICATION)
)
const (
    CV_INTER_NN       = int(C.CV_INTER_NN)
    CV_INTER_LINEAR   = int(C.CV_INTER_LINEAR)
    CV_INTER_CUBIC    = int(C.CV_INTER_CUBIC)
    CV_INTER_AREA     = int(C.CV_INTER_AREA)
    CV_INTER_LANCZOS4 = int(C.CV_INTER_LANCZOS4)
)
const (
    CV_WARP_FILL_OUTLIERS = int(C.CV_WARP_FILL_OUTLIERS)
    CV_WARP_INVERSE_MAP   = int(C.CV_WARP_INVERSE_MAP)
)

For use with WarpPerspective

const (
    CV_AUTOSTEP = C.CV_AUTOSTEP
)

mat step

const (
    /* Open Codec Selection Dialog (Windows only) */
    CV_FOURCC_PROMPT = int(C.CV_FOURCC_PROMPT)
)
const (
    CV_POLY_APPROX_DP = C.CV_POLY_APPROX_DP
)

For use in ApproxPoly

const (
    CV_WHOLE_SEQ_END_INDEX = C.CV_WHOLE_SEQ_END_INDEX
)
const (
    CV_WINDOW_AUTOSIZE = C.CV_WINDOW_AUTOSIZE
)
const (
    IPL_DEPTH_64F = int(C.IPL_DEPTH_64F)
)

Variables

var (
    IPL_IMAGE_MAGIC_VAL = C.IPL_IMAGE_MAGIC_VAL_()
    CV_TYPE_NAME_IMAGE  = C.CV_TYPE_NAME_IMAGE_()
)

extra border mode

func AbsDiff Uses

func AbsDiff(src1, src2, dst *IplImage)

Calculates the per-element absolute difference between two arrays.

func AbsDiffScalar Uses

func AbsDiffScalar(src *IplImage, value Scalar, dst *IplImage)

Calculates the per-element absolute difference between an array and a scalar.

func AdaptiveThreshold Uses

func AdaptiveThreshold(src, dst *IplImage, max_value float64, adaptive_method,
    threshold_type, block_size int, thresh_C float64)

Applies an adaptive threshold to an array.

func Add Uses

func Add(src1, src2, dst *IplImage)

Calculates the per-element sum of two arrays.

dst = src1 + src2

func AddScalar Uses

func AddScalar(src *IplImage, value Scalar, dst *IplImage)

Calculates the per-element sum of an array and a scalar.

dst = src + value

func AddScalarWithMask Uses

func AddScalarWithMask(src *IplImage, value Scalar, dst, mask *IplImage)

Calculates the per-element sum of an array and a scalar with a mask.

dst = src + value

func AddWeighted Uses

func AddWeighted(src1 *IplImage, alpha float64, src2 *IplImage, beta float64, gamma float64, dst *IplImage)

AddWeighted calculates the weighted sum of two images.

func AddWithMask Uses

func AddWithMask(src1, src2, dst, mask *IplImage)

Calculates the per-element sum of two arrays with a mask.

dst = src1 + src2

func Alloc Uses

func Alloc(size int) unsafe.Pointer

func And Uses

func And(src1, src2, dst *IplImage)

Calculates the per-element bit-wise conjunction of two arrays.

func AndScalar Uses

func AndScalar(src *IplImage, value Scalar, dst *IplImage)

Calculates the per-element bit-wise conjunction of an array and a scalar.

func AndScalarWithMask Uses

func AndScalarWithMask(src *IplImage, value Scalar, dst, mask *IplImage)

Calculates the per-element bit-wise conjunction of an array and a scalar with a mask.

func AndWithMask Uses

func AndWithMask(src1, src2, dst, mask *IplImage)

Calculates the per-element bit-wise conjunction of two arrays with a mask.

func ArcLength Uses

func ArcLength(curve *Seq, slice Slice, is_closed bool) float64

cvArcLength(const void* curve, CvSlice slice=CV_WHOLE_SEQ, int is_closed=-1 )

func CV_ARE_TYPE_EQ Uses

func CV_ARE_TYPE_EQ() bool

func CV_HIST_HAS_RANGES Uses

func CV_HIST_HAS_RANGES() bool

func CV_IS_HIST Uses

func CV_IS_HIST() bool

func CV_IS_IMAGE Uses

func CV_IS_IMAGE(img unsafe.Pointer) bool

func CV_IS_IMAGE_HDR Uses

func CV_IS_IMAGE_HDR(img unsafe.Pointer) bool

func CV_IS_MASK_ARR Uses

func CV_IS_MASK_ARR() bool

func CV_IS_MAT Uses

func CV_IS_MAT(mat interface{}) bool

func CV_IS_MAT_HDR Uses

func CV_IS_MAT_HDR(mat interface{}) bool

func CV_IS_SPARSE_HIST Uses

func CV_IS_SPARSE_HIST() bool

func CV_IS_UNIFORM_HIST Uses

func CV_IS_UNIFORM_HIST() bool

func Canny Uses

func Canny(image, edges *IplImage, threshold1, threshold2 float64, aperture_size int)

Runs canny edge detector

func Ceil Uses

func Ceil(value float64) int

func Circle Uses

func Circle(image *IplImage, pt1 Point, radius int, color Scalar, thickness, line_type, shift int)

func ContourArea Uses

func ContourArea(contour *Seq, slice Slice, oriented int) float64

double cvContourArea(const CvArr* contour, CvSlice slice=CV_WHOLE_SEQ, int oriented=0 )

func ContourPerimeter Uses

func ContourPerimeter(curve *Seq) float64

func ConvertImage Uses

func ConvertImage(src, dst unsafe.Pointer, flags int)

utility function: convert one image to another with optional vertical flip

func ConvertScale Uses

func ConvertScale(a, b *IplImage, scale, shift float64)

ConvertScale converts one image to another with optional linear transformation.

func Copy Uses

func Copy(src, dst, mask *IplImage)

Copies source array to destination array

func CvtColor Uses

func CvtColor(src, dst *IplImage, code int)

Converts input array pixels from one color space to another

func DecRefData Uses

func DecRefData(arr Arr)

Decrements CvMat data reference counter and deallocates the data if

it reaches 0

func DestroyAllWindows Uses

func DestroyAllWindows()

destroy window and all the trackers associated with it

func Dilate Uses

func Dilate(src, dst *IplImage, element *IplConvKernel, iterations int)

Dilates an image by using a specific structuring element.

func DrawContours Uses

func DrawContours(image *IplImage, contours *Seq, externalColor, holeColor Scalar, maxLevel, thickness, lineType int, offset Point)

cvDrawContours(CvArr* img, CvSeq* contour, CvScalar externalColor, CvScalar holeColor, int maxLevel, int thickness=1, int lineType=8

func Erode Uses

func Erode(src, dst *IplImage, element *IplConvKernel, iterations int)

Erodes an image by using a specific structuring element.

func FOURCC Uses

func FOURCC(c1, c2, c3, c4 int8) uint32

Prototype for CV_FOURCC so that swig can generate wrapper without mixing up the define

func Floor Uses

func Floor(value float64) int

func Free Uses

func Free(p unsafe.Pointer)

func GetSizeHeight Uses

func GetSizeHeight(img *IplImage) int

func GetSizeWidth Uses

func GetSizeWidth(img *IplImage) int

Returns width and height of array in elements

func IncRefData Uses

func IncRefData(arr Arr)

Increments CvMat data reference counter

func Inpaint Uses

func Inpaint(src, inpaint_mask, dst *IplImage, inpaintRange float64, flags int)

Inpaints the selected region in the image

func IplDepth Uses

func IplDepth(type_ int) int

func IsInf Uses

func IsInf(value float64) int

func IsNaN Uses

func IsNaN(value float64) int

func Laplace Uses

func Laplace(src, dst *IplImage, aperture_size int)

Laplace The function calculates the Laplacian

func Line Uses

func Line(image *IplImage, pt1, pt2 Point, color Scalar, thickness, line_type, shift int)
Draws 4-connected, 8-connected or antialiased line segment connecting two points

color Scalar,

func MeanStdDevWithMask Uses

func MeanStdDevWithMask(src, mask *IplImage) (Scalar, Scalar)

MeanStdDevWithMask calculates mean and standard deviation of pixel values with mask

func Merge Uses

func Merge(imgBlue, imgGreen, imgRed, imgAlpha, dst *IplImage)

Merge creates one multichannel array out of several single-channel ones.

func MorphologyEx Uses

func MorphologyEx(src, dst, temp *IplImage, element *IplConvKernel, operation int, iterations int)

Performs advanced morphological transformations.

func Not Uses

func Not(src, dst *IplImage)

Inverts every bit of an array.

func Or Uses

func Or(src1, src2, dst *IplImage)

Calculates the per-element bit-wise disjunction of two arrays.

func OrScalar Uses

func OrScalar(src *IplImage, value Scalar, dst *IplImage)

Calculates the per-element bit-wise disjunction of an array and a scalar.

func OrScalarWithMask Uses

func OrScalarWithMask(src *IplImage, value Scalar, dst, mask *IplImage)

Calculates the per-element bit-wise disjunction of an array and a scalar with a mask.

func OrWithMask Uses

func OrWithMask(src1, src2, dst, mask *IplImage)

Calculates the per-element bit-wise disjunction of two arrays with a mask.

func RawDataToScalar Uses

func RawDataToScalar(data unsafe.Pointer, type_ int, scalar *Scalar)

func Rectangle Uses

func Rectangle(image *IplImage, pt1, pt2 Point, color Scalar, thickness, line_type, shift int)

func Round Uses

func Round(value float64) int

func SaveImage Uses

func SaveImage(filename string, image *IplImage, params []int) int

save image to file

func ScalarToRawData Uses

func ScalarToRawData(scalar *Scalar, data unsafe.Pointer, type_, extend_to_12 int)

low-level scalar <-> raw data conversion functions

func Smooth Uses

func Smooth(src, dst *IplImage, smoothtype,
    param1, param2 int, param3, param4 float64)

Smoothes array (removes noise)

func Sobel Uses

func Sobel(src, dst *IplImage, xorder, yorder, aperture_size int)
Calculates the first, second, third, or mixed image derivatives using an

* extended Sobel operator.

func Split Uses

func Split(src, imgBlue, imgGreen, imgRed, imgAlpha *IplImage)

Split divides a multi-channel array into several single-channel arrays.

func StartWindowThread Uses

func StartWindowThread() int

func SubScalar Uses

func SubScalar(src *IplImage, value Scalar, dst *IplImage)

Calculates the per-element difference between an array and a scalar.

dst = src - value

func SubScalarRev Uses

func SubScalarRev(value Scalar, src, dst *IplImage)

Calculates the per-element difference between a scalar and an array.

dst = value - src

func SubScalarWithMask Uses

func SubScalarWithMask(src *IplImage, value Scalar, dst, mask *IplImage)

Calculates the per-element difference between an array and a scalar with a mask.

dst = src - value

func SubScalarWithMaskRev Uses

func SubScalarWithMaskRev(value Scalar, src, dst, mask *IplImage)

Calculates the per-element difference between a scalar and an array with a mask.

dst = value - src

func Subtract Uses

func Subtract(src1, src2, dst *IplImage)

Calculates the per-element difference between two arrays.

dst = src1 - src2

func SubtractWithMask Uses

func SubtractWithMask(src1, src2, dst, mask *IplImage)

Calculates the per-element difference between two arrays with a mask.

dst = src1 - src2

func Threshold Uses

func Threshold(src, dst *IplImage, threshold, max_value float64, threshold_type int)

Applies a fixed-level threshold to each array element.

func WaitKey Uses

func WaitKey(delay int) int

wait for key event infinitely (delay<=0) or for "delay" milliseconds

func WarpPerspective Uses

func WarpPerspective(src, dst *IplImage, mapMatrix *Mat, flags int, fillVal Scalar)

WarpPerspective applies a perspective transformation to an image.

Parameters:

src - input image
dst – output image
mapMatrix – 3x3 transformation matrix
flags – combination of interpolation methods. In the C version, it is `flags=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS` by default
fillVal - In the C version, it is `fillval=(0, 0, 0, 0)` by default

func Xor Uses

func Xor(src1, src2, dst *IplImage)

Calculates the per-element bit-wise “exclusive or” operation on two arrays.

func XorScalar Uses

func XorScalar(src *IplImage, value Scalar, dst *IplImage)

Calculates the per-element bit-wise “exclusive or” operation on an array and a scalar.

func XorScalarWithMask Uses

func XorScalarWithMask(src *IplImage, value Scalar, dst, mask *IplImage)

Calculates the per-element bit-wise “exclusive or” operation on an array and a scalar with a mask.

func XorWithMask Uses

func XorWithMask(src1, src2, dst, mask *IplImage)

Calculates the per-element bit-wise “exclusive or” operation on two arrays with a mask.

func Zero Uses

func Zero(img *IplImage)

Clears all the array elements (sets them to 0)

type Arr Uses

type Arr unsafe.Pointer

type AttrList Uses

type AttrList C.CvAttrList

type Box2D Uses

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

func FitEllipse2 Uses

func FitEllipse2(points unsafe.Pointer) Box2D

points can be either CvSeq* or CvMat*

func MinAreaRect Uses

func MinAreaRect(points unsafe.Pointer) Box2D

Finds a rotated rectangle of the minimum area enclosing the input 2D point set points can be either CvSeq* or CvMat*

func (*Box2D) Angle Uses

func (box *Box2D) Angle() float32

func (*Box2D) CVBox Uses

func (box *Box2D) CVBox() C.CvBox2D

Returns a CvBox2D

func (*Box2D) Center Uses

func (box *Box2D) Center() Point2D32f

func (*Box2D) Points Uses

func (box *Box2D) Points() []Point2D32f

Finds box vertices

func (*Box2D) Size Uses

func (box *Box2D) Size() Size2D32f

type Capture Uses

type Capture C.CvCapture

"black box" capture structure

func NewCameraCapture Uses

func NewCameraCapture(index int) *Capture

start capturing frames from camera: index = camera_index + domain_offset (CV_CAP_*)

func NewFileCapture Uses

func NewFileCapture(filename string) *Capture

start capturing frames from video file

func (*Capture) GetDomain Uses

func (capture *Capture) GetDomain() int

Return the type of the capturer (eg, CV_CAP_V4W, CV_CAP_UNICAP), which is unknown if created with CV_CAP_ANY

func (*Capture) GetProperty Uses

func (capture *Capture) GetProperty(property_id int) float64

retrieve or set capture properties

func (*Capture) GrabFrame Uses

func (capture *Capture) GrabFrame() bool
grab a frame, return 1 on success, 0 on fail.

this function is thought to be fast

func (*Capture) QueryFrame Uses

func (capture *Capture) QueryFrame() *IplImage

Just a combination of cvGrabFrame and cvRetrieveFrame

!!!DO NOT RELEASE or MODIFY the retrieved frame!!!

func (*Capture) Release Uses

func (capture *Capture) Release()

stop capturing/reading and free resources

func (*Capture) RetrieveFrame Uses

func (capture *Capture) RetrieveFrame(streamIdx int) *IplImage
get the frame grabbed with cvGrabFrame(..)

This function may apply some frame processing like frame decompression, flipping etc. !!!DO NOT RELEASE or MODIFY the retrieved frame!!!

func (*Capture) SetProperty Uses

func (capture *Capture) SetProperty(property_id int, value float64) int

type Chain Uses

type Chain C.CvChain

type Contour Uses

type Contour C.CvContour

type CvPoint Uses

type CvPoint C.CvPoint

func NewCvPoint Uses

func NewCvPoint(x, y int) CvPoint

returns a new CvPoint

func (CvPoint) ToPoint Uses

func (p CvPoint) ToPoint() Point

Returns a Point

type CvPoint2D32f Uses

type CvPoint2D32f C.CvPoint2D32f

func NewCvPoint2D32f Uses

func NewCvPoint2D32f(x, y float32) CvPoint2D32f

returns a new CvPoint

func (CvPoint2D32f) ToPoint Uses

func (p CvPoint2D32f) ToPoint() Point2D32f

Returns a Point

type FileStorage Uses

type FileStorage C.CvFileStorage

"black box" file storage

type Font Uses

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

func InitFont Uses

func InitFont(fontFace int, hscale, vscale, shear float32, thickness, lineType int) *Font

void cvInitFont(CvFont* font, int font_face, double hscale, double vscale, double shear=0, int thickness=1, int line_type=8 )

func (*Font) PutText Uses

func (this *Font) PutText(image *IplImage, text string, pt1 Point, color Scalar)

void cvPutText(CvArr* img, const char* text, CvPoint org, const CvFont* font, CvScalar color)

type Graph Uses

type Graph C.CvGraph

type GraphEdge Uses

type GraphEdge C.CvGraphEdge

type GraphVtx Uses

type GraphVtx C.CvGraphVtx

type GraphVtx2D Uses

type GraphVtx2D C.CvGraphVtx2D

type HaarCascade Uses

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

***************************************************************************************\ * Face eyes&mouth tracking * \***************************************************************************************

func LoadHaarClassifierCascade Uses

func LoadHaarClassifierCascade(haar string) *HaarCascade

func (*HaarCascade) DetectObjects Uses

func (this *HaarCascade) DetectObjects(image *IplImage) []*Rect

func (*HaarCascade) Release Uses

func (this *HaarCascade) Release()

type HistType Uses

type HistType C.CvHistType

type Histogram Uses

type Histogram C.CvHistogram

type IplConvKernel Uses

type IplConvKernel C.IplConvKernel

func CreateStructuringElement Uses

func CreateStructuringElement(cols, rows, anchor_x, anchor_y, shape int) *IplConvKernel

Returns a structuring element of the specified size and shape for morphological operations.

func (*IplConvKernel) ReleaseElement Uses

func (k *IplConvKernel) ReleaseElement()

Releases the structuring element

type IplConvKernelFP Uses

type IplConvKernelFP C.IplConvKernelFP

type IplImage Uses

type IplImage C.IplImage

func CreateImage Uses

func CreateImage(w, h, depth, channels int) *IplImage

Creates IPL image (header and data)

func CreateImageHeader Uses

func CreateImageHeader(w, h, depth, channels int) *IplImage

Allocates and initializes IplImage header

func Crop Uses

func Crop(src *IplImage, x, y, width, height int) *IplImage

func DecodeImage Uses

func DecodeImage(buf unsafe.Pointer, iscolor int) *IplImage

decode image stored in the buffer

func DecodeImageMem Uses

func DecodeImageMem(data []byte) *IplImage

DecodeImageMem decodes an image from an in memory byte buffer.

func FromImage Uses

func FromImage(img image.Image) *IplImage

FromImage converts a go image.Image to an opencv.IplImage.

func FromImageUnsafe Uses

func FromImageUnsafe(img *image.RGBA) *IplImage
FromImageUnsafe create an opencv.IplImage that shares the buffer with the

go image.RGBA image. All changes made from opencv might affect go!

func LoadImage Uses

func LoadImage(filename string, iscolor_ ...int) *IplImage
load image from file

iscolor can be a combination of above flags where CV_LOAD_IMAGE_UNCHANGED overrides the other flags using CV_LOAD_IMAGE_ANYCOLOR alone is equivalent to CV_LOAD_IMAGE_UNCHANGED unless CV_LOAD_IMAGE_ANYDEPTH is specified images are converted to 8bit

func Resize Uses

func Resize(src *IplImage, width, height, interpolation int) *IplImage

func (*IplImage) Avg Uses

func (src *IplImage) Avg(mask *IplImage) Scalar

***************************************************************************************\ * Array Statistics * \*************************************************************************************** CvScalar cvAvg(const CvArr* arr, const CvArr* mask=NULL )

func (*IplImage) Channels Uses

func (img *IplImage) Channels() int

normal fields

func (*IplImage) Clone Uses

func (img *IplImage) Clone() *IplImage

Creates a copy of IPL image (widthStep may differ)

func (*IplImage) Depth Uses

func (img *IplImage) Depth() int

func (*IplImage) EqualizeHist Uses

func (src *IplImage) EqualizeHist(dst *IplImage)

cvEqualizeHist(const CvArr* src, CvArr* dst)

func (*IplImage) FindContours Uses

func (image *IplImage) FindContours(mode, method int, offset Point) *Seq

Returns a Seq of countours in an image, detected according to the parameters.

Caller must Release() the Seq returned

func (*IplImage) Get1D Uses

func (img *IplImage) Get1D(x int) Scalar

Get1D return a specific element from a 1-dimensional matrix.

func (*IplImage) Get2D Uses

func (img *IplImage) Get2D(x, y int) Scalar

Get2D return a specific element from a 2-dimensional matrix.

func (*IplImage) Get3D Uses

func (img *IplImage) Get3D(x, y, z int) Scalar

Get3D return a specific element from a 3-dimensional matrix.

func (*IplImage) GetCOI Uses

func (img *IplImage) GetCOI() int

Retrieves image Channel Of Interest

func (*IplImage) GetMat Uses

func (img *IplImage) GetMat() *Mat

GetMat returns the matrix header for an image.

func (*IplImage) GetROI Uses

func (img *IplImage) GetROI() Rect

Retrieves image ROI

func (*IplImage) Height Uses

func (img *IplImage) Height() int

func (*IplImage) ImageData Uses

func (img *IplImage) ImageData() unsafe.Pointer

func (*IplImage) ImageSize Uses

func (img *IplImage) ImageSize() int

func (*IplImage) InitHeader Uses

func (img *IplImage) InitHeader(w, h, depth, channels, origin, align int)

Inializes IplImage header

func (*IplImage) MeanStdDev Uses

func (src *IplImage) MeanStdDev() (Scalar, Scalar)

MeanStdDev alculates mean and standard deviation of pixel values

func (*IplImage) Origin Uses

func (img *IplImage) Origin() int

func (*IplImage) Release Uses

func (img *IplImage) Release()

Releases IPL image header and data

func (*IplImage) ReleaseHeader Uses

func (img *IplImage) ReleaseHeader()

Releases (i.e. deallocates) IPL image header

func (*IplImage) ResetROI Uses

func (img *IplImage) ResetROI()

Resets image ROI and COI

func (*IplImage) Reshape Uses

func (img *IplImage) Reshape(channels, rows, _type int) *Mat

Reshape changes shape of the image without copying data. A value of `0` means that channels or rows remain unchanged.

func (*IplImage) Set Uses

func (img *IplImage) Set(value Scalar)

Sets every element of an array to a given value.

func (*IplImage) Set1D Uses

func (img *IplImage) Set1D(x int, value Scalar)

Set1D sets a particular element in the image

func (*IplImage) Set2D Uses

func (img *IplImage) Set2D(x, y int, value Scalar)

Set2D sets a particular element in the image

func (*IplImage) Set3D Uses

func (img *IplImage) Set3D(x, y, z int, value Scalar)

Set3D sets a particular element in the image

func (*IplImage) SetCOI Uses

func (img *IplImage) SetCOI(coi int)

Sets a Channel Of Interest (only a few functions support COI) -

use cvCopy to extract the selected channel and/or put it back

func (*IplImage) SetData Uses

func (img *IplImage) SetData(data unsafe.Pointer, step int)

SetData assigns user data to the image header

func (*IplImage) SetROI Uses

func (img *IplImage) SetROI(rect Rect)

Sets image ROI (region of interest) (COI is not changed)

func (*IplImage) ToImage Uses

func (img *IplImage) ToImage() image.Image

ToImage converts a opencv.IplImage to an go image.Image

func (*IplImage) Width Uses

func (img *IplImage) Width() int

func (*IplImage) WidthStep Uses

func (img *IplImage) WidthStep() int

func (*IplImage) Zero Uses

func (img *IplImage) Zero()

type IplROI Uses

type IplROI C.IplROI

func (*IplROI) Coi Uses

func (roi *IplROI) Coi() int

func (*IplROI) Height Uses

func (roi *IplROI) Height() int

func (*IplROI) Init Uses

func (roi *IplROI) Init(coi, xOffset, yOffset, width, height int)

func (*IplROI) ToRect Uses

func (roi *IplROI) ToRect() Rect

func (*IplROI) Width Uses

func (roi *IplROI) Width() int

func (*IplROI) XOffset Uses

func (roi *IplROI) XOffset() int

func (*IplROI) YOffset Uses

func (roi *IplROI) YOffset() int

type LineIterator Uses

type LineIterator C.CvLineIterator

type Mat Uses

type Mat C.CvMat

func CreateMat Uses

func CreateMat(rows, cols, type_ int) *Mat

Allocates and initializes CvMat header and allocates data

func CreateMatHeader Uses

func CreateMatHeader(rows, cols, type_ int) *Mat

Allocates and initalizes CvMat header

func DecodeImageM Uses

func DecodeImageM(buf unsafe.Pointer, iscolor int) *Mat

func EncodeImage Uses

func EncodeImage(ext string, image unsafe.Pointer, params []int) *Mat

encode image and store the result as a byte vector (single-row 8uC1 matrix)

func GetCol Uses

func GetCol(arr Arr, submat *Mat, col int) *Mat

func GetCols Uses

func GetCols(arr Arr, submat *Mat, start_col, end_col int) *Mat

Selects column span of the input array: arr(:,start_col:end_col)

(end_col is not included into the span)

func GetDiag Uses

func GetDiag(arr Arr, submat *Mat, diag int) *Mat

Select a diagonal of the input array.

(diag = 0 means the main diagonal, >0 means a diagonal above the main one,
<0 - below the main one).
The diagonal will be represented as a column (nx1 matrix).

func GetPerspectiveTransform Uses

func GetPerspectiveTransform(rect, dst []CvPoint2D32f) *Mat

GetPerspectiveTransform calculates a perspective transform from four pairs of the corresponding points.

Parameters:

src – Coordinates of quadrangle vertices in the source image.
dst – Coordinates of the corresponding quadrangle vertices in the destination image.
Returns the computed matrix

func GetRow Uses

func GetRow(arr Arr, submat *Mat, row int) *Mat

func GetRows Uses

func GetRows(arr Arr, submat *Mat, start_row, end_row, delta_row int) *Mat

Selects row span of the input array: arr(start_row:delta_row:end_row,:)

(end_row is not included into the span).

func GetSubRect Uses

func GetSubRect(arr Arr, submat *Mat, rect Rect) *Mat

Makes a new matrix from <rect> subrectangle of input array.

No data is copied

func KMeans Uses

func KMeans(data *Mat, k int, termcrit TermCriteria, attempts int, rng RNG, flags int) (labels, centers *Mat)

KMeans finds centers of k clusters in data and groups input samples around the clusters. It returns a matrix that stores the cluster indices for every sample, and a matrix that stores the cluster centers.

func LoadImageM Uses

func LoadImageM(filename string, iscolor int) *Mat

func (*Mat) Clone Uses

func (mat *Mat) Clone() *Mat

Creates an exact copy of the input matrix (except, may be, step value)

func (*Mat) Cols Uses

func (mat *Mat) Cols() int

func (*Mat) Get Uses

func (m *Mat) Get(row, col int) float64

func (*Mat) Get1D Uses

func (m *Mat) Get1D(x int) Scalar

Get1D return a specific element from a 1-dimensional matrix.

func (*Mat) Get2D Uses

func (m *Mat) Get2D(x, y int) Scalar

Get2D return a specific element from a 2-dimensional matrix.

func (*Mat) Get3D Uses

func (m *Mat) Get3D(x, y, z int) Scalar

Get3D return a specific element from a 3-dimensional matrix.

func (*Mat) GetData Uses

func (mat *Mat) GetData() []byte

func (*Mat) GetImage Uses

func (m *Mat) GetImage(channels int) *IplImage

GetImage returns the image header for the matrix.

func (*Mat) Init Uses

func (m *Mat) Init(rows, cols int, type_ int, data unsafe.Pointer)

func (*Mat) InitHeader Uses

func (mat *Mat) InitHeader(rows, cols, type_ int, data unsafe.Pointer, step int)

Initializes CvMat header

func (*Mat) Release Uses

func (mat *Mat) Release()

Releases CvMat header and deallocates matrix data

(reference counting is used for data)

func (*Mat) Reshape Uses

func (m *Mat) Reshape(channels, rows int) *Mat

Reshape changes shape of the matrix without copying data. A value of `0` means that channels or rows remain unchanged.

func (*Mat) Rows Uses

func (mat *Mat) Rows() int

func (*Mat) Set Uses

func (m *Mat) Set(row, col int, value float64)

func (*Mat) Set1D Uses

func (m *Mat) Set1D(x int, value Scalar)

Set1D sets a particular element in them matrix

func (*Mat) Set2D Uses

func (m *Mat) Set2D(x, y int, value Scalar)

Set2D sets a particular element in them matrix

func (*Mat) Set3D Uses

func (m *Mat) Set3D(x, y, z int, value Scalar)

Set3D sets a particular element in them matrix

func (*Mat) SetData Uses

func (mat *Mat) SetData(data unsafe.Pointer, step int)

SetData assigns user data to the matrix header.

func (*Mat) Step Uses

func (mat *Mat) Step() int

func (*Mat) Type Uses

func (mat *Mat) Type() int

func (*Mat) Zero Uses

func (mat *Mat) Zero()

type MatND Uses

type MatND C.CvMatND

func CreateMatND Uses

func CreateMatND(sizes []int, type_ int) *MatND

Allocates and initializes CvMatND header and allocates data

func CreateMatNDHeader Uses

func CreateMatNDHeader(sizes []int, type_ int) *MatND

Allocates and initializes CvMatND header

func (*MatND) Clone Uses

func (mat *MatND) Clone() *MatND

Creates a copy of CvMatND (except, may be, steps)

func (*MatND) Dims Uses

func (m *MatND) Dims() int

func (*MatND) InitMatNDHeader Uses

func (mat *MatND) InitMatNDHeader(sizes []int, type_ int, data unsafe.Pointer)

Initializes preallocated CvMatND header

func (*MatND) Release Uses

func (mat *MatND) Release()

Releases CvMatND

func (*MatND) Type Uses

func (m *MatND) Type() int

type MemBlock Uses

type MemBlock C.CvMemBlock

type MemStorage Uses

type MemStorage C.CvMemStorage

type MemStoragePos Uses

type MemStoragePos C.CvMemStoragePos

type MouseFunc Uses

type MouseFunc interface{}

mouse callback

type MouseFuncA Uses

type MouseFuncA func(event, x, y, flags int)

type MouseFuncB Uses

type MouseFuncB func(event, x, y, flags int, param ...interface{})

type Point Uses

type Point struct {
    X   int
    Y   int
}

func (Point) Add Uses

func (p Point) Add(p2 Point) Point

func (Point) Angle Uses

func (p Point) Angle() float64

func (Point) Radius Uses

func (p Point) Radius() float64

func (Point) RadiusSq Uses

func (p Point) RadiusSq() float64

func (Point) Sub Uses

func (p Point) Sub(p2 Point) Point

func (Point) ToCvPoint Uses

func (p Point) ToCvPoint() CvPoint

func (Point) ToPoint Uses

func (p Point) ToPoint() Point

type Point2D Uses

type Point2D interface {
    Radius() float64   // the radius to the point
    RadiusSq() float64 // the radius to the point squared
    Angle() float64    // the azmuith angle
    ToPoint() Point    // An conversion to an integer Point type
}

type Point2D32f Uses

type Point2D32f struct {
    X   float32
    Y   float32
}

func (Point2D32f) Add Uses

func (p Point2D32f) Add(p2 Point2D32f) Point2D32f

func (Point2D32f) Angle Uses

func (p Point2D32f) Angle() float64

func (Point2D32f) Radius Uses

func (p Point2D32f) Radius() float64

func (Point2D32f) RadiusSq Uses

func (p Point2D32f) RadiusSq() float64

func (Point2D32f) Sub Uses

func (p Point2D32f) Sub(p2 Point2D32f) Point2D32f

func (Point2D32f) ToCvPoint Uses

func (p Point2D32f) ToCvPoint() CvPoint2D32f

func (Point2D32f) ToPoint Uses

func (p Point2D32f) ToPoint() Point

type Point2D64f Uses

type Point2D64f struct {
    X   float64
    Y   float64
}

func (Point2D64f) Add Uses

func (p Point2D64f) Add(p2 Point2D64f) Point2D64f

func (Point2D64f) Angle Uses

func (p Point2D64f) Angle() float64

func (Point2D64f) Radius Uses

func (p Point2D64f) Radius() float64

func (Point2D64f) RadiusSq Uses

func (p Point2D64f) RadiusSq() float64

func (Point2D64f) Sub Uses

func (p Point2D64f) Sub(p2 Point2D64f) Point2D64f

func (Point2D64f) ToPoint Uses

func (p Point2D64f) ToPoint() Point

type Point3D Uses

type Point3D interface {
    Radius() float64   // the radius to the point
    RadiusSq() float64 // the radius to the point squared
    AzAngle() float64  // the azmuith angle
    IncAngle() float64 // the inclination angle from the z direction
}

type Point3D32f Uses

type Point3D32f struct {
    X   float32
    Y   float32
    Z   float32
}

func (Point3D32f) Add Uses

func (p Point3D32f) Add(p2 Point3D32f) Point3D32f

func (Point3D32f) AzAngle Uses

func (p Point3D32f) AzAngle() float64

func (Point3D32f) IncAngle Uses

func (p Point3D32f) IncAngle() float64

func (Point3D32f) Radius Uses

func (p Point3D32f) Radius() float64

func (Point3D32f) RadiusSq Uses

func (p Point3D32f) RadiusSq() float64

func (Point3D32f) Sub Uses

func (p Point3D32f) Sub(p2 Point3D32f) Point3D32f

type Point3D64f Uses

type Point3D64f struct {
    X   float64
    Y   float64
    Z   float64
}

func (Point3D64f) Add Uses

func (p Point3D64f) Add(p2 Point3D64f) Point3D64f

func (Point3D64f) AzAngle Uses

func (p Point3D64f) AzAngle() float64

func (Point3D64f) IncAngle Uses

func (p Point3D64f) IncAngle() float64

func (Point3D64f) Radius Uses

func (p Point3D64f) Radius() float64

func (Point3D64f) RadiusSq Uses

func (p Point3D64f) RadiusSq() float64

func (Point3D64f) Sub Uses

func (p Point3D64f) Sub(p2 Point3D64f) Point3D64f

type RNG Uses

type RNG C.CvRNG

func NewRNG Uses

func NewRNG(seed int64) RNG

func (*RNG) RandInt Uses

func (rng *RNG) RandInt() uint32

func (*RNG) RandReal Uses

func (rng *RNG) RandReal() float64

type Rect Uses

type Rect C.CvRect

func BoundingRect Uses

func BoundingRect(points unsafe.Pointer) Rect

Calculates up-right bounding rectangle of point set points can be either CvSeq* or CvMat*

func NewRect Uses

func NewRect(x, y, w, h int) Rect

func (*Rect) BR Uses

func (r *Rect) BR() Point

Returns the Bottom-Right Point of the rectangle

func (*Rect) Height Uses

func (r *Rect) Height() int

func (*Rect) Init Uses

func (r *Rect) Init(x, y, w, h int)

func (*Rect) TL Uses

func (r *Rect) TL() Point

Returns the Top-Left Point of the rectangle

func (*Rect) ToROI Uses

func (r *Rect) ToROI(coi int) IplROI

func (*Rect) Width Uses

func (r *Rect) Width() int

func (*Rect) X Uses

func (r *Rect) X() int

func (*Rect) Y Uses

func (r *Rect) Y() int

type Scalar Uses

type Scalar C.CvScalar

func NewScalar Uses

func NewScalar(b, g, r, a float64) Scalar

func ScalarAll Uses

func ScalarAll(val0 float64) Scalar

func (Scalar) Val Uses

func (s Scalar) Val() [4]float64

Val returns an array with the scalars values.

type Seq Uses

type Seq C.CvSeq

func ApproxPoly Uses

func ApproxPoly(src *Seq, header_size int, storage *MemStorage, method int, eps float64, recursive int) *Seq

CvSeq* cvApproxPoly(const void* src_seq, int header_size, CvMemStorage* storage, int method, double eps, int recursive=0 )

func CreateSeq Uses

func CreateSeq(seq_flags, elem_size int) *Seq

Creates a new sequence.

func (*Seq) Clear Uses

func (seq *Seq) Clear()

Removes all elements from the sequence. Does not release storage, do that by calling Release().

func (*Seq) GetElemAt Uses

func (seq *Seq) GetElemAt(index int) unsafe.Pointer

Gets a pointer to the element at the index

func (*Seq) HNext Uses

func (seq *Seq) HNext() *Seq

Gets a pointer to the next sequence

func (*Seq) HPrev Uses

func (seq *Seq) HPrev() *Seq

Gets a pointer to the previous sequence

func (*Seq) Pop Uses

func (seq *Seq) Pop(element unsafe.Pointer)

Removes element from the sequence end. Copies the element into the paramter element.

func (*Seq) PopFront Uses

func (seq *Seq) PopFront(element unsafe.Pointer)

Removes element from the sequence beginning. Copies the element into the paramter element.

func (*Seq) Push Uses

func (seq *Seq) Push(element unsafe.Pointer) unsafe.Pointer

Adds an element to the sequence end. Returns a pointer to the element added.

func (*Seq) PushFront Uses

func (seq *Seq) PushFront(element unsafe.Pointer) unsafe.Pointer

Adds an element to the sequence beginning. Returns a pointer to the element added.

func (*Seq) Release Uses

func (seq *Seq) Release()

Releases the sequence storage.

func (*Seq) RemoveAt Uses

func (seq *Seq) RemoveAt(index int)

Removes an element from the middle of a sequence.

func (*Seq) Storage Uses

func (seq *Seq) Storage() *MemStorage

Gets a pointer to the storage

func (*Seq) Total Uses

func (seq *Seq) Total() int

Gets the total number of elements in the sequence

func (*Seq) VNext Uses

func (seq *Seq) VNext() *Seq

Gets a pointer to the 2nd next sequence

func (*Seq) VPrev Uses

func (seq *Seq) VPrev() *Seq

Gets a pointer to the 2nd previous sequence

type SeqBlock Uses

type SeqBlock C.CvSeqBlock

type SeqReader Uses

type SeqReader C.CvSeqReader

type SeqWriter Uses

type SeqWriter C.CvSeqWriter

type Set Uses

type Set C.CvSet

type Size Uses

type Size struct {
    Width  int
    Height int
}

func GetSize Uses

func GetSize(img *IplImage) Size

type Size2D32f Uses

type Size2D32f struct {
    Width  float32
    Height float32
}

type Slice Uses

type Slice C.CvSlice

func WholeSeq Uses

func WholeSeq() Slice

Equivalent to the C constant CV_WHOLE_SEQ

type SparseMat Uses

type SparseMat C.CvSparseMat

func CreateSparseMat Uses

func CreateSparseMat(sizes []int, type_ int) *SparseMat

Allocates and initializes CvSparseMat header and allocates data

func (*SparseMat) Clone Uses

func (mat *SparseMat) Clone() *SparseMat

Creates a copy of CvSparseMat (except, may be, zero items)

func (*SparseMat) Dims Uses

func (m *SparseMat) Dims() int

func (*SparseMat) InitSparseMatIterator Uses

func (mat *SparseMat) InitSparseMatIterator(iter *SparseMatIterator) *SparseNode

Initializes sparse array iterator

(returns the first node or NULL if the array is empty)

func (*SparseMat) Release Uses

func (mat *SparseMat) Release()

Releases CvSparseMat

func (*SparseMat) Type Uses

func (m *SparseMat) Type() int

type SparseMatIterator Uses

type SparseMatIterator C.CvSparseMatIterator

func (*SparseMatIterator) CurIdx Uses

func (node *SparseMatIterator) CurIdx() int

func (*SparseMatIterator) Mat Uses

func (node *SparseMatIterator) Mat() *SparseMat

func (*SparseMatIterator) Next Uses

func (iter *SparseMatIterator) Next() *SparseNode

returns next sparse array node (or NULL if there is no more nodes)

func (*SparseMatIterator) Node Uses

func (node *SparseMatIterator) Node() *SparseNode

type SparseNode Uses

type SparseNode C.CvSparseNode

func (*SparseNode) HashVal Uses

func (node *SparseNode) HashVal() uint32

func (*SparseNode) Next Uses

func (node *SparseNode) Next() *SparseNode

type TermCriteria Uses

type TermCriteria C.CvTermCriteria

func (*TermCriteria) Epsilon Uses

func (x *TermCriteria) Epsilon() float64

func (*TermCriteria) Init Uses

func (x *TermCriteria) Init(type_, max_iter int, epsilon float64)

func (*TermCriteria) MaxIter Uses

func (x *TermCriteria) MaxIter() int

func (*TermCriteria) Type Uses

func (x *TermCriteria) Type() int

type TrackbarFunc Uses

type TrackbarFunc interface{}

trackbar callback

type TrackbarFuncA Uses

type TrackbarFuncA func(pos int)

type TrackbarFuncB Uses

type TrackbarFuncB func(pos int, param ...interface{})

type VideoWriter Uses

type VideoWriter C.CvVideoWriter

"black box" video file writer structure

func NewVideoWriter Uses

func NewVideoWriter(filename string,
    fourcc int, fps float32,
    frame_width, frame_height,
    is_color int) *VideoWriter

initialize video file writer

func (*VideoWriter) Release Uses

func (writer *VideoWriter) Release()

close video file writer

func (*VideoWriter) WriteFrame Uses

func (writer *VideoWriter) WriteFrame(image *IplImage) int

write frame to video file

type Window Uses

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

named window

func NewWindow Uses

func NewWindow(name string, flags ...int) *Window

create window

func (*Window) CreateTrackbar Uses

func (win *Window) CreateTrackbar(name string,
    value, count int,
    on_changed TrackbarFunc, param ...interface{}) bool

create trackbar and display it on top of given window, set callback

func (*Window) Destroy Uses

func (win *Window) Destroy()

destroy window and all the trackers associated with it

func (*Window) GetHandle Uses

func (win *Window) GetHandle() unsafe.Pointer

get native window handle (HWND in case of Win32 and Widget in case of X Window)

func (*Window) GetProperty Uses

func (win *Window) GetProperty(prop_id int) float64

func (*Window) GetTrackbarPos Uses

func (win *Window) GetTrackbarPos(name string) (value, max int)

retrieve or set trackbar position

func (*Window) GetWindowName Uses

func (win *Window) GetWindowName() string

get name of highgui window given its native handle

func (*Window) Move Uses

func (win *Window) Move(x, y int)

func (*Window) Resize Uses

func (win *Window) Resize(width, height int)

resize/move window

func (*Window) SetMouseCallback Uses

func (win *Window) SetMouseCallback(on_mouse MouseFunc, param ...interface{})

assign callback for mouse events

func (*Window) SetProperty Uses

func (win *Window) SetProperty(prop_id int, value float64)

Set and Get Property of the window

func (*Window) SetTrackbarPos Uses

func (win *Window) SetTrackbarPos(name string, pos int)

func (*Window) ShowImage Uses

func (win *Window) ShowImage(image *IplImage)

display image within window (highgui windows remember their content)

Package opencv imports 7 packages (graph) and is imported by 68 packages. Updated 2019-02-22. Refresh now. Tools for package owners.