Questions tagged [convex-hull]

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.

538 questions
4
votes
1 answer

merging convex hulls in java

I've written a java program which which uses the divide and conquer algorithm to find the convex hull of a polygon in a cartesian coordination. I have a class Coord which has two "double" fields X and y and "this" which I'm using the method on, is a…
Navid Koochooloo
  • 285
  • 1
  • 5
  • 20
4
votes
1 answer

Fill Color on ConvexHull OpenCV

Everyone, please help me. I have a problem. I make a Convex Hull detection from image. Then, i have a problem to fill a color on area within the boundary of ConvexHull. Is there someone who can help me to fill a color on area within the boundary of…
Jenang
  • 91
  • 1
  • 2
  • 4
4
votes
1 answer

Non-convex polygon - preprocess to use convex hull algorithm

I used the convexHull algorithm to find the contour for some... irregular shape. It is not good enough though... Quite possibly because I can't guarantee that the shape I have is convex... I have a set of rectangles, and I would like to be able to…
Thalia
  • 13,637
  • 22
  • 96
  • 190
4
votes
2 answers

using convex hull algorithm to sort integers

The algorithm for two-dimensional convex hulls uses sorting. Suppose someone gave you a library with convex hull implemented as a black box. Show how you would use the convex hull algorithm to sort a sequence of given integers. The phrase "black…
user1858533
  • 41
  • 1
  • 2
4
votes
2 answers

Efficent algorithm for creating the convex layers from a set of points

I've got a list of points that I'm trying to generate the convex layers for in python. Currently I'm simply using the following: def convex_layers(points): points = sorted(set(points)) layers = [] while points: #Create the next convex…
Nuclearman
  • 5,029
  • 1
  • 19
  • 35
3
votes
1 answer

Using cvApproxPoly() on the results of cvConvexHull2() in OpenCV

I'm writing C (not C++) code to run convex hull on contours of rectangles. The (greatly simplified) code for that looks like this: CvSeq* contours; CvSeq* hull; cvFindContours( img, &contours, sizeof(CvContour), CV_RETR_LIST,…
Backgammon
  • 454
  • 5
  • 15
3
votes
2 answers

Finding convex defects? in OpenCV 2.3, c++ with MS Visual Studio2010

I am currently attempting to use OpenCV 2.3 and c++ to detect a hand (wearing a green glove), and distinguish between different hand gestures. At this very moment, my next step is to acquire specific features of the hand (convex defects). So far…
Sonaten
  • 502
  • 2
  • 14
3
votes
1 answer

Computing quick convex hull using Numba

I came across to this nice implementation of computing convex hull of 2d points using Numpy implementation. I would like to be able to @njit this function to use it inside my other Numba jitted code. However I'm not able to modify it, to run, as it…
Hokyjack
  • 103
  • 1
  • 7
3
votes
2 answers

Getting the upper convex hull of a set of points in R

I am trying to obtain the upper convex hull, in R, of a set of points relating to productivity data. I expect it to be a function with decreasing returns to scale, with the input being worker hours and output being a measure of work done. I would…
Sarthak Nigam
  • 117
  • 1
  • 10
3
votes
2 answers

convex hull algorithm for 3d surface z = f(x, y)

I have a 3D surface given as a set of triples (x_i, y_i, z_i), where x_i and y_i are roughly on a grid, and each (x_i, y_i) has a single associated z_i value. The typical grid is 20x20 I need to find which points belong to the convex hull of the…
gurney alex
  • 13,247
  • 4
  • 43
  • 57
3
votes
1 answer

THREE.js OBB Implementation

I was able to use Yuka_OBB implementation to generate oriented bounding box. I have some questions regarding the obtained results: Bed (AABB) Bed (OBB) Wall (AABB) Wall (OBB) Question: What type of OBB is generated here from one of the following…
Sam
  • 207
  • 1
  • 10
3
votes
1 answer

Split the upper edge line and lower edge line for a given cloud of points?

I have a list of 2D points x,y. And I need to find a smooth curve for the upper and lower edges (red and blue curves, correspondingly). See the picture below: Here I've found a good example, where the outer edge of x,y points is detected. Using…
Eugene W.
  • 357
  • 3
  • 11
3
votes
1 answer

Interpolation of the values of points on the surface created by convex hull

I have some 3D points like [x,y,z] and their values like [Bx,By,Bz] . The convex hull of these points are generated by convhull or convexHull Now I want to interpolate the values of triangle vertices for N new points on the convex hull. What are…
NGS92
  • 31
  • 1
3
votes
1 answer

Convex hull on horizontal and vertical error bars

I have a ggplot with means and both horizontal and vertical error bars, and I'd like to add a convex hull that encompasses all the error bars - like so: I have tried with stat_chull from ggpubr but am not sure how to specify the aesthetics when…
JPF
  • 89
  • 6
3
votes
0 answers

Convex Hull - Higher Dimension (20D)

I'm trying to find the convex hull vertices of a Higher Dimension Data (20 D). I have found open source alogorithms by QHULL which can handle upto 8D and sometimes 9D with less points.Are there any algorithms that can handle 20 Dimensions or more?…