Questions tagged [bounding-box]

A Bounding Box is the smallest box that encloses a geometry. There are two common classes of Bounding Boxes that are employed: Oriented Bounding Boxes (OBB), and an Axis-Aligned Bounding Boxes (AABB). Bounding boxes are commonly employed as a cheap way to approximate more complex geometries in a range of applications, including collision detection.

A Bounding Box is the smallest box that encloses a geometry. There are two common classes of Bounding Boxes that are employed: Oriented Bounding Boxes (OBB) and an Axis-Aligned Bounding Boxes (AABB). Bounding boxes are commonly employed as a cheap way to approximate more complex geometries in a range of applications, including collision detection.

A minimum Bounding Box can also be referred to as the minimum bounding or minimum enclosing box.

Reference Books

External References:

Related Tags:

1096 questions
9
votes
6 answers

How to find the nearest point in the perimeter of a rectangle to a given point?

This is a language-agnostic question. Given a rectangle's dimensions with l,t,w,h (left, top, width, height) and a point x,y, how do I find the nearest point on the perimeter of the rectangle to that point? I have tried to resolve it in Lua, but any…
kikito
  • 51,734
  • 32
  • 149
  • 189
9
votes
1 answer

What's the bounding box for computing Voronoi Diagram in boost library

Recently I am trying to use the library boost to compute Voronoi diagram. The algorithm in this library is based on sweep-line. But it is not based on a bounding box to generate diagram. Some of Voronoi edges from this library are infinite and…
Jun
  • 419
  • 1
  • 5
  • 14
9
votes
5 answers

How can I make images fit into a 200 pixel square box using CSS?

I have a bunch of images which all fit into a 400px × 400px box (that is, one of their dimensions is 400px and the other is smaller). I would like to be able to, using CSS, but jquery/javascript if necessary, fit that image to a 200px by 200px box,…
Eric
  • 95,302
  • 53
  • 242
  • 374
9
votes
2 answers

MYSQL Geo Search having distance performance

I have a mysql select statement for a search on my website which is having performance problems when the site gets really busy. The query below searches for adverts from a table with over 100k records, within 25 miles of the given lat and lon and…
user1052096
  • 853
  • 4
  • 13
  • 23
9
votes
4 answers

What is the correct way to determine text coordinates a from bounding box?

Given the result of a call to imagettfbbox(), what is the correct, pixel-perfect point to provide to imagettftext() such that the text will not extend beyond its bounding box? I am determining the width/height and x/y of the baseline from the…
FtDRbwLXw6
  • 27,774
  • 13
  • 70
  • 107
8
votes
1 answer

getbbox method from python image library (PIL) not working

I want to crop an image to its smaller size, by cutting the white areas on the borders. I tried the solution suggested in this forum Crop a PNG image to its minimum size but the getbbox() method of pil is returning a bounding box of the same size of…
8
votes
2 answers

Doing Ajax updates in SVG breaks getBBox, is there a workaround?

I have an SVG page with some complex diagrams; I'm trying to add code that inserts even more complexity via an Ajax call on demand. This is mostly working, but the inserted nodes don't behave properly. In particular getBBox() fails on some…
mtraven
  • 179
  • 1
  • 7
8
votes
0 answers

Google Cloud Vision OCR API returning incorrect values for bounding box/vertices

I'm using the "TEXT_DETECTION" option from the Google Cloud Vision API to OCR some images. The bounding box around individual characters is sometimes accurate and sometimes not, often within the same image. Is this a normal side-effect of a…
Mark Bench
  • 111
  • 3
8
votes
2 answers

What is the "center" of a Three.js object?

When I use Blender to model an object, I am able to explicitly define its center position from which translations and rotations occur. When working with Three.js objects, I don't seem to find an equivalent. Does a Three.js object have a property…
Kolban
  • 13,794
  • 3
  • 38
  • 60
8
votes
2 answers

Find the area of a bounding polygon that encloses a set of points

I have a series of points on a plot of the sky. I want to find the area that these points occupy. To do this I need to find the vertices of a polygon that encloses these points - convert the points to an equal-area projection and then work out the…
Samuel
  • 157
  • 6
  • 22
8
votes
4 answers

Do I need a spatial index in my database?

I am designing an application that needs to save geometric shapes in a database. I haven't choosen the database management system yet. In my application, all database queries will have an bounding box as input, and as output I want all shapes within…
Jonas
  • 121,568
  • 97
  • 310
  • 388
8
votes
2 answers

Given a latitude and longitude, and distance, I want to find a bounding box

Given a latitude and longitude, and distance, I want to find a bounding box where the distances are less than the given distance. This questions was asked here: How to calculate the bounding box for a given lat/lng location? I donot want this…
agiliq
  • 7,518
  • 14
  • 54
  • 74
8
votes
2 answers

How to calculate geography bounding box in iOS?

I'd like to make a Geographic Bounding box Calculation in iOS. It can be aprox. Input Parameters: Current Location (Example: 41.145495, −73.994901) Radius In Meters: (Example: 2000) Required Output: MinLong: (Example: 41.9995495) MinLat: (Example:…
ActionFactory
  • 1,393
  • 2
  • 12
  • 19
7
votes
1 answer

Does Pytorch allow to apply given transformations to bounding box coordinates of the image?

In Pytorch, I know that certain image processing transformations can be composed as such: import torchvision.transforms as transforms transform = transforms.Compose([transforms.ToTensor(), transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5,…
Karen
  • 401
  • 7
  • 15
7
votes
2 answers

Checking if vertex is visible in camera view and render or occluded

I'm dealing with a machine learning task and I'm trying to use blender to generate synthetic images as a training dataset for a neural network. To do this, I have to find the bounding box of the objects in the rendered image. My code, up to now, is…
1 2
3
73 74