AI Glossary / Computer vision and multimodal AI / Intermediate

Bounding box

Definition

A bounding box is a rectangular region used to indicate the location and approximate extent of an object or other area of interest in an image. In object detection, a prediction often includes a box, a class label and a confidence-related score.

What it means

The box gives a compact description of where something is. An axis-aligned box has sides parallel to the image axes; a rotated box also includes orientation. Bounding boxes are used for training labels, model predictions, tracking and selecting image regions for further analysis.
A box is only an enclosure. It usually includes background pixels and does not trace the object's exact outline. Segmentation masks provide more detailed shape information when that is needed.
Coordinate conventions matter. A box can be stored as two corners, as a corner plus width and height, or as a center plus dimensions. Values may be pixels or normalized fractions of image size.

How it works

An annotator or model identifies the target region and expresses it using the chosen coordinate format. Processing software interprets that format to draw, crop or compare boxes. Resizing, padding, rotating or cropping an image requires corresponding coordinate transformations.
Detection systems may predict many overlapping boxes and use a selection procedure such as non-maximum suppression to reduce duplicates. Evaluation often compares predicted and reference boxes using intersection over union, or IoU, along with class and matching rules. A high overlap is useful localization evidence, but it does not by itself establish correct classification, object identity or performance across all relevant images.

Three practical examples

  • A retail-image dataset labels each visible product with a rectangular region and product category.
  • A document-processing system encloses a table before applying a specialized extraction step.
  • A video tracker associates boxes across frames to follow a visible object, while handling missed detections and identity changes.

Think of it this way

Think of drawing a rectangle around an item in a photograph so another person can find it quickly. The rectangle is an address for a region, not a precise cutout of the item. The analogy also highlights why conventions matter: saying “start here and go this far” differs from giving the coordinates of two opposite corners.

Worked example

In a 640-by-480 image, let a box use the continuous corner convention (xmin,ymin,xmax,ymax)=(100,50,300,200). Its width is 200, height 150 and area 30,000 square pixels under that convention.
Suppose another box is (200,100,400,250). Their overlap runs from x=200 to 300 and y=100 to 200, with area 10,000. Each box has area 30,000, so their union is 30,000+30,000−10,000=50,000. IoU is 10,000/50,000=0.20.
If the image is resized by one-half in both dimensions without other transformation, the first box becomes (50,25,150,100). Inclusive integer-coordinate conventions can use different width calculations, so implementation must follow the dataset or library specification rather than silently mixing formulas.

Illustrative case study

Fictional case: Oak Inspection trains a detector using boxes stored as center coordinates plus width and height. A deployment component interprets the same four numbers as opposite corners. Predictions appear misplaced even though the model output is internally consistent.
The team documents the format, verifies transformations with a few manually checked images and adds checks for invalid or out-of-bounds boxes. It also reviews annotation rules for partly hidden objects. The case illustrates a data-interface problem, not evidence that the detector is accurate once the coordinate bug is fixed. Model quality still requires separate evaluation.

Common misconceptions and mistakes

A bounding box is not a segmentation mask, and background inside the rectangle is expected. A confidence score is not guaranteed to equal the probability that every aspect of a detection is correct.
Do not mix pixel and normalized coordinates, or corner and center formats. An image resize, crop or letterbox operation changes the mapping back to original coordinates. Overlapping boxes can represent duplicates or genuinely overlapping objects. Annotation policies for occluded or truncated objects affect both training and evaluation, so they should be stated explicitly.

Business use

Bounding boxes support practical vision workflows because they are compact and relatively easy to annotate and exchange. They can locate objects for counting, routing, inspection or downstream image processing.
Define the annotation policy before collecting labels: which objects count, how tightly boxes fit and how occlusions are handled. Store image dimensions and coordinate conventions with the dataset. Evaluate small, crowded and partially hidden objects separately when they matter. If the business decision depends on exact shape, area or boundary measurements, assess whether boxes provide enough detail or whether segmentation or geometric modeling is required.

People also ask

Must a bounding box be axis-aligned?

No. Rotated boxes are also used when orientation matters.

Does it identify every object pixel?

No. It encloses a region and normally includes some background.

Can two boxes overlap?

Yes. Objects may overlap, and detectors can also generate duplicate predictions that need handling.

Check your understanding

A box is stored as center-x, center-y, width and height, but a viewer expects xmin, ymin, xmax and ymax. Can the four numbers be passed through unchanged?

Answer: No. They must be converted using the correct coordinate convention and image scale, or the displayed region will be wrong.

Related terms

  • Intersection over union
  • Region of interest
  • Object detection
  • segmentation mask
  • non-maximum suppression
  • annotation
  • object tracking
  • normalised coordinates

Learn next

Learn box coordinate formats and IoU next. Convert one box between corner and center representations, then resize the image and update the coordinates. Compare a box with a segmentation mask to understand which downstream measurements each representation can support.

More in Computer vision and multimodal AI

  • Block matching - Block matching is an image-processing method that compares a small rectangular patch with candidate patches to find similar content.
  • Block-matching and 3-D filtering (BM3D) - Block-matching and 3-D filtering, usually called BM3D, is an image-denoising method that groups similar two-dimensional patches into three-dimensional...
  • Boundary leakage - In Fourier image analysis, boundary leakage is unwanted spectral energy caused by a mismatch where opposite image edges meet under the discrete Fourier...
  • Boustrophedon cell decomposition - Boustrophedon cell decomposition divides a robot's free workspace into regions that can be covered with orderly back-and-forth passes.
  • Box filter - A box filter is an image filter that combines values within a rectangular neighborhood using equal weights.
  • Brown - Conrady model - The Brown - Conrady model is a camera-distortion model that describes departures from ideal perspective projection using radial and tangential terms.

Sources

Google Machine Learning Glossary, bounding box and intersection over union: https://developers.google.com/machine-learning/glossary#bounding-box Official glossary excerpts consulted. The coordinate and IoU examples are original and state their convention; dataset-specific and final technical review remain pending.

Previous: Bounded suboptimal search Next: Bounds consistent

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer