Documentation
¶
Index ¶
Constants ¶
View Source
const ( // ModelName is the name of the model ModelName = "wait-sensor" // OverflowLabel is the label if the counts exceed what was specified by the user OverflowLabel = "Overflow" // DefaultMaxFrequency is how often the vision service will poll the camera for a new image DefaultPollFrequency = 1.0 // DefaultTransitionTime is how long it takes for the state to change by default DefaultTransitionTime = 30.0 )
Variables ¶
View Source
var ( // Model is the resource Model = resource.NewModel("viam", "queue-estimator", ModelName) )
Functions ¶
This section is empty.
Types ¶
type Bin ¶
Bin stores the thresholds that turns counts into labels
func NewThresholds ¶
NewThresholds creates a list of thresholds for labeling counts
type BoundingBox ¶
type BoundingBox struct {
// contains filtered or unexported fields
}
func NewBoundingBox ¶
func NewBoundingBox(coords BoundingBoxConfig) (BoundingBox, error)
type BoundingBoxConfig ¶
type Config ¶
type Config struct {
DetectorName string `json:"detector_name"`
ChosenLabels map[string]float64 `json:"chosen_labels"`
CountThresholds map[string]int `json:"count_thresholds"`
CountPeriod float64 `json:"sampling_period_s"`
NSamples int `json:"n_samples"`
ExtraFields map[string]interface{} `json:"extra_fields"`
ValidRegions map[string][]BoundingBoxConfig `json:"valid_regions"`
}
Config contains names for necessary resources
type RingBuffer ¶
type RingBuffer struct {
// contains filtered or unexported fields
}
func NewRingBuffer ¶
func NewRingBuffer(size int) *RingBuffer
func (*RingBuffer) Add ¶
func (rb *RingBuffer) Add(newCount float64)
func (*RingBuffer) Len ¶
func (rb *RingBuffer) Len() int
func (*RingBuffer) Mean ¶
func (rb *RingBuffer) Mean() float64
func (*RingBuffer) MeanLabel ¶
func (rb *RingBuffer) MeanLabel(thresholds []Bin) string
func (*RingBuffer) ModeLabel ¶
func (rb *RingBuffer) ModeLabel(thresholds []Bin) string
func (*RingBuffer) String ¶
func (rb *RingBuffer) String() string
Click to show internal directories.
Click to hide internal directories.