From 30edf8eccc636bf536cff1f82327e3763f722e92 Mon Sep 17 00:00:00 2001 From: Cyrille Nofficial Date: Thu, 2 May 2024 20:03:37 +0200 Subject: [PATCH] fix(detector): bad initialisation --- cmd/rc-road/rc-road.go | 2 +- road/detect.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/rc-road/rc-road.go b/cmd/rc-road/rc-road.go index 391d071..d742c1d 100644 --- a/cmd/rc-road/rc-road.go +++ b/cmd/rc-road/rc-road.go @@ -40,7 +40,7 @@ func main() { flag.IntVar(&horizon, "horizon", horizon, "Limit horizon in pixels from top, use HORIZON if args not set") flag.IntVar(&imgWidth, "image-width", 160, "Video pixels width") - flag.IntVar(&imgHeight, "image-height", 128, "Video pixels height") + flag.IntVar(&imgHeight, "image-height", 120, "Video pixels height") flag.IntVar(&whiteThresholdLow, "white-threshold-low", 20, "White pixels threshold, low limit") flag.IntVar(&whiteThresholdHigh, "white-threshold-high", 255, "White pixels threshold, high limit") diff --git a/road/detect.go b/road/detect.go index f4c581a..78ae61b 100644 --- a/road/detect.go +++ b/road/detect.go @@ -44,7 +44,7 @@ func WithYellowFilter(lower gocv.Mat, upper gocv.Mat) DetectorOption { } func WithRegionOfInterest(imgWidth int, imgHeight int, horizon int) DetectorOption { - roi := buildRegionOfInterest(imgWidth, imgWidth, horizon) + roi := buildRegionOfInterest(imgWidth, imgHeight, horizon) return func(d *Detector) { err := d.roiMask.Close() if err != nil {