BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Analyzing areas of an image

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics
View previous topic :: View next topic  
Author Message
Vander
Guest





PostPosted: Thu Jun 24, 2004 7:35 pm    Post subject: Analyzing areas of an image Reply with quote



Hi all

Is it possible to analyze a portion or an area of an image (or frame) from a
digitized movie while it is playing?

A simple example:
A movie that shows a white ball moving from left to right on a dark
rectangle (lets suppose a 2 x 10 rectangle).
The rectangle area should be virtually divided by four, resulting 4 * 2 x
2,5 virtual rectangles.
I wish to be able to detect the centre of the moving ball, to draw a line
that follow its path,
to determine what rectangle the ball is and its current speed, etc.

Any tips, articles, ideas will be appreciate.

Thanks.





Back to top
None
Guest





PostPosted: Thu Jun 24, 2004 7:54 pm    Post subject: Re: Analyzing areas of an image Reply with quote



Hi,
In theory the easy part ... analyze the frame and find the top left corner
point of the outscribed rectangle around the ball ... continue and find the
bottom right corner point ... so now u have a rect with which u can find its
position in each frame .... which in turn (depending on playback speed in
frames/sec) should give u an idea of the speed and the positions should give
u an idea of a spline path.
The practice ... erm .. try it and let me know..
Rgds

"Vander" <vander (AT) pucrs (DOT) br> wrote

Quote:
Hi all

Is it possible to analyze a portion or an area of an image (or frame) from
a
digitized movie while it is playing?

A simple example:
A movie that shows a white ball moving from left to right on a dark
rectangle (lets suppose a 2 x 10 rectangle).
The rectangle area should be virtually divided by four, resulting 4 * 2 x
2,5 virtual rectangles.
I wish to be able to detect the centre of the moving ball, to draw a line
that follow its path,
to determine what rectangle the ball is and its current speed, etc.

Any tips, articles, ideas will be appreciate.

Thanks.








Back to top
Vander
Guest





PostPosted: Thu Jun 24, 2004 8:21 pm    Post subject: Re: Analyzing areas of an image Reply with quote




"None" <none (AT) here (DOT) yet> escreveu na mensagem
news:40db3027 (AT) newsgroups (DOT) borland.com...
Quote:
Hi,
In theory the easy part ... analyze the frame and find the top left corner
point of the outscribed rectangle around the ball ... continue and find
the
bottom right corner point ... so now u have a rect with which u can find
its
position in each frame ....

Rectangles dimensions should be known because I think they can be drawn
on a layer on the movie screen...

Quote:
which in turn (depending on playback speed in
frames/sec) should give u an idea of the speed

