performOCR static method
Implementation
static Future<void> performOCR(String inputPath, String outputPath) async {
Process p = await ProcessUtil.start("./data/vision.swift", [inputPath]);
IOSink out = File(outputPath).openWrite();
await p.stdout.pipe(out);
await stderr.addStream(p.stderr);
int exitCode = await p.exitCode;
await out.flush();
await out.close();
if (exitCode != 0) {
throw Exception('OCR process failed with exit code $exitCode');
}
}