The installation process is the same as in Ubuntu 10.10 but it looks like there is a problem when executing the configure script. When running “./Configure
” the gstreamer libraries are not correctly configured in the GST_LIBS
variable. Here is how it is defined in the script:
GST_LIBS=`pkg-config --libs gstreamer-0.10`
You can fix this problem by manually adding the GST_LIBS
variable to the definition of the LIBS
variable:
LIBS="-lpthread -lglut -lGLU -lGL -lXi -lX11 -lm $GST_LIBS"
You can also add the result of executing the “pkg-config --libs gstreamer-0.10
” command to that variable, both will make LIBS
have this value:
LIBS="-lpthread -lglut -lGLU -lGL -lXi -lX11 -lm -pthread -lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.0 -lxml2 -lgthread-2.0 -lrt -lglib-2.0"
You may also have some problems with V4L when executing make
, this is caused because they changed the “linux/videodev.h
” header file name to “libv4l1-videodev.h
”. If you have that problem change the header file name in those files of ARToolKit:
include/AR/sys/videoLinuxV4L.h lib/SRC/VideoLinuxV4L/video.c
Hi, thanky you for your tutorial. I still have the following problem:
When running ./simpleTest, I get:
Using config string from environment [v4l2src device=/dev/video0 use-fixed-fps=false ! ffmpegcolorspace ! capsfilter caps=video/x-raw-rgb,bpp=24 ! identity name=artoolkit ! fakesink].
ARVideo may be configured using one or more of the following options,
separated by a space:
DEVICE CONTROLS:
-dev=filepath
specifies device file.
-channel=N
specifies source channel.
-noadjust
prevent adjusting the width/height/channel if not suitable.
-width=N
specifies expected width of image.
-height=N
specifies expected height of image.
-palette=[RGB|YUV420P]
specifies the camera palette (WARNING:all are not supported on each camera !!).
IMAGE CONTROLS (WARNING: every options are not supported by all camera !!):
-brightness=N
specifies brightness. (0.0 1.0)
-contrast=N
specifies contrast. (0.0 1.0)
-saturation=N
specifies saturation (color). (0.0 1.0) (for color camera only)
-hue=N
specifies hue. (0.0 1.0) (for color camera only)
-whiteness=N
specifies whiteness. (0.0 1.0) (REMARK: gamma for some drivers, otherwise for greyscale camera only)
-color=N
specifies saturation (color). (0.0 1.0) (REMARK: obsolete !! use saturation control)
OPTION CONTROLS:
-mode=[PAL|NTSC|SECAM]
specifies TV signal mode (for tv/capture card).
What should I do?
Your problem is that you selected option number 1 for video input (V4L) when you configured with “./Configure” (you can find that text message you posted in the lib/SRC/VideoLinuxV4L/video.c on ar2VideoDispOption function), but you are configuring the ARTOOLKIT_CONFIG environment variable with a config string for a GStreamer video input.
If you want to use GStreamer as input (for webcams using /dev/videoX devices as it looks like from you config string) configure again running “./Configure”, select the option for GStreamer (it should be option number 5 if you didn’t apply any patch to ARToolKit), compile and install it again.
If you want to use V4L as video input you should change your ARTOOLKIT_CONFIG environment variable with a config string that describes a video camera as the message explains. I’ve never used V4L though.
Hello,
I am trying to get ARToolKit to work and compiled it to use the GStreamer. Then running it with no ARTOOLKIT_CONFIG variable set I get this:
ARToolKit/bin$ ./videoTest
No video config string supplied, using defaults.
ioctl failed
How do you setup the configuration? If I do something like:
export ARTOOLKIT_CONFIG=’asdf’
I get the same error’s as Marco above. I am just hacking at it at the moment to just see if it can work. I initially just want to use the built in web cam, but then like you would like to use the Kinect.
First I’ll try to figure out if your webcam works properly. Check if you have any /dev/videoX file (X is a number, and usually you only have 1 webcam so it should be /dev/video0) or you can try “camorama” or “cheese” to see live video from your webcam. ioctl error may be caused because your webcam driver is not working OK.
Once you know your webcam is working OK you can look at Install ARToolKit 2.72.1 in Ubuntu 10.10 how to configure the ARTOOLKIT_CONFIG variable but for GStreamer and only one webcam this should work:
export ARTOOLKIT_CONFIG=”v4l2src device=/dev/video0 use-fixed-fps=false ! ffmpegcolorspace ! capsfilter caps=video/x-raw-rgb,bpp=24 ! identity name=artoolkit ! fakesink”
Then try using “./simpleTest” because I think the “videoTest” example uses a fixed configuration string that is not correct.
Thanks for the help, that started pushing me in the correct direction. I used your config string, but for some reason it did not work with my onboard camera or kinect. For those of you who are wondering what this config string is, its GSTREAMER configuration options for a video device. ARToolkit needs this to find out how to read from the video device.
After playing with ‘gst-launch-0.10 $ARTOOLKIT_CONFIG’ and updating the config I eventually got it working. I needed to set the height and width of the image.
I wrote down the information on my post about the same things: http://adriangerardcooke.com/kinect-on-ubuntu-12-04/
Oh, I forgot to comment that if you have the kernel Linux 3.0 or upper you can use the Kinect with Gstreamer. It has a kernel module that creates /dev/videoX device files when you plug a Kinect.