protos

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_object_proto protoreflect.FileDescriptor
View Source
var File_service_proto protoreflect.FileDescriptor
View Source
var Service_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "license_plate_recognition.Service",
	HandlerType: (*ServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ProcessImage",
			Handler:    _Service_ProcessImage_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "service.proto",
}

Service_ServiceDesc is the grpc.ServiceDesc for Service service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterServiceServer

func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)

Types

type BBox

type BBox 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 (*BBox) Descriptor deprecated

func (*BBox) Descriptor() ([]byte, []int)

Deprecated: Use BBox.ProtoReflect.Descriptor instead.

func (*BBox) GetHeight

func (x *BBox) GetHeight() int32

func (*BBox) GetWidth

func (x *BBox) GetWidth() int32

func (*BBox) GetXLeft

func (x *BBox) GetXLeft() int32

func (*BBox) GetYTop

func (x *BBox) GetYTop() int32

func (*BBox) ProtoMessage

func (*BBox) ProtoMessage()

func (*BBox) ProtoReflect

func (x *BBox) ProtoReflect() protoreflect.Message

func (*BBox) Reset

func (x *BBox) Reset()

func (*BBox) String

func (x *BBox) String() string

type LPRInfo

type LPRInfo struct {

	// License plate location
	Bbox *BBox `protobuf:"bytes,1,opt,name=bbox,proto3" json:"bbox,omitempty"`
	// License plate OCR bounding bboxes. Bounding bboxes are sorted by horizontal line
	// Warning: those coordinates are relative to license plate bounding box, not the parent image!
	OcrBboxes []*BBox `protobuf:"bytes,2,rep,name=ocr_bboxes,json=ocrBboxes,proto3" json:"ocr_bboxes,omitempty"`
	// License plate text
	Text string `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty"`
	// contains filtered or unexported fields
}

Information about single license plate

func (*LPRInfo) Descriptor deprecated

func (*LPRInfo) Descriptor() ([]byte, []int)

Deprecated: Use LPRInfo.ProtoReflect.Descriptor instead.

func (*LPRInfo) GetBbox

func (x *LPRInfo) GetBbox() *BBox

func (*LPRInfo) GetOcrBboxes

func (x *LPRInfo) GetOcrBboxes() []*BBox

func (*LPRInfo) GetText

func (x *LPRInfo) GetText() string

func (*LPRInfo) ProtoMessage

func (*LPRInfo) ProtoMessage()

func (*LPRInfo) ProtoReflect

func (x *LPRInfo) ProtoReflect() protoreflect.Message

func (*LPRInfo) Reset

func (x *LPRInfo) Reset()

func (*LPRInfo) String

func (x *LPRInfo) String() string

type LPRRequest

type LPRRequest struct {

	// Bytes representation of image (PNG)
	Image []byte `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"`
	// Optional information about image. Could be usefull if client-side already knows where license plate should be located (due some object detections technique)
	Bbox *BBox `protobuf:"bytes,2,opt,name=bbox,proto3" json:"bbox,omitempty"`
	// contains filtered or unexported fields
}

Essential information to process

func (*LPRRequest) Descriptor deprecated

func (*LPRRequest) Descriptor() ([]byte, []int)

Deprecated: Use LPRRequest.ProtoReflect.Descriptor instead.

func (*LPRRequest) GetBbox

func (x *LPRRequest) GetBbox() *BBox

func (*LPRRequest) GetImage

func (x *LPRRequest) GetImage() []byte

func (*LPRRequest) ProtoMessage

func (*LPRRequest) ProtoMessage()

func (*LPRRequest) ProtoReflect

func (x *LPRRequest) ProtoReflect() protoreflect.Message

func (*LPRRequest) Reset

func (x *LPRRequest) Reset()

func (*LPRRequest) String

func (x *LPRRequest) String() string

type LPRResponse

type LPRResponse struct {

	// Set of found license plates with corresponding information
	LicensePlates []*LPRInfo `protobuf:"bytes,1,rep,name=license_plates,json=licensePlates,proto3" json:"license_plates,omitempty"`
	// Number of seconds has taken to proccess license plate detections and OCR
	Elapsed float32 `protobuf:"fixed32,2,opt,name=elapsed,proto3" json:"elapsed,omitempty"`
	// Optional message from server
	Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	// Optional warning message from server. If it is not empty you probably should investiage such behavior
	Warning string `protobuf:"bytes,4,opt,name=warning,proto3" json:"warning,omitempty"`
	// Optional error message from server. If it is not empty you should investiage the error
	Error string `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

Response from server

func (*LPRResponse) Descriptor deprecated

func (*LPRResponse) Descriptor() ([]byte, []int)

Deprecated: Use LPRResponse.ProtoReflect.Descriptor instead.

func (*LPRResponse) GetElapsed

func (x *LPRResponse) GetElapsed() float32

func (*LPRResponse) GetError

func (x *LPRResponse) GetError() string

func (*LPRResponse) GetLicensePlates

func (x *LPRResponse) GetLicensePlates() []*LPRInfo

func (*LPRResponse) GetMessage

func (x *LPRResponse) GetMessage() string

func (*LPRResponse) GetWarning

func (x *LPRResponse) GetWarning() string

func (*LPRResponse) ProtoMessage

func (*LPRResponse) ProtoMessage()

func (*LPRResponse) ProtoReflect

func (x *LPRResponse) ProtoReflect() protoreflect.Message

func (*LPRResponse) Reset

func (x *LPRResponse) Reset()

func (*LPRResponse) String

func (x *LPRResponse) String() string

type ServiceClient

type ServiceClient interface {
	// Unary service: single request == single response
	ProcessImage(ctx context.Context, in *LPRRequest, opts ...grpc.CallOption) (*LPRResponse, error)
}

ServiceClient is the client API for Service service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewServiceClient

func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient

type ServiceServer

type ServiceServer interface {
	// Unary service: single request == single response
	ProcessImage(context.Context, *LPRRequest) (*LPRResponse, error)
	// contains filtered or unexported methods
}

ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility

type UnimplementedServiceServer

type UnimplementedServiceServer struct {
}

UnimplementedServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedServiceServer) ProcessImage

type UnsafeServiceServer

type UnsafeServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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