Tag Archives: Note

If you are suddenly getting high framerates, you might doing something wrong with the FPS calculation! 😉

[Note] No up-to-date AR libraries?

Somehow there doesn't seem to be good AR libraries which are either working well or even up to date. It looks like there where some buzz between 2007 and 2009. Quiet some people developed libraries and applications using marker-based AR. Like the ARToolkit which was last updated in 2007. The successor (or at least an extended version) of that is ARToolkitPlus, which was actually updated in February this year. But well, both work just with markers, which I don't need at all. I thought I could hack the code a little to extend it to work with natural features (FAST corners or something like that), but the creepy C++ code is just ugly and would probably require too much time to go through. There is also AndAR, but this just uses ARToolkit internally and last update sometime in 2010, so no real help for me. NyARToolkit looked nice in the beginning. It's similar to ARToolkit (and I somehow guess that there is at least one person working on it who was also working on the other library) but a bit more lagging. I could work with that -- if the code wouldn't be almost completely commented in Japanese. Again, no help for me.

But there is more. Qualcomms QCAR augmented reality SDK is well up to date and working incredibly good. Though, there is a huge problem: If you want to track images with natural features you'd need to first upload your images, let them go through Qualcomms "Image Target System", download some binary file (which has most likely interest points from the image in it) and then compile everything into the Android application. I mean, come on! How useful is that!? So I cannot use QCAR either, because I want to dynamically load interest points and other information during runtime.

What is left? I guess I need to try it on my own. OpenCV has all the functionality I need (There is this Android-optimized version which compiles nicely with the NDK). I "just" need to use it. JavaCV is Java-based wrapper to the OpenCV API, it is not commented at all but hopefully it will be of any use for me.

If there is someone out there with (helping) suggestions, please drop me a line in the comments.

[Note] floating-point/fixed-point operations versus OpenGL

From the Android NDK example "bitmap-plasma":

We're going to perform computations for every pixel of the target bitmap. floating-point operations are very slow on ARMv5, and not too bad on ARMv7 with the exception of trigonometric functions. For better performance on all platforms, we're going to use fixed-point arithmetic and all kinds of tricks

I stumbled upon this one or two times before. So it really seems like this is an issue needed to be addressed, since I want to do lots of heavy pixel-by-pixel computation stuff (a.k.a. image processing). Maybe there is a better way to do this: instead of translating everything from floating-point to fixed-point operations or even finding and implementing "all kind of tricks", I could do everything with OpenGL. Android 1.6 supports OpenGL ES 1.1 and from Android 2.0 and up OpenGL ES 2.0 is supported. Such OpenGL-operation are probably performed on the same CPU, but I assume if OpenGL is doing some floating-to-fixed-point translation this is more effective than I could do.