I'm having troubles to convert images to grayscale, can you help me at this? I'm new at Go and in go cv, but I have done a semester at image processing, I'm doing a project in the best path to take some supplies in 7 different spots.
package main
import (
"gocv.io/x/gocv"
"path/filepath"
)
func main() {
pizzaPath := filepath.Join("Mars.bmp")
window := gocv.NewWindow("Hello Mars")
windowB := gocv.NewWindow("Hello Gray Mars")
MarsImg := gocv.NewMat()
Marsgray := gocv.NewMat()
MarsImg = gocv.IMRead(pizzaPath, gocv.IMReadColor)
Marsgray = gocv.ConvertTo(*Marsgray,0)
window.IMShow(MarsImg)
window.WaitKey(0)
windowB.IMShow(Marsgray)
windowB.WaitKey(0)
}