1. reset the bus
dc1394_reset_bus
2. Showing the capabilities of the camera
cd /sys/bus/ieee1394/devices/[node]
(you can check nodes number using dc1394_reset_bus)
grep . *
Thursday, May 27, 2010
Automake - conditional compilation
I want to compile some part of the code only when library (OpenCV) is detected:
In configure.ac
dnl check if opencv is installed
PKG_CHECK_MODULES(OPENCV,
opencv >= 2.1.0,
HAVE_OPENCV=yes, HAVE_OPENCV=no)
if test "x$HAVE_OPENCV" = "xno"; then
AC_MSG_NOTICE(no OpenCV library with version >= 2.1.0 found - rectify plugin will not be available)
elseif
dnl if yes set flags and libs
AC_SUBST(OPENCV_CFLAGS)
AC_SUBST(OPENCV_LIBS)
fi
dnl set the variable for makefile
AM_CONDITIONAL(I_HAVE_OPENCV, test "x$HAVE_OPENCV" = "xyes")
---------------
In Makefile.am
if I_HAVE_OPENCV
"do smth"
else
"do smth else"
endif
A bit more about conditionals in makefiles is here
In configure.ac
dnl check if opencv is installed
PKG_CHECK_MODULES(OPENCV,
opencv >= 2.1.0,
HAVE_OPENCV=yes, HAVE_OPENCV=no)
if test "x$HAVE_OPENCV" = "xno"; then
AC_MSG_NOTICE(no OpenCV library with version >= 2.1.0 found - rectify plugin will not be available)
elseif
dnl if yes set flags and libs
AC_SUBST(OPENCV_CFLAGS)
AC_SUBST(OPENCV_LIBS)
fi
dnl set the variable for makefile
AM_CONDITIONAL(I_HAVE_OPENCV, test "x$HAVE_OPENCV" = "xyes")
---------------
In Makefile.am
if I_HAVE_OPENCV
"do smth"
else
"do smth else"
endif
A bit more about conditionals in makefiles is here
Tuesday, May 18, 2010
Firefox plugin does not work with the newest Firefox version
The problem comes when the plugin version is not updated on addons.mozilla.org and firefox claims it is not compatible with current version. Steps to solve this issue:
1. Donwload .xpi file (right click on "Add to Firefox" button.
2. Change extension to .zip
3. edit install.rdf file so that maxversion matches the current version of your firefox
4. save changes
5. change .zip back to xpi
6. Drag and drop .xpi on firefox.
More on this can be found here
1. Donwload .xpi file (right click on "Add to Firefox" button.
2. Change extension to .zip
3. edit install.rdf file so that maxversion matches the current version of your firefox
4. save changes
5. change .zip back to xpi
6. Drag and drop .xpi on firefox.
More on this can be found here
Sunday, May 9, 2010
Saturday, May 8, 2010
Linux command line tricks
1. update gnome config from the command line. In that case turn on proxy usage in the system.
gconftool -s /system/http_proxy/use_proxy -t bool true
2. change file encoding from dos to unix and back:
fromdos, todos
3. detect and convert encoding of text files
enca
gconftool -s /system/http_proxy/use_proxy -t bool true
2. change file encoding from dos to unix and back:
fromdos, todos
3. detect and convert encoding of text files
enca
Thursday, May 6, 2010
QT creator tips and tricks
1. The problem comes when debugging:
Internal error: pc 0x4098b8 in read in psymtab, but not in symtab
Internal error: pc 0x4098b8 in read in psymtab, but not in symtab
Internal error: pc 0x4098b8 in read in psymtab, but not in symtab
Internal error: pc 0x4098b8 in read in psymtab, but not in symtab
To solve it go to Tool->Options->Debugger->gdb location and change the filename to point to the gdb binary stored in the qt sdk. In my case it is /home/user/qtsdk/bin/gdb
Internal error: pc 0x4098b8 in read in psymtab, but not in symtab
Internal error: pc 0x4098b8 in read in psymtab, but not in symtab
Internal error: pc 0x4098b8 in read in psymtab, but not in symtab
Internal error: pc 0x4098b8 in read in psymtab, but not in symtab
To solve it go to Tool->Options->Debugger->gdb location and change the filename to point to the gdb binary stored in the qt sdk. In my case it is /home/user/qtsdk/bin/gdb
libraries maintenance
How to check the necessary g++ options:
1. pkg-config opencv --libs --cflags
2. ldconfig -v - shows the libraries stored in ld.so.conf
3. locate [libraryname] - searches for files
4. pkg-config opencv --modversion - shows the version of opencv library installed
1. pkg-config opencv --libs --cflags
2. ldconfig -v - shows the libraries stored in ld.so.conf
3. locate [libraryname] - searches for files
4. pkg-config opencv --modversion - shows the version of opencv library installed
Wednesday, May 5, 2010
basic irc operation
registering nick:
/msg nickserv register PASSWORD EMAIL
identifying after entering:
/msg nickserv identify PASSWORD
/msg nickserv register PASSWORD EMAIL
identifying after entering:
/msg nickserv identify PASSWORD
Subscribe to:
Posts (Atom)