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
167
votes
10 answers

Extracting text OpenCV

I am trying to find the bounding boxes of text in an image and am currently using this approach: // calculate the local variances of the grayscale image Mat t_mean, t_mean_2; Mat grayF; outImg_gray.convertTo(grayF, CV_32F); int winSize =…
Clip
  • 3,018
  • 8
  • 42
  • 77
116
votes
7 answers

How to get string width on Android?

I would like to get height too if possible.
Lindlof
  • 2,152
  • 2
  • 17
  • 26
82
votes
12 answers

Calculate Bounding box coordinates from a rotated rectangle

I have the coordinates of the top left point of a rectangle as well as its width, height and rotation from 0 to 180 and -0 to -180. I am trying to get the bounding coordinates of the actual box around the rectangle. What is a simple way of…
coulix
  • 3,328
  • 6
  • 55
  • 81
63
votes
1 answer

How to calculate the height of an NSAttributedString with given width in iOS 6

Possible Duplicate: How to get height for NSAttributedString at a fixed width Now NSAttributedString is available in iOS 6. For layout purposes, I want to know how to calculate the required height of an NSAttributedString under fixed width. I'm…
Jake
  • 1,518
  • 2
  • 14
  • 20
61
votes
9 answers

How much do two rectangles overlap?

I have two rectangles a and b with their sides parallel to the axes of the coordinate system. I have their co-ordinates as x1,y1,x2,y2. I'm trying to determine, not only do they overlap, but HOW MUCH do they overlap? I'm trying to figure out if…
Patrick Collins
  • 4,046
  • 3
  • 26
  • 29
60
votes
9 answers

Calculating percentage of Bounding box overlap, for image detector evaluation

In testing an object detection algorithm in large images, we check our detected bounding boxes against the coordinates given for the ground truth rectangles. According to the Pascal VOC challenges, there's this: A predicted bounding box is…
user961627
  • 12,379
  • 42
  • 136
  • 210
42
votes
6 answers

Calculating bounding box a certain distance away from a lat/long coordinate in Java

Given a coordinate (lat, long), I am trying to calculate a square bounding box that is a given distance (e.g. 50km) away from the coordinate. So as input I have lat, long and distance and as output I would like two coordinates; one being the…
Bryce Thomas
  • 10,479
  • 26
  • 77
  • 126
35
votes
3 answers

Extract bounding box and save it as an image

Suppose you have the following image: Now I want to extract each of the independent letters into individual images. Currently, I've recovered the contours and then drew a bounding box, in this case for the character a: After this, I want to…
29
votes
2 answers

Get dimension of a path in SVG

I need to get the dimension on the screen of a in a SVG from JavaScript. I do not have any "transformation" or "scaling" (transform, scale) on my SVG. The only thing changed is the viewBox, which will change the size of all the elements in…
jsgoupil
  • 3,788
  • 3
  • 38
  • 53
29
votes
3 answers

Get the bounding box coordinates in the TensorFlow object detection API tutorial

I am new to both Python and Tensorflow. I am trying to run the object detection tutorial file from the Tensorflow Object Detection API, but I cannot find where I can get the coordinates of the bounding boxes when objects are detected. Relevant…
Mandy
  • 325
  • 1
  • 4
  • 5
27
votes
3 answers

Efficient way to combine intersecting bounding rectangles

I'm trying to simplify the following image using OpenCV: What we have here are lots of red shapes. Some of them completely contain others. Some of them intersect their neighbors. My goal is to unify all intersecting shapes by replacing any two…
Assaf Lavie
  • 73,079
  • 34
  • 148
  • 203
26
votes
4 answers

Calculate the bounding box's X, Y, Height and Width of a rotated element via JavaScript

Basically I'm asking this question for JavaScript: Calculate Bounding box coordinates from a rotated rectangle In this case: iX = Width of rotated (blue) HTML element iY = Height of rotated (blue) HTML element bx = Width of Bounding Box (red) by =…
Campbeln
  • 2,880
  • 3
  • 33
  • 33
22
votes
2 answers

Calculate rotated rectangle size from known bounding box coordinates

I read the Calculate Bounding box coordinates from a rotated rectangle to know how to calculate bounding box coordinates from a rotated rectangle. But in a special case as follow image: How to get the rotated rectangle size if had get the bounding…
Liao San Kai
  • 857
  • 1
  • 11
  • 17
22
votes
2 answers

Is there an equivalent to getBoundingClientRect() for text nodes?

Is there a way to get the bounding rect of a text node? The getBoundingClientRect() method is defined on elements only, and the parent element is bigger then the actual text node.
user163369
  • 265
  • 1
  • 2
  • 6
18
votes
1 answer

Port MATLAB bounding ellipsoid code to Python

MATLAB code exists to find the so-called "minimum volume enclosing ellipsoid" (e.g. here, also here). I'll paste the relevant part for convenience: function [A , c] = MinVolEllipse(P, tolerance) [d N] = size(P); Q = zeros(d+1,N); Q(1:d,:) =…
1
2 3
73 74