Documentation
¶
Index ¶
- func ImgprocModules(ctx *Context) wypes.Modules
- func MatModules(ctx *Context) wypes.Modules
- func NetModules(ctx *Context) wypes.Modules
- func ObjDetectModules(ctx *Context) wypes.Modules
- type BlobParams
- func (BlobParams) Lift(s *wypes.Store) BlobParams
- func (v BlobParams) Lower(s *wypes.Store)
- func (BlobParams) MemoryLift(s *wypes.Store, offset uint32) (BlobParams, uint32)
- func (v BlobParams) MemoryLower(s *wypes.Store, offset uint32) (length uint32)
- func (v BlobParams) Unwrap() gocv.ImageToBlobParams
- func (v BlobParams) ValueTypes() []wypes.ValueType
- type BlobRectImageParams
- func (BlobRectImageParams) Lift(s *wypes.Store) BlobRectImageParams
- func (v BlobRectImageParams) Lower(s *wypes.Store)
- func (BlobRectImageParams) MemoryLift(s *wypes.Store, offset uint32) (BlobRectImageParams, uint32)
- func (v BlobRectImageParams) MemoryLower(s *wypes.Store, offset uint32) (length uint32)
- func (v BlobRectImageParams) Unwrap() BlobRectImageParams
- func (v BlobRectImageParams) ValueTypes() []wypes.ValueType
- type CascadeClassifier
- type Context
- type FaceDetectorYN
- type Frame
- type Layer
- type MixMaxLocResult
- func (MixMaxLocResult) Lift(s *wypes.Store) MixMaxLocResult
- func (v MixMaxLocResult) Lower(s *wypes.Store)
- func (MixMaxLocResult) MemoryLift(s *wypes.Store, offset uint32) (MixMaxLocResult, uint32)
- func (v MixMaxLocResult) MemoryLower(s *wypes.Store, offset uint32) (length uint32)
- func (v MixMaxLocResult) Unwrap() MixMaxLocResult
- func (v MixMaxLocResult) ValueTypes() []wypes.ValueType
- type Net
- type RGBA
- type Rect
- type Scalar
- func (Scalar) Lift(s *wypes.Store) Scalar
- func (v Scalar) Lower(s *wypes.Store)
- func (Scalar) MemoryLift(s *wypes.Store, offset uint32) (Scalar, uint32)
- func (v Scalar) MemoryLower(s *wypes.Store, offset uint32) (length uint32)
- func (v Scalar) Unwrap() gocv.Scalar
- func (v Scalar) ValueTypes() []wypes.ValueType
- type Size
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ImgprocModules ¶
func MatModules ¶
func NetModules ¶
func ObjDetectModules ¶
Types ¶
type BlobParams ¶ added in v0.4.0
type BlobParams struct {
ScaleFactor wypes.Float32
Size Size
Mean Scalar
SwapRB wypes.Bool
DDepth wypes.UInt8
DataLayout wypes.UInt8
PaddingMode wypes.UInt8
Border Scalar
}
BlobParams represents the record "wasm:cv/types#blob-params".
record blob-params {
scale-factor: f32,
size: size,
mean: scalar,
swap-RB: bool,
ddepth: u8,
data-layout: data-layout-type,
padding-mode: padding-mode-type,
border: scalar,
}
func (BlobParams) Lift ¶ added in v0.4.0
func (BlobParams) Lift(s *wypes.Store) BlobParams
func (BlobParams) Lower ¶ added in v0.4.0
func (v BlobParams) Lower(s *wypes.Store)
Lower implements [Lower] interface.
func (BlobParams) MemoryLift ¶ added in v0.4.0
func (BlobParams) MemoryLift(s *wypes.Store, offset uint32) (BlobParams, uint32)
MemoryLift implements [MemoryLift] interface.
func (BlobParams) MemoryLower ¶ added in v0.4.0
func (v BlobParams) MemoryLower(s *wypes.Store, offset uint32) (length uint32)
MemoryLower implements [MemoryLower] interface.
func (BlobParams) Unwrap ¶ added in v0.4.0
func (v BlobParams) Unwrap() gocv.ImageToBlobParams
func (BlobParams) ValueTypes ¶ added in v0.4.0
func (v BlobParams) ValueTypes() []wypes.ValueType
type BlobRectImageParams ¶ added in v0.4.0
type BlobRectImageParams struct {
Offset uint32
Params BlobParams
Rects wypes.List[Rect]
Size Size
}
func (BlobRectImageParams) Lift ¶ added in v0.4.0
func (BlobRectImageParams) Lift(s *wypes.Store) BlobRectImageParams
func (BlobRectImageParams) Lower ¶ added in v0.4.0
func (v BlobRectImageParams) Lower(s *wypes.Store)
Lower implements [Lower] interface.
func (BlobRectImageParams) MemoryLift ¶ added in v0.4.0
func (BlobRectImageParams) MemoryLift(s *wypes.Store, offset uint32) (BlobRectImageParams, uint32)
MemoryLift implements [MemoryLift] interface.
func (BlobRectImageParams) MemoryLower ¶ added in v0.4.0
func (v BlobRectImageParams) MemoryLower(s *wypes.Store, offset uint32) (length uint32)
MemoryLower implements [MemoryLower] interface.
func (BlobRectImageParams) Unwrap ¶ added in v0.4.0
func (v BlobRectImageParams) Unwrap() BlobRectImageParams
func (BlobRectImageParams) ValueTypes ¶ added in v0.4.0
func (v BlobRectImageParams) ValueTypes() []wypes.ValueType
type CascadeClassifier ¶
type CascadeClassifier struct {
ID wypes.UInt32
Name string
Filename string
Classifier gocv.CascadeClassifier
}
CascadeClassifier is a wrapper around gocv.CascadeClassifier for detection.
func NewCascadeClassifier ¶
func NewCascadeClassifier(name string) *CascadeClassifier
NewCascadeClassifier creates a new CascadeClassifier.
func (*CascadeClassifier) Close ¶
func (c *CascadeClassifier) Close()
Close closes the CascadeClassifier.
func (*CascadeClassifier) SetClassifier ¶
func (cc *CascadeClassifier) SetClassifier(c gocv.CascadeClassifier)
SetClassifier sets the gocv.CascadeClassifier for the CascadeClassifier.
type Context ¶
type Context struct {
ReturnDataPtr uint32
ModelsDir string
Config *config.Store
FrameStore *datastore.Frames
ProcessorStore *datastore.Processors
EnableCUDA bool
}
Context is the configuration for the cv package used when each call is made from the guest module.
type FaceDetectorYN ¶
type FaceDetectorYN struct {
ID wypes.UInt32
Name string
Filename string
Detector gocv.FaceDetectorYN
}
FaceDetectorYN is a wrapper around gocv.FaceDectectorYN for detection.
func NewFaceDetectorYN ¶
func NewFaceDetectorYN(model string) *FaceDetectorYN
NewFaceDetectorYN creates a new FaceDetectorYN.
func (*FaceDetectorYN) SetDetector ¶
func (d *FaceDetectorYN) SetDetector(dd gocv.FaceDetectorYN)
SetDetector sets the gocv.FaceDetectorYN for the FaceDectectorYN.
type Frame ¶
Frame is a container for an image frame.
func NewEmptyFrame ¶
func NewEmptyFrame() *Frame
NewEmptyFrame creates a new Frame with an empty Mat.
type MixMaxLocResult ¶ added in v0.4.0
MixMaxLocResult represents the record "wasm:cv/types#mix-max-loc-result".
record mix-max-loc-result {
min-val: f32,
max-val: f32,
min-loc: size,
max-loc: size,
}
func (MixMaxLocResult) Lift ¶ added in v0.4.0
func (MixMaxLocResult) Lift(s *wypes.Store) MixMaxLocResult
func (MixMaxLocResult) Lower ¶ added in v0.4.0
func (v MixMaxLocResult) Lower(s *wypes.Store)
Lower implements [Lower] interface.
func (MixMaxLocResult) MemoryLift ¶ added in v0.4.0
func (MixMaxLocResult) MemoryLift(s *wypes.Store, offset uint32) (MixMaxLocResult, uint32)
MemoryLift implements [MemoryLift] interface.
func (MixMaxLocResult) MemoryLower ¶ added in v0.4.0
func (v MixMaxLocResult) MemoryLower(s *wypes.Store, offset uint32) (length uint32)
MemoryLower implements [MemoryLower] interface.
func (MixMaxLocResult) Unwrap ¶ added in v0.4.0
func (v MixMaxLocResult) Unwrap() MixMaxLocResult
func (MixMaxLocResult) ValueTypes ¶ added in v0.4.0
func (v MixMaxLocResult) ValueTypes() []wypes.ValueType
type RGBA ¶
RGBA represents the record "wasm:cv/types#RGBA".
record RGBA {
r: u8,
g: u8,
b: u8,
a: u8,
}
func (RGBA) MemoryLift ¶
MemoryLift implements [MemoryLift] interface.
func (RGBA) MemoryLower ¶
MemoryLower implements [MemoryLower] interface.
func (RGBA) ValueTypes ¶
type Rect ¶
Rect represents the record "wasm:cv/types#rect".
record rect {
min: size,
max: size,
}
func (Rect) MemoryLift ¶
MemoryLift implements [MemoryLift] interface.
func (Rect) MemoryLower ¶
MemoryLower implements [MemoryLower] interface.
func (Rect) ValueTypes ¶
type Scalar ¶
Scalar represents the record "wasm:cv/types#scalar".
record scalar {
val1: f32,
val2: f32,
val3: f32,
val4: f32,
}
func (Scalar) MemoryLift ¶
MemoryLift implements [MemoryLift] interface.
func (Scalar) MemoryLower ¶
MemoryLower implements [MemoryLower] interface.
func (Scalar) ValueTypes ¶
type Size ¶
Size represents the record "wasm:cv/types#size".
record size {
x: s32,
y: s32,
}
func (Size) MemoryLift ¶
MemoryLift implements [MemoryLift] interface.
func (Size) MemoryLower ¶
MemoryLower implements [MemoryLower] interface.