Skip to content

v1.1.0

Latest

Choose a tag to compare

@rfonod rfonod released this 12 Nov 21:21
4bb97fc

🎯 Oriented Bounding Box (OBB) Support

This release adds comprehensive support for oriented bounding boxes as exclusion masks, enabling more precise masking of rotated objects during video stabilization.

✨ New Features

  • xywha box format: Define boxes with explicit rotation angles [x_center, y_center, width, height, angle_degrees]
  • Smart mask creation: Automatic rotation detection and optimal masking strategy for all box formats
  • Enhanced box transformation: Transform boxes between any format combination while preserving rotation information

🔧 Improvements

  • More precise exclusion masks for rotated objects (only masks actual object area, not enclosing rectangle)
  • Improved feature detection efficiency around rotated objects
  • Fast rectangular masking preserved for axis-aligned boxes

📖 Usage Example

import numpy as np

# Define oriented boxes with rotation angles
obb_boxes = np.array([
    [100, 150, 50, 30, 45],   # 45° rotation
    [200, 200, 60, 40, 90],   # 90° rotation
])

stabilizer.set_ref_frame(ref_frame, obb_boxes, box_format='xywha')

🛡️ Compatibility

  • ✅ Fully backward compatible - existing code using xywh format works without changes
  • ✅ All 26 tests passing (20 existing + 6 new)
  • ✅ Zero security vulnerabilities (CodeQL analysis)

📝 Documentation

  • Updated README with detailed box format explanations and practical examples
  • Added comprehensive test coverage for OBB functionality

Full Changelog: v1.0.1...v1.1.0