August 2, 2020

SikuliX on Linux - vision based automation

http://sikulix.com

It's a vision based automation tool, you give an image, it will find a match and do automation.  It's a great open source tool.

I used this on Windows, and now my main OS is Ubuntu, and this is some information and note on it.  It uses OpenCV and Tesseract OCR.

https://avleonov.com/wp-content/uploads/2017/02/script_window.png

Install On Ubuntu 20.04

Installing and using SikuliX on Window is simple and straightforward.  On Linux (Ubuntu 20.04 for my case), it needs little bit more work.

Requirements
  • OpenCV
  • Tesseract OCR
  • Java 11 or later

1. Download SikuliX

Download it from https://raiman.github.io/SikuliX1/downloads.html
or do
$ wget https://launchpad.net/sikuli/sikulix/2.0.4/+download/sikulixide-2.0.4.jar

2. Install Java 11 or later
  • This will not work with Java8. 
  • OpenJDK works fine.
  • Dealing with multiple Java versions: I have Java 8, 11, 14, and Oracle JDK8 as well.  My default Java is set to 8.  To run this software with Java 14, I used bash script, and added using Alacarte (https://en.wikipedia.org/wiki/Alacarte)
3. Install/Set up OpenCV, Tesseract OCR

$ sudo apt-get install libopencv4.2-java libopencv4.2-jni
$ sudo apt-get install tesseract-ocr

$ cd /usr/lib/jni/
$ sudo ln -s libopencv_java420.so libopencv_java.so


4. Bash script

#!/usr/bin/bash
JAVA_HOME=/usr/lib/jvm/java-14-openjdk-amd64
SIKULIX_HOME=/opt/sikulix
SIKULIX_JAR=sikulixide-2.0.4.jar
LOG=$SIKULIX_HOME/sikulix.log
$JAVA_HOME/bin/java -jar $SIKULIX_HOME/$SIKULIX_JAR >> $LOG 2>&1


SikuliX Resources

Other Resources

Other opensource or free automation tools

No comments: