Convex-hull of a set of points X in a Euclidean space is the convex set with smallest area that contains all points of X.
Questions tagged [convex-hull]
538 questions
7
votes
1 answer
Python convex hull with scipy.spatial.Delaunay, how to eleminate points inside the hull?
I have a list of 3D points in a np.array called pointsList, values are float :
[[1., 2., 10.],
[2., 0., 1.],
[3., 6., 9.],
[1., 1., 1.],
[2., 2., 2.],
[10., 0., 10.],
[0., 10., 5.],
... etc.
This code makes a Delaunay triangulation of the…

adrienlucca.net
- 677
- 2
- 10
- 26
7
votes
1 answer
get the index of point which create ConvexHull
I amtrying to use scipy.spatial (from scipy.spatial import ConvexHull)to draw convex hull of series of points.
import pylab as pl
from scipy.spatial import ConvexHull
pl.figure()
pl.hold(True)
points = np.concatenate((x, y), axis=1)
hull =…

Am1rr3zA
- 7,115
- 18
- 83
- 125
7
votes
1 answer
D3 drawing a hull around group of circles
I want to draw a hull around a grouped force directed graph build with d3.
I have build the graph with the circles. But I now want to join the intersections of the circles with a path(hull). If not joining the intersections, Drawing a hull…

Sunil Raj
- 460
- 5
- 20
7
votes
2 answers
android java opencv 2.4 convexhull convexdefect
Open-CV 2.4 Android-Java:
i have searched for contours (list of MatofPoint) like this:
Imgproc.findContours(roi_mat, contours, hierarchy, cfg.retMode, cfg.apxMode);
and then the convexhull (has to be a list of MatofInt )
for (int k=0; k <…

ddd
- 481
- 6
- 17
6
votes
1 answer
Is there a way to dynamically draw lines between points over a coordinate plane?
I am completing a project in which I have implemented a brute force algorithm for solving the Convex Hull problem. I need to also create a visual for this algorithm. I am trying to create a coordinate plane ranging from (-100, 100) on both the x and…

VaniCodes
- 73
- 3
6
votes
1 answer
Calculating and displaying a ConvexHull
I'm trying to calculate and show a convex hull for some random points in python.
This is my current code:
import numpy as np
import random
import matplotlib.pyplot as plt
import cv2
points = np.random.rand(25,2)
hull =…

Atakan ADA
- 95
- 1
- 1
- 8
6
votes
1 answer
Extract Characters using convex Hull coordinates - opencv - python
I have character images like this:
Using following code I could get contours and convex hull, then I could draw convex for each character.
import cv2
img = cv2.imread('test.png', -1)
ret, threshed_img = cv2.threshold(cv2.cvtColor(img,…

Ishara Madhawa
- 3,549
- 5
- 24
- 42
6
votes
2 answers
Test case data for convex-hull
I need to make a 2D convex hull function for a class assignment and I want a more robust test cases than the assignment provides. Does anyone known of a largish test cases (25 < n < 100) with the solution?

BCS
- 75,627
- 68
- 187
- 294
6
votes
5 answers
How to check for convexity of a 3d mesh?
Is there a fast way to do this? Searching online shows convexity of functions or single polygons. But I need the ability to check this for the whole model. An object can have convex faces but can be concave as a whole like a torus.

Joan Venge
- 315,713
- 212
- 479
- 689
6
votes
1 answer
Convex hull routines in scipy.spatial gives me back my original set of points
I have a set of points and want to find the convex hull. When I give them to scipy.spatial (either ConvexHull or Delaunay), I just get the original set of points back. By construction, this should not be the case.
Here are the points as a pickled…

benten
- 1,995
- 2
- 23
- 38
6
votes
3 answers
Convex Hull and SciPy
I'm trying to use scipy (0.10.1) for a quick hack to visualize the convex hull.
I can get the convex hull using the following code:
vecs = [[-0.094218, 51.478927], [-0.09348, 51.479364], [-0.094218, 51.478927],
...
[-0.094218,…

Has QUIT--Anony-Mousse
- 76,138
- 12
- 138
- 194
5
votes
0 answers
Min area enclosing rectangle from set of n points
I want to find minimal enclosing rectangle for set of n points. First I found convex hull.
If I have a convex hull from set of points ( I got it by doing Graham scan) stored as a sorted list. And from every edge of that convex hull, by binary search…

user940009
- 53
- 3
5
votes
2 answers
ConvexHull in Graphics - Mathematica
Trying to plot a ConvexHull Using PlanarGraphPlot from the ComputationalGeometry package, it does not work when used in graphics.
Any Idea on how to plot the ConvexHull using Graphics ?

500
- 6,509
- 8
- 46
- 80
5
votes
2 answers
Sorting by Polar Angle
I'm trying to implement the Graham’s Scan algorithm for a convex hull in Java, and have trouble sorting the points by polar angle with respect to the point with lowest y-value.
I have found this answer and understand how to calculate the polar…

Pakchoiandbacon
- 55
- 1
- 7
5
votes
3 answers
Best Algorithm to find the edges (polygon) of vertices
I have a large array of vertices, some of them are edges, some are redundant (inside the shape) and I want to remove those.
The simplest algorithm I could think of is checking one by one if they hit the shape formed by the others. But it should be a…

fabiopedrosa
- 2,521
- 7
- 29
- 42