opencv

package
v0.0.0-...-6dbabcf Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageProcessorInterface

type ImageProcessorInterface interface {
	CaptureStreamVideo(input interface{}, runDetectionCallback func(currentFrame gocv.Mat)) error
	EncodeImageToBMP(currentFrame gocv.Mat) (output *gocv.NativeByteBuffer, err error)
	DrawRectangle(currentImage gocv.Mat, coordinates image.Rectangle)
	DrawText(currentImage gocv.Mat, text string, coordinates image.Point)
}

type OpenCVImageProcessor

type OpenCVImageProcessor struct{}

func NewOpenCVImageProcessor

func NewOpenCVImageProcessor() *OpenCVImageProcessor

func (*OpenCVImageProcessor) CaptureStreamVideo

func (oip *OpenCVImageProcessor) CaptureStreamVideo(input interface{}, runDetectionCallback func(currentFrame gocv.Mat)) error

Start capturing video frames by Device ID, video file, RTSP/URL, or GStreamer pipeline

func (*OpenCVImageProcessor) DrawRectangle

func (oip *OpenCVImageProcessor) DrawRectangle(currentImage gocv.Mat, coordinates image.Rectangle)

Draws a rectangle on the processed frame at the passed coordinates

func (*OpenCVImageProcessor) DrawText

func (oip *OpenCVImageProcessor) DrawText(currentImage gocv.Mat, text string, coordinates image.Point)

Draws a text on the processed frame at the passed coordinates

func (*OpenCVImageProcessor) EncodeImageToBMP

func (oip *OpenCVImageProcessor) EncodeImageToBMP(currentFrame gocv.Mat) (output *gocv.NativeByteBuffer, err error)

Compresses the image and stores it in the returned memory buffer, using .bmp extension

Jump to

Keyboard shortcuts

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