Yes, actualy it is copy paste from opencv source code and replacing floats and doubles with fixed point number class. You will need tto identify range of possible values in the algorithm and configure the fixed point number class to fith the required range. Afcourse you will sucrifice precision but mobile devices have smaller screens so you do not high precision. Somethimes low precision will result in fewer feature points so you will have to track fewer points.
For example i have rewritten surf feature detector using fixed point numbers, and it aproximately needed 5 microseconds per pixel compared to 47 microseconds of opencv's floating point version.
On 11 Mar 2011 17:28, "yostane" <yassine....@gmail.com> wrote:
You mean that we should rewrite opencv functions?
On 11 mar, 17:12, baldzar <bald...@gmail.com> wrote:
> Performance mostly depends on number of poin...
@bustih: I'm testing on zte racer. It is qualcomm msm7227 based device
OS: android 2.1 update1, and it appears that it has hardware fpu.
But my tests and several android benchmark tools shows that integer
unit is much faster than fpu unit (NBench reported: integer
index=5.070 and fpu index=0.384).
The same tests that i performed on desktop PC showed that fpu is much
faster than integer unit. Maybe the reason is that android uses
soft_fpu calling convention (passing values through integer registers)
for floating numbers,
or chip vendors are limited when optimizing fpu unit or must take care
of power consumption.
@Andreas: I've uploaded my code at http://code.google.com/p/lib-ucv/ .
There is surf class that is actually rewritten opensurf source code
(not from OpenCV but the principle is the same).
There you can find configurable fixed_point class template that is
based on fpmath from Peter Schregle : http://code.google.com/p/fpmath/
with some modifications.
There is also a gpu ( opengl es 2.0 ) version of some parts of SURF
algorithm ( SURF hessian detector ) that i was experimenting with, it
performed nice ( again faster than OpenCV's ) but requires OpenGL ES
2.0 hardware ( vertex and fragment shaders, and FBO feature).