fix(detector): bad initialisation

This commit is contained in:
Cyrille Nofficial 2024-05-02 20:03:37 +02:00
parent a66e481df4
commit 30edf8eccc
2 changed files with 2 additions and 2 deletions

View File

@ -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")

View File

@ -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 {