processFile method
- String filePath,
- Uint8List frameData,
- SegmenterInputMetadata metadata
override
Process an image file and return segmentation result.
This is more reliable than processFrame as ML Kit can decode the image directly from the file path.
Parameters:
filePath: Path to image file (JPEG, PNG, etc.)frameData: Original RGBA frame data for compositingmetadata: Image dimensions for mask scaling
Implementation
@override
Future<SegmentationResult> processFile(
String filePath,
Uint8List frameData,
SegmenterInputMetadata metadata,
) async {
// Stub: just return the frame without processing
return SegmentationResult(
processedFrame: frameData,
mask: null,
processingTimeMs: 0,
success: true,
);
}