From 98c5bb9b428df336844becaaabf20cb90db83578 Mon Sep 17 00:00:00 2001 From: daohang <357732053@126.com> Date: Thu, 23 Oct 2014 10:04:24 +0800 Subject: [PATCH] Update cxtype.go --- opencv/cxtype.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/opencv/cxtype.go b/opencv/cxtype.go index 49b0bb8..a80ff3c 100644 --- a/opencv/cxtype.go +++ b/opencv/cxtype.go @@ -324,6 +324,9 @@ type Mat C.CvMat func (mat *Mat) Type() int { 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 { return int(mat.step) }