publishFramingSubject static method

Future<void> publishFramingSubject({
  1. required double cx,
  2. required double cy,
  3. required double width,
  4. required double height,
})

Publishes the subject box that auto-framing follows.

Drives the GPU pipeline's framing: an app running its own face or person detection calls this on every detection; the CPU pipeline's built-in detector needs no call. cx, cy is the subject center and width, height its size, all normalized 0..1 against the SDK's output frame, not the raw camera frame. Pass a width and height of 0 when the face is lost; the crop then returns to the full frame. The last box stays in force until replaced. Same signature on Android and iOS.

Implementation

static Future<void> publishFramingSubject({
  required double cx,
  required double cy,
  required double width,
  required double height,
}) {
  return _channel.invokeMethod('publishFramingSubject', {
    'cx': cx,
    'cy': cy,
    'width': width,
    'height': height,
  });
}