better ocr performance
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
# Push-button installer of macOS on VirtualBox
|
||||
# (c) myspaghetti, licensed under GPL2.0 or higher
|
||||
# url: https://github.com/myspaghetti/macos-virtualbox
|
||||
# version 0.97.1
|
||||
# version 0.97.2
|
||||
|
||||
# Dependencies: bash coreutils gzip unzip wget xxd dmg2img
|
||||
# Optional features: tesseract-ocr tesseract-ocr-eng
|
||||
@@ -1493,7 +1493,7 @@ function prompt_lang_utils_terminal() {
|
||||
animated_please_wait 30
|
||||
for i in $(seq 1 60); do # try automatic ocr for about 5 minutes
|
||||
VBoxManage controlvm "${vm_name}" screenshotpng "${vm_name}_screenshot.png" 2>&1 1>/dev/null
|
||||
ocr="$(tesseract "${vm_name}_screenshot.png" - -l eng 2>/dev/null)"
|
||||
ocr="$(tesseract "${vm_name}_screenshot.png" - --dpi 70 -l eng 2>/dev/null)"
|
||||
regex='Language|English' # for zsh quoted regex compatibility
|
||||
if [[ "${ocr}" =~ ${regex} ]]; then
|
||||
animated_please_wait 20
|
||||
|
||||
Reference in New Issue
Block a user