road

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EllipseNotFound = events.Ellipse{Confidence: 0.}

Functions

This section is empty.

Types

type DefaultMonitor

type DefaultMonitor struct {
	// contains filtered or unexported fields
}

func (*DefaultMonitor) Increment

func (d *DefaultMonitor) Increment()

func (*DefaultMonitor) Start

func (d *DefaultMonitor) Start()

type Detector

type Detector struct {
	// contains filtered or unexported fields
}

func NewDetector

func NewDetector(options ...DetectorOption) *Detector

func (*Detector) Close

func (d *Detector) Close()

func (*Detector) Detect

func (d *Detector) Detect(img *gocv.Mat) ([]*events.Point, *events.Ellipse)

type DetectorOption

type DetectorOption func(*Detector)

func WithCanny

func WithCanny(lowThreshold int, highThreshold int) DetectorOption

func WithGaussianBlur

func WithGaussianBlur(kernelSize int) DetectorOption

func WithHoughLines

func WithHoughLines(rho int, theta float32, threshold int, minLineLength int, maxLineGap int) DetectorOption

func WithMonitor

func WithMonitor(monitor Monitor) DetectorOption

func WithPointOnRoad

func WithPointOnRoad(pt image.Point) DetectorOption

func WithRegionOfInterest

func WithRegionOfInterest(imgWidth int, imgHeight int, horizon int) DetectorOption

func WithWhiteFilter

func WithWhiteFilter(lowThreshold int, highThreshold int) DetectorOption

func WithYellowFilter

func WithYellowFilter(lower gocv.Mat, upper gocv.Mat) DetectorOption

type FakeMonitor

type FakeMonitor struct{}

func (*FakeMonitor) Increment

func (f *FakeMonitor) Increment()

func (*FakeMonitor) Start

func (f *FakeMonitor) Start()

type Monitor

type Monitor interface {
	Increment()
	Start()
}

type RoadPart

type RoadPart struct {
	// contains filtered or unexported fields
}

func NewPart

func NewPart(client mqtt.Client, cameraTopic, roadTopic string, detector *Detector) *RoadPart

func (*RoadPart) OnFrame

func (r *RoadPart) OnFrame(_ mqtt.Client, msg mqtt.Message)

func (*RoadPart) Start

func (r *RoadPart) Start() error

func (*RoadPart) Stop

func (r *RoadPart) Stop()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL