Files

15 lines
586 B
Go

package spike
import "silverpose/v2/internal/pose"
// LetterboxBGRToNCHW converts one packed BGR frame into the RGB, CHW,
// float32 tensor expected by the locked 640-pixel YOLO pose ONNX model.
//
// T-303 aligned the implementation with the fixed-shape Ultralytics
// letterbox used by the V1/ONNX baseline. New V2 code should import the pose
// package directly to retain the returned coordinate transform.
func LetterboxBGRToNCHW(frame []byte, width, height, target int) ([]float32, error) {
input, _, err := pose.PreprocessBGR(frame, width, height, target)
return input, err
}