Update cxtype.go

This commit is contained in:
daohang 2014-10-23 10:04:24 +08:00
parent 60e97996ad
commit 98c5bb9b42

View file

@ -324,6 +324,9 @@ type Mat C.CvMat
func (mat *Mat) Type() int { func (mat *Mat) Type() int {
return int(C.myGetMatType((*C.CvMat)(mat))) return int(C.myGetMatType((*C.CvMat)(mat)))
} }
func (mat *Mat) GetData() []byte {
return C.GoBytes(unsafe.Pointer(C.myGetData((*C.CvMat)(mat))), C.int(mat.step))
}
func (mat *Mat) Step() int { func (mat *Mat) Step() int {
return int(mat.step) return int(mat.step)
} }