You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Certainly! We'll need to modify both the Swift code, the Rust bindings, and the CLI arguments to allow changing the OCR accuracy. Here's how we can do that:
First, let's modify the Swift code to accept an accuracy parameter:
Now you can use the ocr_accuracy field in your main application logic to determine whether to use fast or accurate recognition when calling perform_ocr_apple. For example:
let use_fast_recognition = matches!(cli.ocr_accuracy, CliOcrAccuracy::Fast);let ocr_result = perform_ocr_apple(&image, use_fast_recognition);
This change allows users to specify the OCR accuracy level using a command-line argument like --ocr-accuracy fast or --ocr-accuracy accurate. The default is set to "accurate" to maintain the existing behavior.
Remember to update your Swift compilation command to include the new parameter, and make sure to propagate this change through your application wherever the OCR function is called.
The text was updated successfully, but these errors were encountered:
Certainly! We'll need to modify both the Swift code, the Rust bindings, and the CLI arguments to allow changing the OCR accuracy. Here's how we can do that:
apple.rs
:cli.rs
:Now you can use the
ocr_accuracy
field in your main application logic to determine whether to use fast or accurate recognition when callingperform_ocr_apple
. For example:This change allows users to specify the OCR accuracy level using a command-line argument like
--ocr-accuracy fast
or--ocr-accuracy accurate
. The default is set to "accurate" to maintain the existing behavior.Remember to update your Swift compilation command to include the new parameter, and make sure to propagate this change through your application wherever the OCR function is called.
The text was updated successfully, but these errors were encountered: