t-oster / VisiCam

A Java application, that turns a webcam into a VisiCut compatible network camera with marker detection and perspective correction. Uses OpenCV through JavaCV
Other
36 stars 12 forks source link

Raspberry Pi installation #2

Closed peteruithoven closed 10 years ago

peteruithoven commented 10 years ago

I've bin trying to get VisiCam working on a Raspberry Pi.

I've done:

sudo apt-get update
sudo apt-get install libopencv-dev
sudo apt-get install python-opencv
sudo apt-get install ant
sudo apt-get install openjdk-7-jre
git clone https://github.com/t-oster/VisiCam.git
cd VisiCam
sudo cp javacv-pi/javacv.jar javacv-bin/
sudo ant jar

This gives:

BUILD FAILED
/VisiCam/nbproject/build-impl.xml:940: The following error occurred while executing this line:
/VisiCam/nbproject/build-impl.xml:293: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "/usr/lib/jvm/java-6-openjdk-armhf/jre"

While this does exist?

pi@raspberrypi /usr/lib/jvm/java-6-openjdk-armhf/jre $ ls
ASSEMBLY_EXCEPTION  bin  lib  man  THIRD_PARTY_README

I'm not sure I understand the following Readme instructions, where is this dist/lib folder for example?

If you use it on ARM, you need to replace the javacv.jar in the dist/lib folder with the javacv.jar from the lib/javacv-pi folder. It works on ArchLinux (opencv can be installed through pacman). But is VERY SLOW. Any help is appreciated.

My translation was doing (like mentioned above):

sudo cp javacv-pi/javacv.jar javacv-bin/
t-oster commented 10 years ago

You need "openjdk-7-jdk", not "jre"

peteruithoven commented 10 years ago
BUILD SUCCESSFUL

After installing "openjdk-7-jdk" and selecting "/usr/lib/jvm/java-7-openjdk-armhf/jre/bin/java" trough the following command it worked. Thanks!

sudo update-alternatives --config java