# Calculating OBB for 8 Points (WebCam game, images included)

This topic is 3862 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi people! I'm still working hard on my WebCam-Controlled game. But I got stuck with this simple problem :-( To cut it short: given 8 Points - How can I calculate the (orientated) bounding box for them? (see images below) The first image shows the data I get: 4 red and 4 green vertices: This picture then shows what I would like to have: the white bounding boxes: A little on the backround: I use two different algorithms to recognize a somehow rectangular shape in the picture. Most of the time one algo fails, the other works well. So I have to consider both results at the same time to really find the corners of the shape (thus there are red and green vertices).

##### Share on other sites
hehe - progress :)
For calculating OBB and basically any other geometry task, I heartily recommend Wildmagic (http://www.geometrictools.com/) and/or the books that describe it.

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 13
• 10
• 9
• 34
• 16
• ### Forum Statistics

• Total Topics
634124
• Total Posts
3015664
×