alpr

package
v0.0.0-...-022445e Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ALPR_GROUP_DATA_TYPE = "alpr_group"
	ALPR_GROUP_VERSION   = 2

	CACHE_SIZE = 128
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ALPRGroup

type ALPRGroup struct {
	DataType        string `json:"data_type"`
	Version         int    `json:"version"`
	EpochStart      int64  `json:"epoch_start"`
	EpochEnd        int64  `json:"epoch_end"`
	CameraID        int    `json:"camera_id"`
	Country         string `json:"country,omitempty"`
	VehicleCropJPEG []byte `json:"vehicle_crop_jpeg,omitempty"`

	BestPlate Plate `json:"best_plate"`

	UUID                  string  `json:"best_uuid"`
	PlateNumber           string  `json:"best_plate_number"`
	PlateNumberConfidence float64 `json:"best_confidence"`
	Region                string  `json:"best_region,omitempty"`
	RegionConfidence      float64 `json:"best_region_confidence,omitempty"`
	TravelDirection       float64 `json:"travel_direction,omitempty"`
	IsParked              bool    `json:"is_parked"`

	// Current properties: color, make, make_model, body_type, year, orientation
	Vehicle map[string][]Recognition `json:"vehicle,omitempty"`
}

func (*ALPRGroup) End

func (a *ALPRGroup) End() time.Time

func (*ALPRGroup) Start

func (a *ALPRGroup) Start() time.Time

type Plate

type Plate struct {
	PlateNumber           string  `json:"plate"`
	PlateNumberConfidence float64 `json:"confidence"`
	Region                string  `json:"region,omitempty"`
	RegionConfidence      float64 `json:"region_confidence,omitempty"`
	PlateCropJPEG         []byte  `json:"plate_crop_jpeg,omitempty"`
}

type Recognition

type Recognition struct {
	Name       string  `json:"name"`
	Confidence float64 `json:"confidence"`
}

type Scraper

type Scraper struct {
	Address      string
	PollInterval time.Duration
	// contains filtered or unexported fields
}

func NewScraper

func NewScraper(address string, interval time.Duration) (*Scraper, error)

func (*Scraper) Next

func (s *Scraper) Next() (*ALPRGroup, error)

Blocks until a new plate is retrieved Internally polls until we find a new plate.

func (*Scraper) Run

func (s *Scraper) Run(ctx context.Context)

Jump to

Keyboard shortcuts

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