A Java application, that turns a webcam into a VisiCut compatible network camera with marker detection and perspective correction. Uses OpenCV through JavaCV
For detailed information, please have a look at the VisiCam Wiki.
- Microsoft Visual C++ 2010 Service Pack 1 Redistributable x64
- Apache Ant 1.9.9
- OpenCV Library 2.4.9
- JavaCV Library 0.8
- Oracle Java JDK 1.7u80 (Login required for downloading)
- Install JDK
- At first add the
ant
executable to%PATH%
environment variable - Add OpenCV bin directory to
%PATH%
:<location>\opencv\build\x64\vc10\bin
- Clone VisiCam by
git clone https://github.com/t-oster/VisiCam.git
to desired destination - Unzip
javacv-0.8-bin.zip
to<yourdestination>\VisiCam\lib\javacv-bin\
Then run:
cmd
cd "<yourdestination>\VisiCam\"
set "JAVACMD=C:\Program Files\Java\jdk1.7.0_80\bin\java.exe"
ant clean
ant -verbose
cmd
cd "<yourdestination>\VisiCam\"
ant run
You may access the spawned web interface on http://localhost:8080
You can also refer to the dedicated documentation of FabLab Chemnitz
Install the required dependencies with: sudo apt-get install openjdk-8-jdk ant libopencv2.4
- Download JavaCV:
- On Linux: Simply run
./lib/fetch-javacv.sh
on the command line in the unzipped VisiCam directory.
- Go in the unzipped VisiCam directory and run
ant
on the command line - run
java -jar dist/VisiCam.jar
on the Command Line or double click on the VisiCam.jar file in finder/explorer
See https://github.com/t-oster/VisiCam/wiki/Fedora-Installation
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.
TODO: currently broken?
See also https://github.com/t-oster/VisiCam/wiki/Raspberry-Pi-installation-on-Raspbian
You can also have a look at the Dockerfile for a more up-to-date list of all commands.
The following is a short summary of how to use VisiCut. For more detailed information, have a look at the VisiCam Wiki.
- Place 4 Markers (Circles within circles) near the corners of you laser-bed. For a first test, almost any configuration is okay, for example like this. Detailed information on how to achieve a professional set-up can be found in the VisiCam Wiki.
- Place a webcam over the laser-cutter, so that it's image contains all the markers.
- Connect the webcam to a PC running VisiCam.
- Go to you web browser and enter the VisiCam URL (is shown in the window after starting VisiCam).
- Click on "Refresh" on the left side to check if the camera is working and the markers are visible.
- Click on "Show Configuration". Here you can specify the resolutions and more important:
- For each Marker-Position (top-left, top-right, bottom-left, bottom-right) select a rectangle on the image, where VisiCam should search the marker
- Save the configuration with a click on the save-button
- In VisiCut go to
Preferences -> Manage Lasercutters -> Edit
and enter the CameraURL, which is<VisiCam URL>/image
. If you have the latest version, you can just click "search" and all VisiCam instances in your Network should appear. - You should see now the image from the webcam. To calibrate the camera go in Visicut to
Options -> Calibrate Camera...
and choose a laser setting. Then click on theSend Calibration Page
-Button. VisiCut will send a calibration file to your lasercutter. It will cut two crosses (with the choosen settings) at (20%/20%) and (80%/80%) of the laser-bed. In the following dialog, you have to take a picture and move the red reference crosses matching to the ones you did just cut. - Be happy with your VisiCam ;)