In theory if I know the frame rate and the time the ball spent to move from
a point to another
(and the camera doesn't move) I can calculate the speed.

Quote:
and the positions should give
u an idea of a spline path.

When I determine the centre point of the ball I could draw a line ...

Quote:
The practice ... erm .. try it and let me know..
Rgds

Keep reading this topic, may be someone can help us, ok

Thank you


Quote:

"Vander" <vander (AT) pucrs (DOT) br> wrote in message
news:40db2cea (AT) newsgroups (DOT) borland.com...
Hi all

Is it possible to analyze a portion or an area of an image (or frame)
from
a
digitized movie while it is playing?

A simple example:
A movie that shows a white ball moving from left to right on a dark
rectangle (lets suppose a 2 x 10 rectangle).
The rectangle area should be virtually divided by four, resulting 4 * 2
x
2,5 virtual rectangles.
I wish to be able to detect the centre of the moving ball, to draw a
line
that follow its path,
to determine what rectangle the ball is and its current speed, etc.

Any tips, articles, ideas will be appreciate.

Thanks.










Back to top
Vander
Guest





PostPosted: Tue Jun 29, 2004 11:48 am    Post subject: Re: Analyzing areas of an image Reply with quote

Hi people

Unfortunately, by now, I have got no answer to this topic.
Am I trying to do something that isn't possible to do using Delphi?
If you know any article about this topic please post here.

Thank you


"Vander" <vander (AT) pucrs (DOT) br> escreveu na mensagem
news:40db2cea (AT) newsgroups (DOT) borland.com...
Quote:
Hi all

Is it possible to analyze a portion or an area of an image (or frame) from
a
digitized movie while it is playing?

A simple example:
A movie that shows a white ball moving from left to right on a dark
rectangle (lets suppose a 2 x 10 rectangle).
The rectangle area should be virtually divided by four, resulting 4 * 2 x
2,5 virtual rectangles.
I wish to be able to detect the centre of the moving ball, to draw a line
that follow its path,
to determine what rectangle the ball is and its current speed, etc.

Any tips, articles, ideas will be appreciate.

Thanks.








Back to top
Lord Crc
Guest





PostPosted: Tue Jun 29, 2004 7:12 pm    Post subject: Re: Analyzing areas of an image Reply with quote

On Tue, 29 Jun 2004 08:48:59 -0300, "Vander" <vander (AT) pucrs (DOT) br> wrote:

Quote:
Unfortunately, by now, I have got no answer to this topic.
Am I trying to do something that isn't possible to do using Delphi?
If you know any article about this topic please post here.

I would try comp.graphics.algorithms instead of this newsgroup for
such advanced topics.

From what i know, it's doable, but certainly not easy in a realtime
enviroment.

- Asbjørn

Back to top
Arthur E.F.Heinrich
Guest





PostPosted: Tue Jun 29, 2004 7:57 pm    Post subject: Re: Analyzing areas of an image Reply with quote

A long time ago a friend of mine said to me: If you can set the
color of a single pixel, you can display videos. :-)

I think it aplies to you too. If you can identify each single pixel
in every frame of your video, you can do it. But the problem is not
Delphi. It's hardware.

[]s
Arthur


"Vander" <vander (AT) pucrs (DOT) br> wrote

Quote:
Hi people

Unfortunately, by now, I have got no answer to this topic.
Am I trying to do something that isn't possible to do using Delphi?
If you know any article about this topic please post here.

Thank you


"Vander" <vander (AT) pucrs (DOT) br> escreveu na mensagem
news:40db2cea (AT) newsgroups (DOT) borland.com...
Hi all

Is it possible to analyze a portion or an area of an image (or frame)
from
a
digitized movie while it is playing?

A simple example:
A movie that shows a white ball moving from left to right on a dark
rectangle (lets suppose a 2 x 10 rectangle).
The rectangle area should be virtually divided by four, resulting 4 * 2
x
2,5 virtual rectangles.
I wish to be able to detect the centre of the moving ball, to draw a
line
that follow its path,
to determine what rectangle the ball is and its current speed, etc.

Any tips, articles, ideas will be appreciate.

Thanks.










Back to top
Vander
Guest





PostPosted: Tue Jun 29, 2004 8:07 pm    Post subject: Re: Analyzing areas of an image Reply with quote

Thanks for your attention :)

Vanderlei

"Lord Crc" <lordcrc (AT) hotmail (DOT) com> escreveu na mensagem
news:8of3e0hh5fvkf0j0g522mq30vkj91sfl2e (AT) 4ax (DOT) com...
Quote:
On Tue, 29 Jun 2004 08:48:59 -0300, "Vander" <vander (AT) pucrs (DOT) br> wrote:

Unfortunately, by now, I have got no answer to this topic.
Am I trying to do something that isn't possible to do using Delphi?
If you know any article about this topic please post here.

I would try comp.graphics.algorithms instead of this newsgroup for
such advanced topics.

From what i know, it's doable, but certainly not easy in a realtime
enviroment.

- Asbjørn



Back to top
Vander
Guest





PostPosted: Tue Jun 29, 2004 8:07 pm    Post subject: Re: Analyzing areas of an image Reply with quote

Ok

Thanks for your attention :)

Vanderlei

"Arthur E.F.Heinrich" <borland (AT) xperiment (DOT) com> escreveu na mensagem
news:40e1ca1c (AT) newsgroups (DOT) borland.com...
Quote:
A long time ago a friend of mine said to me: If you can set the
color of a single pixel, you can display videos. :-)

