From 45ac211bd5e23e166c5b7ee0ad7892cece609119 Mon Sep 17 00:00:00 2001 From: William Durand Date: Tue, 13 Mar 2018 19:18:33 +0100 Subject: [PATCH] Compare Mat Type directly --- core.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core.go b/core.go index 00437d73..c569541a 100644 --- a/core.go +++ b/core.go @@ -420,7 +420,7 @@ func (m *Mat) SetDoubleAt3(x, y, z int, val float64) { // ToImage converts a Mat to a image.Image. func (m *Mat) ToImage() (image.Image, error) { - t := MatType(m.Type()) + t := m.Type() if t != MatTypeCV8UC1 && t != MatTypeCV8UC3 && t != MatTypeCV8UC4 { return nil, errors.New("ToImage supports only MatType CV8UC1, CV8UC3 and CV8UC4") }