From 0918c9eef3860bd54524147787cc68f02a52e522 Mon Sep 17 00:00:00 2001 From: David Oram Date: Sat, 29 Aug 2015 14:40:11 +1200 Subject: [PATCH] Added 'Avg' function --- opencv/cxcore.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/opencv/cxcore.go b/opencv/cxcore.go index 610d933..29052ff 100644 --- a/opencv/cxcore.go +++ b/opencv/cxcore.go @@ -523,6 +523,10 @@ func Not(src, dst *IplImage) { /****************************************************************************************\ * Array Statistics * \****************************************************************************************/ +// CvScalar cvAvg(const CvArr* arr, const CvArr* mask=NULL ) +func (src *IplImage) Avg(mask *IplImage) Scalar { + return (Scalar)(C.cvAvg(unsafe.Pointer(src), unsafe.Pointer(mask))) +} /****************************************************************************************\ * Discrete Linear Transforms and Related Functions *