Documentation ¶
Index ¶
- Constants
- Variables
- func EstimateSpeed(firstPoint, lastPoint gocv.Point2f, start, end time.Time, ...) float32
- func FixRectForOpenCV(r *image.Rectangle, maxCols, maxRows int)
- func GetPerspectiveTransformer(srcPoints, dstPoints []gocv.Point2f) func(gocv.Point2f) gocv.Point2f
- func Haversine(src, dst gocv.Point2f) float32
- func RegisterServiceYOLOServer(s *grpc.Server, srv ServiceYOLOServer)
- func Round(v float64) int
- func STDPointToGoCVPoint2F(p image.Point) gocv.Point2f
- type AppSettings
- type BBoxSettings
- type CentroidSettings
- type ClassInfo
- type ClassesSettings
- type CudaSettings
- type DetectedObject
- type DetectedObjects
- type Detection
- func (*Detection) Descriptor() ([]byte, []int)deprecated
- func (x *Detection) GetHeight() int32
- func (x *Detection) GetWidth() int32
- func (x *Detection) GetXLeft() int32
- func (x *Detection) GetYTop() int32
- func (*Detection) ProtoMessage()
- func (x *Detection) ProtoReflect() protoreflect.Message
- func (x *Detection) Reset()
- func (x *Detection) String() string
- type DrawOptions
- type EuclideanPoint
- func (*EuclideanPoint) Descriptor() ([]byte, []int)deprecated
- func (x *EuclideanPoint) GetX() float32
- func (x *EuclideanPoint) GetY() float32
- func (*EuclideanPoint) ProtoMessage()
- func (x *EuclideanPoint) ProtoReflect() protoreflect.Message
- func (x *EuclideanPoint) Reset()
- func (x *EuclideanPoint) String() string
- type FrameData
- type GISMapper
- type GrpcSettings
- type LinesSetting
- type MatPPROFSettings
- type MjpegSettings
- type NeuralNetworkSettings
- type ObjectDrawingSettings
- type ObjectInformation
- func (*ObjectInformation) Descriptor() ([]byte, []int)deprecated
- func (x *ObjectInformation) GetCamId() string
- func (x *ObjectInformation) GetClass() *ClassInfo
- func (x *ObjectInformation) GetDetection() *Detection
- func (x *ObjectInformation) GetImage() []byte
- func (x *ObjectInformation) GetTimestamp() int64
- func (x *ObjectInformation) GetTrackInformation() *TrackInfo
- func (x *ObjectInformation) GetVirtualLine() *VirtualLineInfo
- func (*ObjectInformation) ProtoMessage()
- func (x *ObjectInformation) ProtoReflect() protoreflect.Message
- func (x *ObjectInformation) Reset()
- func (x *ObjectInformation) String() string
- type Point
- type Response
- func (*Response) Descriptor() ([]byte, []int)deprecated
- func (x *Response) GetError() string
- func (x *Response) GetMessage() string
- func (x *Response) GetWarning() string
- func (*Response) ProtoMessage()
- func (x *Response) ProtoReflect() protoreflect.Message
- func (x *Response) Reset()
- func (x *Response) String() string
- type ServiceYOLOClient
- type ServiceYOLOServer
- type SpeedEstimationSettings
- type TRACKER_TYPE
- type TextSettings
- type TrackInfo
- type TrackerSettings
- type UnimplementedServiceYOLOServer
- type VIRTUAL_LINE_TYPE
- type VideoSettings
- type VirtualLine
- type VirtualLineInfo
- func (*VirtualLineInfo) Descriptor() ([]byte, []int)deprecated
- func (x *VirtualLineInfo) GetId() int64
- func (x *VirtualLineInfo) GetLeftX() int32
- func (x *VirtualLineInfo) GetLeftY() int32
- func (x *VirtualLineInfo) GetRightX() int32
- func (x *VirtualLineInfo) GetRightY() int32
- func (*VirtualLineInfo) ProtoMessage()
- func (x *VirtualLineInfo) ProtoReflect() protoreflect.Message
- func (x *VirtualLineInfo) Reset()
- func (x *VirtualLineInfo) String() string
- type WGS84Point
- func (*WGS84Point) Descriptor() ([]byte, []int)deprecated
- func (x *WGS84Point) GetLatitude() float32
- func (x *WGS84Point) GetLongitude() float32
- func (*WGS84Point) ProtoMessage()
- func (x *WGS84Point) ProtoReflect() protoreflect.Message
- func (x *WGS84Point) Reset()
- func (x *WGS84Point) String() string
Constants ¶
const ( TRACKER_SIMPLE = TRACKER_TYPE(1) TRACKER_KALMAN = TRACKER_TYPE(2) )
const ( // HORIZONTAL_LINE Represents the line with Y{1} of (X{1}Y{1}) = Y{2} of (X{2}Y{2}) HORIZONTAL_LINE = VIRTUAL_LINE_TYPE(iota + 1) // OBLIQUE_LINE Represents the line with Y{1} of (X{1}Y{1}) <> Y{2} of (X{2}Y{2}) (so it has some angle) OBLIQUE_LINE )
Variables ¶
var File_yolo_grpc_proto protoreflect.FileDescriptor
Functions ¶
func EstimateSpeed ¶ added in v0.8.0
func EstimateSpeed(firstPoint, lastPoint gocv.Point2f, start, end time.Time, perspectiveTransformer func(gocv.Point2f) gocv.Point2f) float32
EstimateSpeed Estimates speed approximately
func FixRectForOpenCV ¶
FixRectForOpenCV Corrects rectangle's bounds for provided max-widtht and max-height Helps to avoid BBox error assertion
func GetPerspectiveTransformer ¶ added in v0.8.0
GetPerspectiveTransformer Initializates gocv.Point2f for GIS conversion purposes
func Haversine ¶ added in v0.8.0
Haversine Calculates great circle distance between two points https://en.wikipedia.org/wiki/Great-circle_distance#:~:text=The%20great%2Dcircle%20distance%2C%20orthodromic,line%20through%20the%20sphere's%20interior).
func RegisterServiceYOLOServer ¶ added in v0.4.1
func RegisterServiceYOLOServer(s *grpc.Server, srv ServiceYOLOServer)
Types ¶
type AppSettings ¶
type AppSettings struct { VideoSettings VideoSettings `json:"video_settings"` NeuralNetworkSettings NeuralNetworkSettings `json:"neural_network_settings"` CudaSettings CudaSettings `json:"cuda_settings"` MjpegSettings MjpegSettings `json:"mjpeg_settings"` GrpcSettings GrpcSettings `json:"grpc_settings"` ClassesSettings []*ClassesSettings `json:"classes_settings"` TrackerSettings TrackerSettings `json:"tracker_settings"` MatPPROFSettings MatPPROFSettings `json:"matpprof_settings"` sync.RWMutex // Exported, but not from JSON ClassesDrawOptions map[string]*DrawOptions `json:"-"` }
AppSettings Settings for application
func NewSettings ¶
func NewSettings(fname string) (*AppSettings, error)
NewSettings Create new AppSettings from content of configuration file
func (*AppSettings) GetDrawOptions ¶ added in v0.8.2
func (settings *AppSettings) GetDrawOptions(className string) *DrawOptions
type BBoxSettings ¶
BBoxSettings Options for detection rectangle
type CentroidSettings ¶
type CentroidSettings struct { RGBA [4]uint8 `json:"rgba"` Radius int `json:"radius"` Thickness int `json:"thickness"` }
CentroidSettings Options for center of detection rectangle
type ClassInfo ¶ added in v0.4.1
type ClassInfo struct { ClassId int32 `protobuf:"varint,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` ClassName string `protobuf:"bytes,2,opt,name=class_name,json=className,proto3" json:"class_name,omitempty"` // contains filtered or unexported fields }
Reference information about object class
func ClassInfoGRPC ¶ added in v0.8.3
ClassInfoGRPC Prepares gRPC message 'ClassInfo' Blob object should be provided
func (*ClassInfo) Descriptor
deprecated
added in
v0.4.1
func (*ClassInfo) GetClassId ¶ added in v0.4.1
func (*ClassInfo) GetClassName ¶ added in v0.4.1
func (*ClassInfo) ProtoMessage ¶ added in v0.4.1
func (*ClassInfo) ProtoMessage()
func (*ClassInfo) ProtoReflect ¶ added in v0.4.1
func (x *ClassInfo) ProtoReflect() protoreflect.Message
type ClassesSettings ¶ added in v0.8.2
type ClassesSettings struct { // Classname basically ClassName string `json:"class_name"` // Options for visual output (usefull when either imshow or mjpeg output is used) DrawingSettings *ObjectDrawingSettings `json:"drawing_settings"` }
ClassesSettings Settings for each possible class
func (*ClassesSettings) PrepareDrawingOptions ¶ added in v0.8.2
func (classInfo *ClassesSettings) PrepareDrawingOptions() *DrawOptions
PrepareDrawingOptions Prepares drawing options for blob library
type CudaSettings ¶
type CudaSettings struct {
Enable bool `json:"enable"`
}
CudaSettings CUDA settings
type DetectedObject ¶
DetectedObject Store detected object info
type DetectedObjects ¶
type DetectedObjects []*DetectedObject
DetectedObjects Just alias to slice of DetectedObject
type Detection ¶
type Detection struct { XLeft int32 `protobuf:"varint,1,opt,name=x_left,json=xLeft,proto3" json:"x_left,omitempty"` YTop int32 `protobuf:"varint,2,opt,name=y_top,json=yTop,proto3" json:"y_top,omitempty"` Height int32 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` Width int32 `protobuf:"varint,4,opt,name=width,proto3" json:"width,omitempty"` // contains filtered or unexported fields }
Reference information about detection rectangle
func DetectionInfoGRPC ¶ added in v0.8.3
DetectionInfoGRPC Prepares gRPC message 'Detection' BBox (x-leftop, y-leftop, width and height of bounding box) information should be provided
func (*Detection) Descriptor
deprecated
func (*Detection) ProtoMessage ¶
func (*Detection) ProtoMessage()
func (*Detection) ProtoReflect ¶ added in v0.4.1
func (x *Detection) ProtoReflect() protoreflect.Message
type DrawOptions ¶ added in v0.8.2
type DrawOptions struct { *blob.DrawOptions DisplayObjectID bool }
Wrap blob.DrawOptions
func PrepareDrawingOptionsDefault ¶ added in v0.8.2
func PrepareDrawingOptionsDefault() *DrawOptions
type EuclideanPoint ¶ added in v0.8.0
type EuclideanPoint struct { X float32 `protobuf:"fixed32,1,opt,name=x,proto3" json:"x,omitempty"` Y float32 `protobuf:"fixed32,2,opt,name=y,proto3" json:"y,omitempty"` // contains filtered or unexported fields }
Representation of a point in Euclidean space
func (*EuclideanPoint) Descriptor
deprecated
added in
v0.8.0
func (*EuclideanPoint) Descriptor() ([]byte, []int)
Deprecated: Use EuclideanPoint.ProtoReflect.Descriptor instead.
func (*EuclideanPoint) GetX ¶ added in v0.8.0
func (x *EuclideanPoint) GetX() float32
func (*EuclideanPoint) GetY ¶ added in v0.8.0
func (x *EuclideanPoint) GetY() float32
func (*EuclideanPoint) ProtoMessage ¶ added in v0.8.0
func (*EuclideanPoint) ProtoMessage()
func (*EuclideanPoint) ProtoReflect ¶ added in v0.8.0
func (x *EuclideanPoint) ProtoReflect() protoreflect.Message
func (*EuclideanPoint) Reset ¶ added in v0.8.0
func (x *EuclideanPoint) Reset()
func (*EuclideanPoint) String ¶ added in v0.8.0
func (x *EuclideanPoint) String() string
type FrameData ¶
type FrameData struct { ImgSource gocv.Mat // Source image ImgScaled gocv.Mat // Scaled image ImgSTD image.Image }
FrameData Wrapper around gocv.Mat
func (*FrameData) Close ¶
func (fd *FrameData) Close()
Close Simplify memory management for each gocv.Mat of FrameData
func (*FrameData) Preprocess ¶
Preprocess Scales image to given width and height
type GISMapper ¶ added in v0.8.0
type GISMapper struct { ImageCoordinates [2]float32 `json:"image_coordinates"` EPSG4326 [2]float32 `json:"epsg4326"` }
GISMapper Map image coordinates to GIS coordinates
type GrpcSettings ¶
type GrpcSettings struct { Enable bool `json:"enable"` ServerIP string `json:"server_ip"` ServerPort int `json:"server_port"` }
GrpcSettings gRPC-server address
type LinesSetting ¶
type LinesSetting struct { LineID int64 `json:"line_id"` Begin [2]int `json:"begin"` End [2]int `json:"end"` Direction string `json:"direction"` DetectClasses []string `json:"detect_classes"` RGBA [4]uint8 `json:"rgba"` CropMode string `json:"crop_mode"` // Exported, but not from JSON VLine *VirtualLine `json:"-"` }
LinesSetting Virtual lines
type MatPPROFSettings ¶
type MatPPROFSettings struct {
Enable bool `json:"enable"`
}
MatPPROFSettings pprof settings of gocv.Mat
type MjpegSettings ¶
type MjpegSettings struct { ImshowEnable bool `json:"imshow_enable"` Enable bool `json:"enable"` Port int `json:"port"` }
MjpegSettings settings for output
type NeuralNetworkSettings ¶
type NeuralNetworkSettings struct { DarknetCFG string `json:"darknet_cfg"` DarknetWeights string `json:"darknet_weights"` // DarknetClasses string `json:"darknet_classes"` ConfThreshold float64 `json:"conf_threshold"` NmsThreshold float64 `json:"nms_threshold"` TargetClasses []string `json:"target_classes"` }
NeuralNetworkSettings Neural network
type ObjectDrawingSettings ¶ added in v0.8.2
type ObjectDrawingSettings struct { // Drawing options for detection rectangle BBoxSettings BBoxSettings `json:"bbox_settings"` // Drawing options for center of detection rectangle CentroidSettings CentroidSettings `json:"centroid_settings"` // Drawing options for text in top left corner of detection rectangle TextSettings TextSettings `json:"text_settings"` // Do you want to display ID of object (uuid) DisplayObjectID bool `json:"display_object_id"` }
ObjectDrawingSettings Drawing settings for MJPEG/imshow
type ObjectInformation ¶ added in v0.4.1
type ObjectInformation struct { // Camera identifier CamId string `protobuf:"bytes,1,opt,name=cam_id,json=camId,proto3" json:"cam_id,omitempty"` // Timestamp in Unix UTC Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Bytes representation of image (PNG) Image []byte `protobuf:"bytes,3,opt,name=image,proto3" json:"image,omitempty"` // Reference information about detection rectangle Detection *Detection `protobuf:"bytes,4,opt,name=detection,proto3" json:"detection,omitempty"` // Reference information about object class Class *ClassInfo `protobuf:"bytes,5,opt,name=class,proto3" json:"class,omitempty"` // Reference information about virtual line (detection line) VirtualLine *VirtualLineInfo `protobuf:"bytes,6,opt,name=virtual_line,json=virtualLine,proto3" json:"virtual_line,omitempty"` // Reference information about tracking parameters of object (speed + track points) TrackInformation *TrackInfo `protobuf:"bytes,7,opt,name=track_information,json=trackInformation,proto3" json:"track_information,omitempty"` // contains filtered or unexported fields }
Reference info about detection, camera, timestamp and etc.
func (*ObjectInformation) Descriptor
deprecated
added in
v0.4.1
func (*ObjectInformation) Descriptor() ([]byte, []int)
Deprecated: Use ObjectInformation.ProtoReflect.Descriptor instead.
func (*ObjectInformation) GetCamId ¶ added in v0.4.1
func (x *ObjectInformation) GetCamId() string
func (*ObjectInformation) GetClass ¶ added in v0.4.1
func (x *ObjectInformation) GetClass() *ClassInfo
func (*ObjectInformation) GetDetection ¶ added in v0.4.1
func (x *ObjectInformation) GetDetection() *Detection
func (*ObjectInformation) GetImage ¶ added in v0.4.1
func (x *ObjectInformation) GetImage() []byte
func (*ObjectInformation) GetTimestamp ¶ added in v0.4.1
func (x *ObjectInformation) GetTimestamp() int64
func (*ObjectInformation) GetTrackInformation ¶ added in v0.8.0
func (x *ObjectInformation) GetTrackInformation() *TrackInfo
func (*ObjectInformation) GetVirtualLine ¶ added in v0.4.1
func (x *ObjectInformation) GetVirtualLine() *VirtualLineInfo
func (*ObjectInformation) ProtoMessage ¶ added in v0.4.1
func (*ObjectInformation) ProtoMessage()
func (*ObjectInformation) ProtoReflect ¶ added in v0.4.1
func (x *ObjectInformation) ProtoReflect() protoreflect.Message
func (*ObjectInformation) Reset ¶ added in v0.4.1
func (x *ObjectInformation) Reset()
func (*ObjectInformation) String ¶ added in v0.4.1
func (x *ObjectInformation) String() string
type Point ¶ added in v0.8.0
type Point struct { EuclideanPoint *EuclideanPoint `protobuf:"bytes,1,opt,name=euclidean_point,json=euclideanPoint,proto3" json:"euclidean_point,omitempty"` Wgs84Point *WGS84Point `protobuf:"bytes,2,opt,name=wgs84_point,json=wgs84Point,proto3" json:"wgs84_point,omitempty"` // contains filtered or unexported fields }
Union of EuclideanPoint and WGS84Point structures
func (*Point) Descriptor
deprecated
added in
v0.8.0
func (*Point) GetEuclideanPoint ¶ added in v0.8.0
func (x *Point) GetEuclideanPoint() *EuclideanPoint
func (*Point) GetWgs84Point ¶ added in v0.8.0
func (x *Point) GetWgs84Point() *WGS84Point
func (*Point) ProtoMessage ¶ added in v0.8.0
func (*Point) ProtoMessage()
func (*Point) ProtoReflect ¶ added in v0.8.0
func (x *Point) ProtoReflect() protoreflect.Message
type Response ¶
type Response struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` Warning string `protobuf:"bytes,2,opt,name=warning,proto3" json:"warning,omitempty"` Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` // contains filtered or unexported fields }
Response from server-side application
func (*Response) Descriptor
deprecated
func (*Response) GetMessage ¶
func (*Response) GetWarning ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶ added in v0.4.1
func (x *Response) ProtoReflect() protoreflect.Message
type ServiceYOLOClient ¶ added in v0.4.1
type ServiceYOLOClient interface {
SendDetection(ctx context.Context, in *ObjectInformation, opts ...grpc.CallOption) (*Response, error)
}
ServiceYOLOClient is the client API for ServiceYOLO service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewServiceYOLOClient ¶ added in v0.4.1
func NewServiceYOLOClient(cc grpc.ClientConnInterface) ServiceYOLOClient
type ServiceYOLOServer ¶ added in v0.4.1
type ServiceYOLOServer interface {
SendDetection(context.Context, *ObjectInformation) (*Response, error)
}
ServiceYOLOServer is the server API for ServiceYOLO service.
type SpeedEstimationSettings ¶ added in v0.8.0
type SpeedEstimationSettings struct { // Is this feature enabled? Enabled bool `json:"enabled"` // Is gRPC sending needed? If yes make sure that 'grpc_settings.enable' is set to 'true' also SendGRPC bool `json:"send_grpc"` // Map image coordinates to GIS coordinates. EPSG 4326 is handled only currently Mapper []GISMapper `json:"mapper"` }
SpeedEstimationSettings Settings speed estimation
type TRACKER_TYPE ¶ added in v0.7.0
type TRACKER_TYPE int
type TextSettings ¶
type TextSettings struct { RGBA [4]uint8 `json:"rgba"` Scale float64 `json:"scale"` Thickness int `json:"thickness"` Font string `json:"font"` // Possible values are: hershey_simplex, hershey_plain, hershey_duplex, hershey_complex, hershey_triplex, hershey_complex_small, hershey_script_simplex, hershey_script_cddomplex, italic }
TextSettings Options for text in top left corner of detection rectangle
type TrackInfo ¶ added in v0.8.0
type TrackInfo struct { EstimatedSpeed float32 `protobuf:"fixed32,1,opt,name=estimated_speed,json=estimatedSpeed,proto3" json:"estimated_speed,omitempty"` Points []*Point `protobuf:"bytes,2,rep,name=points,proto3" json:"points,omitempty"` // contains filtered or unexported fields }
Information about estimated speed and track itself
func TrackInfoInfoGRPC ¶ added in v0.8.3
func TrackInfoInfoGRPC(b blob.Blobie, speedKey string, scalex, scaley float32, gisConverter func(gocv.Point2f) gocv.Point2f) *TrackInfo
TrackInfoInfoGRPC Prepares gRPC message 'TrackInfo' Next data should be provided: Blob object for track extraction Key for extracting speed infromation Width/Height scale for EuclideanPoint correction to actual coordinates Coverter function (from pixel to WGS84)
func (*TrackInfo) Descriptor
deprecated
added in
v0.8.0
func (*TrackInfo) GetEstimatedSpeed ¶ added in v0.8.0
func (*TrackInfo) ProtoMessage ¶ added in v0.8.0
func (*TrackInfo) ProtoMessage()
func (*TrackInfo) ProtoReflect ¶ added in v0.8.0
func (x *TrackInfo) ProtoReflect() protoreflect.Message
type TrackerSettings ¶
type TrackerSettings struct { TrackerType string `json:"tracker_type"` // Restriction for maximum points in single track MaxPointsInTrack int `json:"max_points_in_track"` LinesSettings []LinesSetting `json:"lines_settings"` SpeedEstimationSettings SpeedEstimationSettings `json:"speed_estimation_settings"` // contains filtered or unexported fields }
TrackerSettings Object tracker settings
func (*TrackerSettings) GetTrackerType ¶ added in v0.7.0
func (trs *TrackerSettings) GetTrackerType() TRACKER_TYPE
GetTrackerType Returns enum for tracker type option
type UnimplementedServiceYOLOServer ¶ added in v0.4.1
type UnimplementedServiceYOLOServer struct { }
UnimplementedServiceYOLOServer can be embedded to have forward compatible implementations.
func (*UnimplementedServiceYOLOServer) SendDetection ¶ added in v0.4.1
func (*UnimplementedServiceYOLOServer) SendDetection(context.Context, *ObjectInformation) (*Response, error)
type VideoSettings ¶
type VideoSettings struct { Source string `json:"source"` Width int `json:"width"` Height int `json:"height"` ReducedWidth int `json:"reduced_width"` ReducedHeight int `json:"reduced_height"` CameraID string `json:"camera_id"` // Exported, but not from JSON ScaleX float64 `json:"-"` ScaleY float64 `json:"-"` }
VideoSettings Settings for video
type VirtualLine ¶
type VirtualLine struct { // Point on the left [scaled] LeftPT image.Point `json:"-"` // Point on the right [scaled] RightPT image.Point `json:"-"` // Color of line Color color.RGBA `json:"-"` // Direction of traffic flow Direction bool `json:"-"` // Is crossing object should be cropped for futher work with it? CropObject bool `json:"-"` // Point on the left [non-scaled] SourceLeftPT image.Point `json:"-"` // Point on the right [non-scaled] SourceRightPT image.Point `json:"-"` // Type of virtual line: could be horizontal or oblique LineType VIRTUAL_LINE_TYPE `json:"-"` }
VirtualLine Detection line attributes
func NewVirtualLine ¶ added in v0.8.3
func NewVirtualLine(x1, y1, x2, y2 int) *VirtualLine
Constructor for VirtualLine (x1, y1) - Left (x2, y2) - Right
func (*VirtualLine) Draw ¶
func (vline *VirtualLine) Draw(img *gocv.Mat)
Draw Draw virtual line on image
func (*VirtualLine) IsBlobCrossedLine ¶ added in v0.8.3
func (vline *VirtualLine) IsBlobCrossedLine(b blob.Blobie) bool
IsBlobCrossedLine Wrapper around b.IsCrossedTheLine(y2,x1,y1,direction) and b.IsCrossedTheObliqueLine(x2,y2,x1,y1,direction). See ref. https://github.com/LdDl/gocv-blob/blob/master/v2/blob/line_cross.go
func (*VirtualLine) Scale ¶ added in v0.8.3
func (vline *VirtualLine) Scale(scaleX, scaleY float64)
Scale Scales down (so scale factor can be > 1.0 ) virtual line (scaleX, scaleY) - How to scale source (x1,y1) and (x2,y2) coordinates Important notice: 1. Source coordinates won't be modified 2. Source coordinates would be used for scaling. So you can't scale line multiple times
type VirtualLineInfo ¶ added in v0.2.0
type VirtualLineInfo struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` LeftX int32 `protobuf:"varint,2,opt,name=left_x,json=leftX,proto3" json:"left_x,omitempty"` LeftY int32 `protobuf:"varint,3,opt,name=left_y,json=leftY,proto3" json:"left_y,omitempty"` RightX int32 `protobuf:"varint,4,opt,name=right_x,json=rightX,proto3" json:"right_x,omitempty"` RightY int32 `protobuf:"varint,5,opt,name=right_y,json=rightY,proto3" json:"right_y,omitempty"` // contains filtered or unexported fields }
Reference information about virtual line (detection line)
func VirtualLineInfoGRPC ¶ added in v0.8.3
func VirtualLineInfoGRPC(lineID int64, virtualLine *VirtualLine) *VirtualLineInfo
VirtualLineInfoGRPC Prepares gRPC message 'VirtualLineInfo' Identifier of a line (int64) and its parameters (x0,y0 and x1,y1) should be provide
func (*VirtualLineInfo) Descriptor
deprecated
added in
v0.2.0
func (*VirtualLineInfo) Descriptor() ([]byte, []int)
Deprecated: Use VirtualLineInfo.ProtoReflect.Descriptor instead.
func (*VirtualLineInfo) GetId ¶ added in v0.2.0
func (x *VirtualLineInfo) GetId() int64
func (*VirtualLineInfo) GetLeftX ¶ added in v0.2.0
func (x *VirtualLineInfo) GetLeftX() int32
func (*VirtualLineInfo) GetLeftY ¶ added in v0.2.0
func (x *VirtualLineInfo) GetLeftY() int32
func (*VirtualLineInfo) GetRightX ¶ added in v0.2.0
func (x *VirtualLineInfo) GetRightX() int32
func (*VirtualLineInfo) GetRightY ¶ added in v0.2.0
func (x *VirtualLineInfo) GetRightY() int32
func (*VirtualLineInfo) ProtoMessage ¶ added in v0.2.0
func (*VirtualLineInfo) ProtoMessage()
func (*VirtualLineInfo) ProtoReflect ¶ added in v0.4.1
func (x *VirtualLineInfo) ProtoReflect() protoreflect.Message
func (*VirtualLineInfo) Reset ¶ added in v0.2.0
func (x *VirtualLineInfo) Reset()
func (*VirtualLineInfo) String ¶ added in v0.2.0
func (x *VirtualLineInfo) String() string
type WGS84Point ¶ added in v0.8.0
type WGS84Point struct { Longitude float32 `protobuf:"fixed32,1,opt,name=longitude,proto3" json:"longitude,omitempty"` Latitude float32 `protobuf:"fixed32,2,opt,name=latitude,proto3" json:"latitude,omitempty"` // contains filtered or unexported fields }
Representation of a point in spatial system called WGS84. See ref. https://en.wikipedia.org/wiki/World_Geodetic_System#WGS84
func (*WGS84Point) Descriptor
deprecated
added in
v0.8.0
func (*WGS84Point) Descriptor() ([]byte, []int)
Deprecated: Use WGS84Point.ProtoReflect.Descriptor instead.
func (*WGS84Point) GetLatitude ¶ added in v0.8.0
func (x *WGS84Point) GetLatitude() float32
func (*WGS84Point) GetLongitude ¶ added in v0.8.0
func (x *WGS84Point) GetLongitude() float32
func (*WGS84Point) ProtoMessage ¶ added in v0.8.0
func (*WGS84Point) ProtoMessage()
func (*WGS84Point) ProtoReflect ¶ added in v0.8.0
func (x *WGS84Point) ProtoReflect() protoreflect.Message
func (*WGS84Point) Reset ¶ added in v0.8.0
func (x *WGS84Point) Reset()
func (*WGS84Point) String ¶ added in v0.8.0
func (x *WGS84Point) String() string