fix(detector): bad initialisation
This commit is contained in:
parent
a66e481df4
commit
30edf8eccc
@ -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")
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user