detect method
Implementation
@override
void detect(DetectableImage image, bool streamed) async {
if (!busy) {
busy = true;
count++;
Payload? payload = await ITextDetector().detect(image);
if (payload != null) {
Data data = Payload.toData(payload);
await onDetected(data);
} else if (!streamed) {
await onDetectionFailed(Data(data: [
{
"message":
"Text detector $id failed to detect any text in the supplied image"
}
]));
}
busy = false;
}
}