package rrc

import (
	"image"

	log "github.com/sirupsen/logrus"
	"gocv.io/x/gocv"
)

func MeanFilter(img gocv.Mat, ksize int) gocv.Mat {
	log.Println("Applying mean filter, kernel size:", ksize)
	meanFilteredImg := gocv.NewMat()
	gocv.Blur(img, &meanFilteredImg, image.Pt(ksize, ksize))
	return meanFilteredImg
}
