La instalación es igual que en Ubuntu 10.10 salvo que parece que hay algún problema con el script de configuración. Al ejecutar “./Configure
” las librerías de gstreamer no se configuran correctamente en la variable GST_LIBS
. Así es como está definida en el script:
GST_LIBS=`pkg-config --libs gstreamer-0.10`
Se puede solucionar el problema añadiendo manualmente la variable GST_LIBS
a la definición de la variable LIBS
:
LIBS="-lpthread -lglut -lGLU -lGL -lXi -lX11 -lm $GST_LIBS"
También se puede añadir el resultado de ejecutar el comando “pkg-config --libs gstreamer-0.10
” a esa variable, al final las dos maneras hacen que LIBS
tenga el siguiente valor:
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"
Es posible que también tengas un problema con V4L al ejecutar make
, debido a que han cambiado el nombre del fichero de cabecera “linux/videodev.h
” a “libv4l1-videodev.h
”. Si te pasa esto cambia ese nombre del fichero de cabecera en los siguientes ficheros de 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.