Motion detecting using onboard camera

Login to reply to this topic.
Fri, 2004-01-16 10:49
Joined: 2004-01-16
Forum posts: 1
Hi! Just wondering if anyone knows the techniques used in series 60 games like "Killer Virus" and Mosquitos? They seem to use somekind of motion-detecting using camera view-finder to scroll the screen or the moving targets in it? It would be very interesting to use this kind of technique in different kind of programs, which don't even use or need the actual camera image. For example picture-viewer or browser could use this kind of feature to browse bigger screens that don't fit into small screen of mobile phone...

Is it possible to run camera view-finder on background, analysing the pictures in it without showing it on screen? Does anyone know any links or even libraries that would help?

Fri, 2004-01-16 13:04
Joined: 2003-05-27
Forum posts: 363
Motion detecting using onboard camera
Hi,

Think simple  Smiley . Those guys are not doing anything complex, because of performance reasons.

I tried doing something like this once, for an entirely other purpose though. The key is to do hierarchical motion estimation - do it on hierarchically subsampled images and it will be fast and accurate enough.

For example:

Subsample two to N of consecutive  160x120 viewfinder frames to 80x60, then 40x30, then 20x15 "images". Compare always two to N consecutive frames of the same size, starting from the LOWEST resolution, moving the other image around the other one. The comparison operation here can be e.g. sum-of-absolute-differences of pixel values. When you have found a value below some threshold, or you have done enough comparisons (you have a fixed time budget), stop the iteration and you should have a motion vector ready Smiley

Oh, I forgot to mention that it may be useful to do lookup table to calculate the difference of two 16-bit pixels. In that way, you can use e.g. squared sum values so the end result will be more accurate.

I hope this helps, no code this time though Smiley Anyway, even the above suggestion is probably more complex than what is used in the programs that you mention.

The downsize of all this is that you have to have a good amount of non-ambiguous content in the viewfinder for the algorithm to perform well.

Cheers,
Pawel
Wed, 2004-10-27 22:11
Joined: 2004-08-17
Forum posts: 52
Motion detecting using onboard camera
hi pawel, i'm in trouble with this algorithm Wink
could you post some snippets in order to get me understand better?!
Sat, 2004-11-06 15:36
Joined: 2004-11-06
Forum posts: 1
Motion detecting using onboard camera
I recently found this page:

http://www.inf.ethz.ch/~rohs/visualcodes

It has some info about this and similar subjects, along with books in .pdf and source code.

Hope this helps
  • Login to reply to this topic.