# Minimum bounding box

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Minimum_bounding_box
> Markdown URL: https://mediated.wiki/source/Minimum_bounding_box.md
> Source: https://en.wikipedia.org/wiki/Minimum_bounding_box
> Source revision: 1249919681
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

{{short description|Smallest box which encloses some set of points}}
thumb|A sphere enclosed by its axis-aligned minimum bounding box (in 3 dimensions)

In [geometry](/source/geometry), the '''minimum bounding box''' or '''smallest bounding box''' (also known as the '''minimum enclosing box''' or '''smallest enclosing box''') for a point set {{mvar|S}} in {{mvar|N}} [dimension](/source/dimension)s is the [box](/source/hyperrectangle) with the smallest [measure](/source/Measure_(mathematics)) ([area](/source/area), [volume](/source/volume), or [hypervolume](/source/hypervolume) in higher dimensions) within which all the points lie. When other kinds of measure are used, the minimum box is usually called accordingly, e.g., "minimum-perimeter bounding box".

The minimum bounding box of a point set is the same as the minimum bounding box of its [convex hull](/source/convex_hull), a fact which may be used [heuristic](/source/heuristic)ally to speed up computation.<ref name=tous83>{{cite web
| author = Toussaint, G. T.
| title = Solving geometric problems with the rotating calipers
| publisher=Proc. MELECON '83, Athens 
|url=http://web.cs.swarthmore.edu/~adanner/cs97/s08/pdf/calipers.pdf 
|year = 1983
}}</ref>

In the two-dimensional case it is called the ''[minimum bounding rectangle](/source/minimum_bounding_rectangle)''.

==Axis-aligned minimum bounding box==
The [axis-aligned](/source/axis-aligned) minimum bounding box (or '''AABB''') for a given point set is its minimum bounding box subject to the constraint that the edges of the box are parallel to the (Cartesian) coordinate axes. It is the [Cartesian product](/source/Cartesian_product) of ''N'' intervals each of which is defined by the minimal and maximal value of the corresponding coordinate for the points in ''S''.

Axis-aligned minimal bounding boxes are used as an approximate location of an object in question and as a very simple descriptor of its shape. For example, in [computational geometry](/source/computational_geometry) and its applications when it is required to find intersections in the set of objects, the initial check is the intersections between their MBBs. Since it is usually a much less expensive operation than the check of the actual intersection (because it only requires comparisons of coordinates), it allows quickly excluding checks of the pairs that are far apart.

==Arbitrarily oriented minimum bounding box==
The arbitrarily oriented minimum bounding box is the minimum bounding box, calculated subject to no constraints as to the orientation of the result. [Minimum bounding box algorithms](/source/Minimum_bounding_box_algorithms) based on the [rotating calipers](/source/rotating_calipers) method can be used to find the minimum-area or minimum-perimeter bounding box of a two-dimensional convex polygon in linear time, and of a three-dimensional point set in the time it takes to construct its [convex hull](/source/convex_hull) followed by a linear-time computation.<ref name=tous83 /> A three-dimensional rotating calipers algorithm can find the minimum-volume arbitrarily-oriented bounding box of a three-dimensional point set in cubic time.<ref>{{citation |author=Joseph O'Rourke |title=Finding minimal enclosing boxes |publisher=[Springer Netherlands](/source/Springer_Netherlands) |journal=Parallel Programming |year=1985}}</ref> Matlab implementations of the latter as well as the optimal compromise between accuracy and CPU time are available.<ref>{{cite web |url=https://github.com/chadogome/OptimalOBB |title=Matlab implementation of several minimum-volume bounding box algorithms |last1=Chang |first1=Chia-Tche |last2=Gorissen |first2=Bastien |last3=Melchior |first3=Samuel |website=[GitHub](/source/GitHub) |date=2018}}.</ref>

==Object-oriented minimum bounding box==
In the case where an object has its own [local coordinate system](/source/local_coordinate_system), it can be useful to store a bounding box relative to these axes, which requires no transformation as the object's own transformation changes.

==Digital image processing==
In [digital image processing](/source/digital_image_processing), the ''bounding box'' is merely the coordinates of the rectangular border that fully encloses a [digital image](/source/digital_image) when it is placed over a page, a canvas, a screen or other similar bidimensional background.

==See also==
* [Bounding sphere](/source/Bounding_sphere)
* [Bounding volume](/source/Bounding_volume)
* [Minimum bounding rectangle](/source/Minimum_bounding_rectangle)
* [Darboux integral](/source/Darboux_integral)

==References==
{{reflist}}

Category:Geometry
Category:Geometric algorithms

---
Adapted from the Wikipedia article [Minimum bounding box](https://en.wikipedia.org/wiki/Minimum_bounding_box) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Minimum_bounding_box?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