I think it aplies to you too. If you can identify each single pixel
in every frame of your video, you can do it. But the problem is not
Delphi. It's hardware.

[]s
Arthur


"Vander" <vander (AT) pucrs (DOT) br> wrote in message
news:40e156f4$1 (AT) newsgroups (DOT) borland.com...
Hi people

Unfortunately, by now, I have got no answer to this topic.
Am I trying to do something that isn't possible to do using Delphi?
If you know any article about this topic please post here.

Thank you


"Vander" <vander (AT) pucrs (DOT) br> escreveu na mensagem
news:40db2cea (AT) newsgroups (DOT) borland.com...
Hi all

Is it possible to analyze a portion or an area of an image (or frame)
from
a
digitized movie while it is playing?

A simple example:
A movie that shows a white ball moving from left to right on a dark
rectangle (lets suppose a 2 x 10 rectangle).
The rectangle area should be virtually divided by four, resulting 4 *
2
x
2,5 virtual rectangles.
I wish to be able to detect the centre of the moving ball, to draw a
line
that follow its path,
to determine what rectangle the ball is and its current speed, etc.

Any tips, articles, ideas will be appreciate.

Thanks.












Back to top
Nils Haeck
Guest





PostPosted: Wed Jun 30, 2004 3:19 pm    Post subject: Re: Analyzing areas of an image Reply with quote

If you can somehow threshold your image then you practically have the
solution.

What I mean is this: your ball may be a distinct color on the wall (white
ball, black background). So you set a threshold somewhere (128 gray) and
everything above is basically your ball, everything below is the background.

Then, you make sure that you only analyse pixels that are cluttered
together, so throw away all pixels that are individual spots, bleeps, or
noise coming above the threshold.

What remains is a cloud of pixels that's your ball. To find the center of
this cloud you can simply calculate it's center of gravity in two
directions:
cg_x = sigma(F(x,y) * x) / sigma(F(x,y)) for all pixels 1..N
cg_y = sigma(F(x,y) * y) / sigma(F(x,y)) for all pixels 1..N

Where F(x,y) is the gray value of pixel x,y and there are N pixels in the
cloud.

Speed may be an issue but should be doable on video-sizes that are not too
big on modern hardware. And also, since you don't require that high a
resolution (only want to determine the rectangle) you can scale the image
down before processing.

If this is a serious project and you're looking for professional image
processing software + support (in Delphi) then drop me a line. I'm available
for consulting. 90% of the source code for this I have readily available.

Kind regards,

Nils Haeck
www.simdesign.nl


"Vander" <vander (AT) pucrs (DOT) br> wrote

Quote:
Hi people

Unfortunately, by now, I have got no answer to this topic.
Am I trying to do something that isn't possible to do using Delphi?
If you know any article about this topic please post here.

Thank you


"Vander" <vander (AT) pucrs (DOT) br> escreveu na mensagem
news:40db2cea (AT) newsgroups (DOT) borland.com...
Hi all

Is it possible to analyze a portion or an area of an image (or frame)
from
a
digitized movie while it is playing?

A simple example:
A movie that shows a white ball moving from left to right on a dark
rectangle (lets suppose a 2 x 10 rectangle).
The rectangle area should be virtually divided by four, resulting 4 * 2
x
2,5 virtual rectangles.
I wish to be able to detect the centre of the moving ball, to draw a
line
that follow its path,
to determine what rectangle the ball is and its current speed, etc.

Any tips, articles, ideas will be appreciate.

Thanks.










Back to top
Lord Crc
Guest





PostPosted: Wed Jun 30, 2004 8:05 pm    Post subject: Re: Analyzing areas of an image Reply with quote

On Wed, 30 Jun 2004 17:19:27 +0200, "Nils Haeck"
<n.haeckno (AT) spamchello (DOT) nl> wrote:

Quote:
Then, you make sure that you only analyse pixels that are cluttered
together, so throw away all pixels that are individual spots, bleeps, or
noise coming above the threshold.

Median filtering is great for this, but might be a bit expensive cpu
wise...

- Asbjørn

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.