We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
outline detection and collision (Read 2797 times)
outline detection and collision
Sep 19th, 2007, 11:16pm
 
Hello , i have 2 questions: how can i do outline detection with processing?
im experimenting with some computer vision and i want to be able to track the outline of a hand, a body or a shape...

my second question is how can i detect collision of this outlined shape with other shapes o elements , like sphere , rect, or points?

i have a program that create  lots of moving spheres
and i want to be able to detect the collision of those spheres with the outlined hand or body.... for example when your outlined hand collides with a moving sphere it( the moving sphere) change its direction..
any idea of doing this?

thanks

punchik




Re: outline detection and collision
Reply #1 - Sep 20th, 2007, 6:53pm
 
I started a thread on polygon collision here:

http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Programs;action=display;num=1189178826

Though the inside of the polygon issue might give you pause for thought as the more complicated blobs will be tougher to detect than simple roundish ones.
Re: outline detection and collision
Reply #2 - Oct 17th, 2007, 12:48pm
 
Seems to be two parts to this task

1) Trace the outline of the image and create a polygon, blob or some other way of storing this information

2) Doing the collision detection between the objects and the polygon/blob/etc.

For 2) the first response there seems like a good starting point. For 1) there is a library called BlobDetection found under the References section that might help you detect the shapes in the image. You should also look into if there are any decent physics libs for Java around, as these often have good implementations of collision detection etc.
Page Index Toggle Pages: 1