Query regarding Real Time Motion Tracking

General Robotics Forum - All aspects of robots and their applications. 

Bookmark this page:  YahooMyWeb Yahoo!  Google Google  Windows Live Favorites Windows Live  del.icio.us del.icio.us  digg digg  Add to Netscape Netscape
Subject Author Date
Query regarding Real Time Motion Tracking Subha_Interra 09-04-2006
If you were  Registered and logged in, you could reply and use other advanced thread options
Posted by Subha_Interra on September 4, 2006, 10:09 am
Hi,
I'm developing a project in Java.
The problem is :- In a steel plant steel blocks are generated one by
one and they go through a platform on by one continuously. There is a
fixed camera ,watching the motion of the blocks continuously.I've to
determine the speed of the blocks.
I'm approaching in the following manner:-

1)I'm capturing the frames of the real time movie(through a digital
camera).I've approached in this way to capture frames
separately ,The movie is being displayed in a computer monitor in
(200x200) dimension.With the help of java robot class's screen capture
method I'm capturing frames displayed in the screen continuously(not
from total monitor size,but only the portion on which the movie is
being displayed),I'm capturing frames,average 1frame/sec(Pentium 4,
2Gz) speed.Roughly 60 pictures / sec
(My Query:- Is this approach ok?(I've not seen such approach anywhere
till now in internet.
Am I doing any major mistake?)



2)I'm saving the grabbed frames in hard disk simultaneously.

3)Another program is collecting these picture frames one by one
,processing it by converting it to gray scale with edge detection and
then binarizing it(above color value150 everything is white else
black).
(Query:-1)Should I use FFT for such applications?2)Should I change
threshold value dynamically?)

4)After that I'm tracking some particular pixel continuously ,
measuring displacements between quardinate.If I know the time
difference between capture of two picture frames
I can find the speed.(Suppose 1 pixel shift0 meter or like that).


My Problem:-How can I get exact time difference between two frames?(is
it possible to get it in mili second?)



Request:- Please give me some guidance don't have any experience in
such applications.
Is it any relevant way in which I'm approaching?Please suggest some
better way(not very complex) which can make my job better.


Thanks and Regards

Subhadip Mukherjee


Posted by J.A. Legris on September 4, 2006, 11:27 am
Subha_Interra wrote:
> Hi,
> I'm developing a project in Java.
> The problem is :- In a steel plant steel blocks are generated one by
> one and they go through a platform on by one continuously. There is a
> fixed camera ,watching the motion of the blocks continuously.I've to
> determine the speed of the blocks.
> I'm approaching in the following manner:-
> 1)I'm capturing the frames of the real time movie(through a digital
> camera).I've approached in this way to capture frames
> separately ,The movie is being displayed in a computer monitor in
> (200x200) dimension.With the help of java robot class's screen capture
> method I'm capturing frames displayed in the screen continuously(not
> from total monitor size,but only the portion on which the movie is
> being displayed),I'm capturing frames,average 1frame/sec(Pentium 4,
> 2Gz) speed.Roughly 60 pictures / sec
> (My Query:- Is this approach ok?(I've not seen such approach anywhere
> till now in internet.
> Am I doing any major mistake?)
> 2)I'm saving the grabbed frames in hard disk simultaneously.
> 3)Another program is collecting these picture frames one by one
> ,processing it by converting it to gray scale with edge detection and
> then binarizing it(above color value150 everything is white else
> black).
> (Query:-1)Should I use FFT for such applications?2)Should I change
> threshold value dynamically?)
> 4)After that I'm tracking some particular pixel continuously ,
> measuring displacements between quardinate.If I know the time
> difference between capture of two picture frames
> I can find the speed.(Suppose 1 pixel shift0 meter or like that).
> My Problem:-How can I get exact time difference between two frames?(is
> it possible to get it in mili second?)
> Request:- Please give me some guidance don't have any experience in
> such applications.
> Is it any relevant way in which I'm approaching?Please suggest some
> better way(not very complex) which can make my job better.
> Thanks and Regards
> Subhadip Mukherjee

I do not like your plan to capture images from the screen - you have no
control over the processing and timing of the images before they get to
the screen. This problem is exacerbated if you are not using a
real-time OS on the computer - there may be unexpected delays occurring
at any time that you have no way of detecting or correcting.

I would do this using a computer dedicated to the task. You might also
consider purchasing a complete system specifically meant for video or
ultrasonic speed-measurement. But before you do anything, you should
completely specify the operating conditions and the degree of temporal
and spatial accuracy/precision required.

--
Joe Legris


Posted by John Nagle on September 4, 2006, 12:05 pm
If you want to track moving objects, there's software for that.
Try the Lukas-Kanade (LK) tracker in the Open Source Computer Vision Library.
That's actually quite good.

The idea of using a doppler radar is tempting, but don't use the one
from Dickey-John. That thing is intended as a speedometer for tractors,
and it's sensitive to fluorescent light noise.

                John Nagle

