Capture text from image

Simple example of using capture text on image…
The credit goes to

You need ocr command you could compile it with Xcode.

This example will open an tab in Safari to display a image of Whisky bottle.
Capture the text on the bottle and it will show: CHIVAS REGAL 12

I do not think it would be possible to do it in AppleScriptObjC, the code use vision framework
but maybe there is other solutions.

tell application "Safari" to tell front window
	set current tab to (make new tab with properties {URL:""})
end tell

do shell script "/usr/local/bin/ocr"

set captureText to (the clipboard) as text
display dialog captureText