util

package
v0.0.0-...-aa3414e Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const EPS = 1e-5

Variables

This section is empty.

Functions

func Clamp

func Clamp[T cmp.Ordered](x, min, max T) T

Clamp 辅助函数

func DrawBoundingBox

func DrawBoundingBox(origImg gocv.Mat, faces []types.FaceDetection) error

DrawBoundingBox 在图像上绘制人脸检测框

func FastNMS

func FastNMS(results []*types.FaceDetection, threshold float32, topK int, candidateSize int) []int

func GetSharedLibPath

func GetSharedLibPath() string

func IouOf

func IouOf(a, b types.BoundingBox) float32

IouOf A∩B / (A + B- A∩B + 1e-5)

func IouOfOptimized

func IouOfOptimized(a, b types.BoundingBox, areaA, areaB float32) float32

IouOfOptimized 优化的IoU计算,传入预计算面积

func NMS

func NMS(results []*types.FaceDetection, threshold float32, topK int, candidateSize int) []int

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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