bridge

package
v0.0.0-...-81af635 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CvCapPropFrameWidth is OpenCV parameter of Frame Width
	CvCapPropFrameWidth = 3
	// CvCapPropFrameHeight is OpenCV parameter of Frame Height
	CvCapPropFrameHeight = 4
	// CvCapPropFps is OpenCV parameter of FPS
	CvCapPropFps = 5
)

Variables

This section is empty.

Functions

func DrawRectsToImage

func DrawRectsToImage(img MatVec3b, rects []Rect)

DrawRectsToImage draws rectangle information to target image.

func MountAlphaImage

func MountAlphaImage(img MatVec4b, back MatVec3b, rects []Rect)

MountAlphaImage draws img on back leading to rects. img is required RGBA, TODO should be check file type.

Types

type CMatVec3b

type CMatVec3b C.MatVec3b

CMatVec3b is an alias for C pointer.

type CascadeClassifier

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

CascadeClassifier is a bind of `cv::CascadeClassifier`

func NewCascadeClassifier

func NewCascadeClassifier() CascadeClassifier

NewCascadeClassifier returns a new CascadeClassifier.

func (*CascadeClassifier) Delete

func (c *CascadeClassifier) Delete()

Delete CascadeClassifier's pointer.

func (*CascadeClassifier) DetectMultiScale

func (c *CascadeClassifier) DetectMultiScale(img MatVec3b) []Rect

DetectMultiScale detects something which is decided by loaded file. Returns multi results addressed with rectangle.

func (*CascadeClassifier) Load

func (c *CascadeClassifier) Load(name string) bool

Load cascade configuration file to classifier.

type MatVec3b

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

MatVec3b is a bind of `cv::Mat_<cv::Vec3b>`

func NewMatVec3b

func NewMatVec3b() MatVec3b

NewMatVec3b returns a new MatVec3b.

func NewMatVec3bWithCPointer

func NewMatVec3bWithCPointer(p CMatVec3b) MatVec3b

NewMatVec3bWithCPointer return a new MatVec3b with argument C pointer.

func ToMatVec3b

func ToMatVec3b(width int, height int, data []byte) MatVec3b

ToMatVec3b converts RawData to MatVec3b. Returned MatVec3b is required to delete after using.

func (*MatVec3b) CopyTo

func (m *MatVec3b) CopyTo(dst *MatVec3b)

CopyTo copies MatVec3b.

func (*MatVec3b) Delete

func (m *MatVec3b) Delete()

Delete object.

func (*MatVec3b) Empty

func (m *MatVec3b) Empty() bool

Empty returns the MatVec3b is empty or not.

func (*MatVec3b) GetCPointer

func (m *MatVec3b) GetCPointer() C.MatVec3b

GetCPointer returns C pointer of MatVec3b.

func (*MatVec3b) ToJpegData

func (m *MatVec3b) ToJpegData(quality int) []byte

ToJpegData convert to JPEG data.

func (*MatVec3b) ToRawData

func (m *MatVec3b) ToRawData() (int, int, []byte)

ToRawData converts MatVec3b to RawData.

type MatVec4b

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

MatVec4b is a bind of `cv::Mat_<cv::Vec4b>`

func LoadAlphaImage

func LoadAlphaImage(name string) MatVec4b

LoadAlphaImage loads RGBA type image.

func ToMatVec4b

func ToMatVec4b(width int, height int, data []byte) MatVec4b

ToMatVec4b converts RawData to MatVec4b. Returned MatVec4b is required to delete after using.

func (*MatVec4b) Delete

func (m *MatVec4b) Delete()

Delete object.

func (*MatVec4b) ToRawData

func (m *MatVec4b) ToRawData() (int, int, []byte)

ToRawData converts MatVec4b to RawData.

type Rect

type Rect struct {
	X      int
	Y      int
	Width  int
	Height int
}

Rect represents rectangle. X and Y is a start point of Width and Height.

type VideoCapture

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

VideoCapture is a bind of `cv::VideoCapture`.

func NewVideoCapture

func NewVideoCapture() VideoCapture

NewVideoCapture returns a new video capture.

func (*VideoCapture) Delete

func (v *VideoCapture) Delete()

Delete object.

func (*VideoCapture) Grab

func (v *VideoCapture) Grab(skip int)

Grab `skip` count frames.

func (*VideoCapture) IsOpened

func (v *VideoCapture) IsOpened() bool

IsOpened returns the video capture opens a file(or device) or not.

func (*VideoCapture) Open

func (v *VideoCapture) Open(uri string) bool

Open a video data and prepares to start capturing.

func (*VideoCapture) OpenDevice

func (v *VideoCapture) OpenDevice(device int) bool

OpenDevice opens a video device and prepares to start capturing.

func (*VideoCapture) Read

func (v *VideoCapture) Read(m MatVec3b) bool

Read set frame to argument MatVec3b, returns `false` when the video capture cannot read frame.

func (*VideoCapture) Release

func (v *VideoCapture) Release()

Release video capture object.

func (*VideoCapture) Set

func (v *VideoCapture) Set(prop int, param int)

Set parameter with property (=key).

type VideoWriter

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

VideoWriter is a bind of `cv::VideoWriter`.

func NewVideoWriter

func NewVideoWriter() VideoWriter

NewVideoWriter returns a new video writer.

func (*VideoWriter) Delete

func (vw *VideoWriter) Delete()

Delete object.

func (*VideoWriter) IsOpened

func (vw *VideoWriter) IsOpened() bool

IsOpened returns the video writer opens a file or not.

func (*VideoWriter) Open

func (vw *VideoWriter) Open(name string, fps float64, width int, height int)

Open a video writer.

func (*VideoWriter) OpenWithMat

func (vw *VideoWriter) OpenWithMat(name string, fps float64, img MatVec3b)

OpenWithMat opens video writer.

func (*VideoWriter) Write

func (vw *VideoWriter) Write(img MatVec3b)

Write the image to file.

Jump to

Keyboard shortcuts

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