Subha_Interra wrote:
> Hi,
> I'm developing a project in Java.
> The problem is :- In a steel plant steel blocks are generated one by
> one and they go through a platform on by one continuously. There is a
> fixed camera ,watching the motion of the blocks continuously.I've to
> determine the speed of the blocks.
> I'm approaching in the following manner:-
>
> 1)I'm capturing the frames of the real time movie(through a digital
> camera).I've approached in this way to capture frames
> separately ,The movie is being displayed in a computer monitor in
> (200x200) dimension.With the help of java robot class's screen capture
> method I'm capturing frames displayed in the screen continuously(not
> from total monitor size,but only the portion on which the movie is
> being displayed),I'm capturing frames,average 1frame/sec(Pentium 4,
> 2Gz) speed.Roughly 60 pictures / sec
> (My Query:- Is this approach ok?(I've not seen such approach anywhere
> till now in internet.
> Am I doing any major mistake?)
>
>
>
> 2)I'm saving the grabbed frames in hard disk simultaneously.
>
> 3)Another program is collecting these picture frames one by one
> ,processing it by converting it to gray scale with edge detection and
> then binarizing it(above color value150 everything is white else
> black).
> (Query:-1)Should I use FFT for such applications?2)Should I change
> threshold value dynamically?)
>
> 4)After that I'm tracking some particular pixel continuously ,
> measuring displacements between quardinate.If I know the time
> difference between capture of two picture frames
> I can find the speed.(Suppose 1 pixel shift0 meter or like that).
>
>
> My Problem:-How can I get exact time difference between two frames?(is
> it possible to get it in mili second?)
>
>
>
> Request:- Please give me some guidance don't have any experience in
> such applications.
> Is it any relevant way in which I'm approaching?Please suggest some
> better way(not very complex) which can make my job better.
>
>
> Thanks and Regards
>
> Subhadip Mukherjee
>

Posted by Joe Strout on September 4, 2006, 12:47 pm

> The problem is :- In a steel plant steel blocks are generated one by
> one and they go through a platform on by one continuously. There is a
> fixed camera ,watching the motion of the blocks continuously.I've to
> determine the speed of the blocks.
> I'm approaching in the following manne

Why use a camera for this? These are blocks of steel, I assume on some
sort of conveyor belt. There are gaps between them, yes? Why not just
arrange two cheap electric eyes, a few centimeters apart, such that the
beams are broken by the blocks as they go by. These provide two simple,
clean digital inputs to your app. Measure the time the first beam is
broken, and then the time the second beam is broken; find the difference
and divide by the distance between the two beams, and there's the speed.

Best,
- Joe

Posted by D Herring on September 4, 2006, 2:00 pm
Subha_Interra wrote:
> 1)I'm capturing the frames of the real time movie(through a digital
> camera).I've approached in this way to capture frames
> separately ,The movie is being displayed in a computer monitor in
> (200x200) dimension.With the help of java robot class's screen capture
> method I'm capturing frames displayed in the screen continuously(not
> from total monitor size,but only the portion on which the movie is
> being displayed),I'm capturing frames,average 1frame/sec(Pentium 4,
> 2Gz) speed.Roughly 60 pictures / sec
> (My Query:- Is this approach ok?(I've not seen such approach anywhere
> till now in internet.
> Am I doing any major mistake?)
>
> 3)Another program is collecting these picture frames one by one
> ,processing it by converting it to gray scale with edge detection and
> then binarizing it(above color value150 everything is white else
> black).
> (Query:-1)Should I use FFT for such applications?2)Should I change
> threshold value dynamically?)

FFT? Probably not. Dynamically adjust the threshold? Maybe -- are
there issues with the color stability? How did you pick that threshold
in the first place? How wide is the dead zone between foreground and
background objects? If its wide enough and the images are stable, then
there's no need for adaptive algorithms. Histograms are a good tool to
answer these questions (and to calculate an adaptive threshold).

> 4)After that I'm tracking some particular pixel continuously ,
> measuring displacements between quardinate.If I know the time
> difference between capture of two picture frames
> I can find the speed.(Suppose 1 pixel shift0 meter or like that).

I hope you aren't trying to track a single thresholded pixel... that's a
very noisy data source. A good, stable technique is to follow the
thresholding by a routine that identifies groups of connected pixels and
then track the centers of these groups. This process averages out noise
at the object edges.

> My Problem:-How can I get exact time difference between two frames?(is
> it possible to get it in mili second?)

If you're using the JRobot class, then you probably can't expect better
accuracy than to simply create a new java.util.Date as each image is
read in and to take the difference between them as the elapsed time.

If you need better accuracy, then you will want greater control over the
image stream, maybe using the java media framework.

Later,
Daniel


The site map in XML format XML site map
other useful resources:
Official Robosapien Website
Lego Mindstorms Website

Contact Us | Privacy Policy