Import other python Modules
Ok,
Sorry for asking so many questions but this is pretty cool stuff.
I am attempting to use PIL + some OCR with my Sikuli script but the normal imports don't work.
I have a python script that works great but I want to mesh it with Sikuli for targeting
-------
from pytesser import *
from PIL import ImageOps, ImageGrab
#want to use SIkuli to find the appropriate region & get the coordinates for the screen shot + OCR
#Capture image on screen at these coordinates
bbox = [0,0,100,100]
im = ImageGrab.
#make image grayscale
gsIM = ImageOps.
#invert image (the text is white on black, needs to be black on white for the OCR algorithm)
inIM = ImageOps.
print image_to_
-------
My Sikuli script looks like
target = find(1272918449
targetleft = target.left(25)
print str(targetleft.
-------
What I want is to combine them so that:
bbox = [targetleft.
run OCR on that bad boy
So the question then becomes, do I keep things in the Sikuli IDE or try to set up my python scripts to be able to run Sikuli stuff outside of the IDE (which I'm aware how to in a Java program but am unsure in a python environment)
I did try the below in an attempt to import things / run things using python, but the imports failed with "ImportError: No module named pytesser " or any other python module I was trying. Any suggestions or pointers would be helpful and appreciated.
exec open("C:
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Komarue for more information if necessary.