Documentation ¶
Index ¶
- Variables
- type Config
- type Detector
- func (d *Detector) AnnotateNextFrame(camIndex int) (string, []byte, error)
- func (d *Detector) CamRead(camIndex int, frame *gocv.Mat) error
- func (d *Detector) Close()
- func (d *Detector) DetectNextFrame(camIndex int) (*frame.FrameDetectResult, error)
- func (d *Detector) ParseResult(data []byte) ([]*frame.Box, error)
- func (d *Detector) SnapshotNextFrame(camIndex int) ([]byte, error)
- func (d *Detector) ToggleFeeds() error
Constants ¶
This section is empty.
Variables ¶
View Source
var CamStatusInactive = errors.New("Camera is inactive")
Functions ¶
This section is empty.
Types ¶
type Detector ¶
type Detector struct { Cameras []*camera.Cam Captures []*gocv.VideoCapture CapturesLock sync.Mutex Graph *ncs.Graph GraphLabels []string AlertLabels []string NCSDevice *ncs.Stick Frame gocv.Mat FrameRaw gocv.Mat FrameResized gocv.Mat FrameFP32 gocv.Mat GraphWidth int GraphHeight int SubMat gocv.Mat MulMat gocv.Mat }
func (*Detector) AnnotateNextFrame ¶
func (*Detector) DetectNextFrame ¶
func (d *Detector) DetectNextFrame(camIndex int) (*frame.FrameDetectResult, error)
func (*Detector) ParseResult ¶
a. First fp16 value holds the number of valid detections = num_valid. b. The next 6 values are unused. c. The next (7 * num_valid) values contain the valid detections data
Each group of 7 values will describe an object/box These 7 values in order. The values are: 0: image_id (always 0) 1: class_id (this is an index into labels) 2: score (this is the probability for the class) 3: box left location within image as number between 0.0 and 1.0 4: box top location within image as number between 0.0 and 1.0 5: box right location within image as number between 0.0 and 1.0 6: box bottom location within image as number between 0.0 and 1.0
func (*Detector) SnapshotNextFrame ¶
func (*Detector) ToggleFeeds ¶
Turn on and off camera feeds depending on whether they are active or not
Click to show internal directories.
Click to hide internal directories.