Questions tagged [bounding]

71 questions
22
votes
3 answers

Is there a "bounding box" function (slice with non-zero values) for a ndarray in NumPy?

I am dealing with arrays created via numpy.array(), and I need to draw points on a canvas simulating an image. Since there is a lot of zero values around the central part of the array which contains the meaningful data, I would like to "trim" the…
heltonbiker
  • 26,657
  • 28
  • 137
  • 252
21
votes
2 answers

Bounding ellipse

I have been given an assignement for a graphics module, one part of which is to calculate the minimum bounding ellipse of a set of arbitrary shapes. The ellipse doesn't have to be axis aligned. This is working in java (euch) using the AWT shapes, so…
Martin
  • 12,469
  • 13
  • 64
  • 128
7
votes
6 answers

Bounding this program to determine the sum of reciprocal integers not containing zero

Let A denote the set of positive integers whose decimal representation does not contain the digit 0. The sum of the reciprocals of the elements in A is known to be 23.10345. Ex.…
Bobby S
  • 4,006
  • 9
  • 42
  • 61
5
votes
2 answers

Minimal enclosing parallelogram in Python

I have a set of points defining a convex polygon, and would like to find the enclosing parallelogram with the minimum area using Python and/or NumPy. Here are some possible useful resources, but I'm not able to make enough sense of them…
5
votes
3 answers

how do I find the angle of rotation of the major axis of an ellipse given its bounding rectangle?

I have an ellipse centered at (0,0) and the bounding rectangle is x = [-5,5], y = [-6,6]. The ellipse intersects the rectangle at (-5,3),(-2.5,6),(2.5,-6),and (5,-3) I know nothing else about the ellipse, but the only thing I need to know is what…
GSS1
4
votes
1 answer

How to draw bounding box around face on frameLayout android

I have a frameLayout in xml: This preview is for displaying camera view: mPreview = new…
Wei G
  • 93
  • 1
  • 7
4
votes
2 answers

PHP Library: Calculate a bounding box for a given lat/lng location

I'm looking for a PHP Library / PHP Script that allows me to calculate an accurate bounding box for a given center point (lat/lon). Using an ellipsoid formula (f.ex. WGS84) would be great. I know, there have to be a library but I'm not able to find…
brain
  • 41
  • 1
  • 2
3
votes
1 answer

How to construct R Tree(STR Method) with rectangle bounding boxes?

How to construct R Tree based on Sort Tile Recursion Method of rectangle bounding boxes along with searching alone? Totally 12 bounding boxes with (minx, miny) & (maxx , maxy) I don't need to delete or update any nodes.
user712097
  • 31
  • 2
3
votes
2 answers

Bounding Multiple Classes in Java

I am working on an assignment, and required is that I create two generic collections (called ComputerOrder and PartyTrayOrder) of several classes: ComputerPart, Peripheral, and Service, and and of Cheese, Fruit, and Service respectively. All of…
memyarn
  • 33
  • 3
3
votes
1 answer

How to get width and height of bounding rectangle of font character?

I am curious is it possible to get bounding rectangle width and height of font characters with javascript?
Dmytro
  • 677
  • 2
  • 12
  • 26
3
votes
2 answers

Triangle bounding box

I'm supposed to write code that calculates the bounding box of a triangle. The bounding box coordinates should be written to triangle->bx, triangle->by, triangle->bw, triangle->bh where bx, by is the upper left corner of the box bw, bh is the width…
user6995957
  • 31
  • 1
  • 3
3
votes
1 answer

Qt bounding rect / shape for item interaction

I am doing a Qt program where I have rectangles linked with wires (placed by the user with mouse events). Every wire checks if there is a rectangle at the beginning and the end of it. If it is the case, the wire is placed. I recently wanted to…
Tarask
  • 31
  • 1
3
votes
1 answer

Find all bounding boxes intersecting with a given point (using a tree structure)

I've created a function that loops through a list of 2d bounding boxes and finds those that contain the given 2d point. Unfortunately this is quite slow so I was looking for a way to optimise it using some kind of tree structure. I've seen lots of…
3
votes
2 answers

Calculating SVG bounding box using PHP with respect to curves

I recently found this amazing class located here, and tried using it. However, it only works with some of the basic functions such as move, horizontal line, and vertical line. -- I have tried extending this existing class by adding additional checks…
Dave Chen
  • 10,887
  • 8
  • 39
  • 67
2
votes
3 answers

Find size of inner rect of a circle

I have a circle, say radius of 10, and I can find the outer bounding rect easy enough since its width and height is equal to the radius, but what I need is the inner bounding rect. Does anyone know how to calculate the difference in size from the…
Justin G
  • 776
  • 1
  • 10
  • 25
1
2 3 4 5