func (img *Image) ScalarAt(pos ...int) Scalar { n := len(pos) var s C.CvScalar if n == 1 { s = C.cvGet1D(img.ptr, C.int(pos[0])) } else if n == 2 { s = C.cvGet2D(img.ptr, C.int(pos[0]), C.int(pos[1])) } else if n == 3 { s = C.cvGet3D(img.ptr, C.int(pos[0]), C.int(pos[1]), C.int(pos[2])) } return Scalar{float64(s.val[0]), float64(s.val[1]), float64(s.val[2]), float64(s.val[3])} }
/* Get3D return a specific element from a 3-dimensional matrix. */ func (m *Mat) Get3D(x, y, z int) Scalar { ret := C.cvGet3D(unsafe.Pointer(m), C.int(x), C.int(y), C.int(z)) return Scalar(ret) }
/* Get3D return a specific element from a 3-dimensional matrix. */ func (img *IplImage) Get3D(x, y, z int) Scalar { ret := C.cvGet3D(unsafe.Pointer(img), C.int(z), C.int(y), C.int(x)) return Scalar(ret) }