OpenVC install on Lucid for Sikuli

Asked by Rudiger Wolf

Hi
The Sikuli website says:
"Released on 2010/02/23. For Linux (Java 6 and OpenCV(libcv1) are required)"

It seems that Ubuntu Lucid come with OpenCV (Open Computer Vision) runtime libraries libcv4.

Will it be sufficient to install that and the Sikuli release to get it working in Ubuntu Lucid?

Thanks
Rudi

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Michael A. Phillips (maphilli14) said :
#1

I can't seem to get Sikuli to execute commands on Lucid. I'll post findings here, but for now it runs, but doesn't do any matching.

Revision history for this message
Michael A. Phillips (maphilli14) said :
#2

Try the latest version, seems to fix for me!
also, I installed these:

sudo apt-get install sun-java6-jre libcv4 libcvaux4 libhighgui4

Revision history for this message
Michael A. Phillips (maphilli14) said :
#3

Actually this only worked on one of my lucid installs and not the other. :(

I tried this:

  545 sudo ln -s /usr/lib/libcxcore.so.4 /usr/lib/libcxcore.so.1
  551 sudo ln -s /usr/lib/libcxcore.so.4 /usr/lib/
  552 sudo ln -s /usr/lib/libcv.so.4 /usr/lib/libcv.so.1
  554 sudo ln -s /usr/lib/libhighgui.so.4 /usr/lib/libhighgui.so.1
  555 sudo ln -s /usr/lib/libcvaux.so.4 /usr/lib/libcvaux.so.1
  556 sudo ln -s /usr/lib/libml.so.4 /usr/lib/libml.so.1

but sikuli 'visualization' still errors off with this:

[sikuli] open Pattern Settings
ScreenMatchProxy loaded.
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: edu.mit.csail.uid.Finder.createFinder([BII)J
 at edu.mit.csail.uid.Finder.createFinder(Native Method)
 at edu.mit.csail.uid.Finder.<init>(Finder.java:46)
 at edu.mit.csail.uid.TargetOffsetPane.<init>(TargetOffsetPane.java:33)
 at edu.mit.csail.uid.PatternWindow.createTargetPanel(PatternWindow.java:75)
 at edu.mit.csail.uid.PatternWindow.<init>(PatternWindow.java:44)
 at edu.mit.csail.uid.ImageButton.actionPerformed(ImageButton.java:159)
 at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
 at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
 at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
 at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
 at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
 at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
 at java.awt.Component.processMouseEvent(Component.java:6263)
 at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
 at java.awt.Component.processEvent(Component.java:6028)
 at java.awt.Container.processEvent(Container.java:2041)
 at java.awt.Component.dispatchEventImpl(Component.java:4630)
 at java.awt.Container.dispatchEventImpl(Container.java:2099)
 at java.awt.Component.dispatchEvent(Component.java:4460)
 at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
 at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
 at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
 at java.awt.Container.dispatchEventImpl(Container.java:2085)
 at java.awt.Window.dispatchEventImpl(Window.java:2478)
 at java.awt.Component.dispatchEvent(Component.java:4460)
 at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
 at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
 at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
 at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
 at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Revision history for this message
Michael A. Phillips (maphilli14) said :
#4

Followed this and 'reinstalled'

WORKING!!!

Revision history for this message
Michael A. Phillips (maphilli14) said :
#5

Sorry, missed the link:

https://answers.launchpad.net/sikuli/+question/110569

If you use sikuli-script.jar alone, the jnilibs should be extracted from the JAR to tmplib/ automatically.
Here is a quick way to test if it works.

$ java -cp sikuli-script.jar org.python.util.jython
Jython 2.5.1 (Release_2_5_1:6813, Sep 26 2009, 13:47:54)[Java HotSpot(TM) Client VM (Apple Inc.)] on java1.6.0_17
Type "help", "copyright", "credits" or "license" for more information.
>>> from sikuli.Sikuli import *
ScreenMatchProxy loaded.
VDictProxy loaded.
ScreenMatchProxy loaded.

If you see the three lines "xxx loaded", it is working. One problem you may encounter is that the jnilibs complain UnsatisfiedLinkError because they can't find opencv libs in /opt/local/lib. To resolve this, you can simply install opencv using DarwinPorts (port install opencv), or you can copy *.dylib's from Sikuli-IDE.app/Contents/Frameworks and use install_name_tool to change their reference path. (Sikuli-IDE.app/Contents/Frameworks/change-lib-path.sh will show you how to do that.)

Can you help with this problem?

Provide an answer of your own, or ask Rudiger Wolf for more information if necessary.

To post a message you must log in.