Documentation ¶
Index ¶
- Constants
- func DrawRectsToImage(img MatVec3b, rects []Rect)
- func MountAlphaImage(img MatVec4b, back MatVec3b, rects []Rect)
- type CMatVec3b
- type CascadeClassifier
- type MatVec3b
- type MatVec4b
- type Rect
- type VideoCapture
- func (v *VideoCapture) Delete()
- func (v *VideoCapture) Grab(skip int)
- func (v *VideoCapture) IsOpened() bool
- func (v *VideoCapture) Open(uri string) bool
- func (v *VideoCapture) OpenDevice(device int) bool
- func (v *VideoCapture) Read(m MatVec3b) bool
- func (v *VideoCapture) Release()
- func (v *VideoCapture) Set(prop int, param int)
- type VideoWriter
Constants ¶
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 ¶
DrawRectsToImage draws rectangle information to target image.
func MountAlphaImage ¶
MountAlphaImage draws img on back leading to rects. img is required RGBA, TODO should be check file type.
Types ¶
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 NewMatVec3bWithCPointer ¶
NewMatVec3bWithCPointer return a new MatVec3b with argument C pointer.
func ToMatVec3b ¶
ToMatVec3b converts RawData to MatVec3b. Returned MatVec3b is required to delete after using.
func (*MatVec3b) GetCPointer ¶
GetCPointer returns C pointer of MatVec3b.
func (*MatVec3b) ToJpegData ¶
ToJpegData convert to JPEG data.
type MatVec4b ¶
type MatVec4b struct {
// contains filtered or unexported fields
}
MatVec4b is a bind of `cv::Mat_<cv::Vec4b>`
func LoadAlphaImage ¶
LoadAlphaImage loads RGBA type image.
func ToMatVec4b ¶
ToMatVec4b converts RawData to MatVec4b. Returned MatVec4b is required to delete after using.
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) 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) 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 (*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.