Sikuli IDE with Fiji(ImageJ)
I am trying write a code on Sikuli IDE to invert a captured image with IJ library. Then I will try to grab the text of that inverted image with Sikuli. Without inverting OCR is not successful (black background, white text).
But I couldn't import IJ to Sikuli. Here is my code:
import shutil
from ij import IJ
OpHp = capture(
path = 'C:\\photo\
shutil.
imp = IJ.openImage(path)
IJ.run(imp, "Invert", "")
IJ.save(imp, 'C:\\photo\
When I run, it gives: [error] ImportError ( No module named ij ). Is there a way to import it? Or is there any other way to invert an image with Sikuli?
Then I want to grab the text from the inverted image but as far as I know Sikuli only allows to grab text from a region with:
myRegion.text()
command. Is there a way to grab the text of an image (not of a region) with Sikuli?
Thanks in advance.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Emre Bahtiyar
- Solved:
- Last query:
- Last reply: