Sunday, February 10, 2013

opencv python 64bit waitkey

There is a bug for opencv python api under 64 bit. cv2.WaitKey return a value other than a normal int. Maybe it is a long int.  Usually it is 1048576(0x100000) more than what it should be. I have to add numpy.int16(cv.WaitKey(10)) to fix it.

Friday, January 25, 2013

PhysX linux linking

PhysX offers binary static libs for linux. Linking static libs under linux is tricky. Order matters.

I found -lPhysx3 must be the first one.

Tuesday, January 1, 2013

Parse error at "BOOST_JOIN"

When I compiled RGBDemo/nestk, I got Parse error at "BOOST_JOIN" error. It happened when using cmake, qt4, and boost>1.47 while Qt4 moc was trying to moc boost.

Neither qt or boost community will fix this problem. There are 2 kinds of workarounds I find.

#1(I never tested)
Add
#ifndef Q_MOC_RUN
#endif
to exclude boost head files for qt moc.

#2
change cmake file from
QT4_WRAP_CPP(...)
to
QT4_WRAP_CPP(... OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED)

With #2, rgbdemo compiled.

Wednesday, December 26, 2012

PCL on archlinux, VTK cmake error

When I compiled PCL on archlinux, I got this error
"
CMake Error at //lib/vtk-5.10/VTKTargets-debug.cmake:1281 (MESSAGE):
The imported target "vtkWrapTcl" references the file

"//bin/vtkWrapTcl"

but this file does not exist. Possible reasons include:

* The file was deleted, renamed, or moved to another location.

* An install or uninstall procedure did not complete successfully.

* The installation package was faulty and contained

"//lib/vtk-5.10/VTKTargets-debug.cmake"

but not all the files it references.
"

Some other AUR packages have similar problems, such as this, ginkgo-cadx.

I figured out cmake variable VTK_DIR is somehow undefined. I don't know it is a bug of cmake or vtk on arch. I found a workaround, export VTK_DIR=/where/is/vtk before calling cmake.

Saturday, December 22, 2012

kinect openni win8

  1. Uninstall openni, nite, and the kinect driver.
  2. Windows key + R to open the run prompt
  3. shutdown.exe /r /o /f /t 00
  4. select troubleshoot
  5. select advanced
  6. select windows startup and then restart
  7. enter the option for Disable Driver Signature
  8. reinstall openni, nite, and the kinect driver
According to "http://funccoder.blogspot.com/2012/11/openni-on-windows-8.html", this will work. I have not tested yet.


Thursday, December 20, 2012

archlinux 64 bit installation booting problem

I have this problem on my dell xps 630i desktop.
If I boot installation CD/usb to install 64 bit arch, it will crash and reboot. But 32 bit works fine. And 64 bit works on my other PCs.

I googled it and figured out it has something to do with the memory. 4G memory of the xps seems to bother arch 64bit kernel.

To solve this, I added "mem=2048M" to the boot script. Then the installation of 64 bit works.

The installed system works fine with any amount of memory.