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
0
votes
1 answer

Unexpected behaviour of convex hull algorithm

I was trying to implement the algorithm to get the convex hull for a given set of points and visualise the result using opencv using the following code on c++: #include "opencv2/opencv.hpp" #include "StdAfx.h" #include #include…
0
votes
1 answer

Convex hull - Monotone chain algorithm error

I'm using the Monotone chain algorithm to create a convex hull around a set of polygons. It works well sometimes, but on some shapes, it fails. Take a look at this example: https://i.stack.imgur.com/wfVJN.png To the left is the shape before applying…
Eric
  • 18,532
  • 2
  • 34
  • 39
0
votes
2 answers

Creating many convex hulls MATLAB

i'm new here and this is my first post.. i want to know if there is a way to calculate all the possible convex hulls from 100 random points.. i've created a code that does this right but it gives me an error at convhull and everything beneath that…
co2ark5
  • 45
  • 1
  • 3
  • 12
0
votes
1 answer

How can i calculate elongation of a convex hull in opencv?

I have found this way to calculate elongation basing on image moments #ELONGATION def elongation(m): x = m['mu20'] + m['mu02'] y = 4 * m['mu11']**2 + (m['mu20'] - m['mu02'])**2 return (x + y**0.5) / (x - y**0.5) mom =…
postgres
  • 2,242
  • 5
  • 34
  • 50
0
votes
1 answer

Algorithm to partition an area - find points close to each other

Is there an algorithm to find all points with a set distance from each other ? Or all rectangles that are touching ? I divide the plane (in lat/lon coordinate system, of certain limits) in sample rectangles of n x n, and each rectangle gets a value…
Thalia
  • 13,637
  • 22
  • 96
  • 190
0
votes
2 answers

dynamic programming optimizaton,convex hull

There is a problem asked in contest. I already solved this problem with dynamic programming and its complexity O(n^2).But i am looking more efficient way. I already saw that dynamic Programming can be optimized with convex hull. Do you have any…
sekogs
  • 292
  • 4
  • 18
0
votes
1 answer

matlab convhulln issue

Using matlab's "convhulln" (3D), my code sometimes crashes complaining of "initial facet 1 coplanar with the interior". This is correct when I inspect the shape of the object visually. But could I somehow check for this before using convhulln on the…
user1641496
  • 457
  • 1
  • 8
  • 18
0
votes
1 answer

voxels inside a 3D convexhull

I have a cubic matrix of voxels of value 1 (the rest is 0). I need a matrix of the same size where the voxels INSIDE the convex hull are all of value 1. I've seen a similar example and adapted it: If I do this to the following, would that work? %…
0
votes
1 answer

number of holes in convex hull in matlab

I have used convhulln in matlab to find the surrounding shape of a set of data points in 3D. See history in: Convhull in Matlab. A good samaritan helped me to find out how it works in matlab. I need to know the propertion of gaps (holes) inside the…
user1641496
  • 457
  • 1
  • 8
  • 18
0
votes
1 answer

Drawing circles at BENDING points of convex hull

I am trying to figure out of drawing circles at the BENDING points of a convex hull. Using the sample from OpenCV documentation for convex hull , I have a convex hull. But I am not really sure on how to draw the circles at the points where the…
user349026
0
votes
2 answers

What algorithm does the convhull() function in Matlab use?

What algorithms do the convhull and convhulln functions in MATLAB implement to compute the convex hull? I cannot find any references..
0
votes
1 answer

How can extract points which are formed a convex hull of 3 dimensions polygon in Matlab by using convexhull functions?

I use different convex hull functions in Matlab to find points coordinates which are formed the convex hull. however, these functions return the matrix of triangles. How can I specify those points? Thanks. Sepideh
0
votes
2 answers

OpenCV C++ cv::convexityDefects error

vector hull; vector defects; convexHull(Mat(largest),hull,false); convexityDefects(largest,hull,defects); *largest is my largest contour in the image But the convexityDefects gives me this error "Assertion failed (hull.checkVector(1,…
XterNalz
  • 325
  • 1
  • 5
  • 10
-1
votes
1 answer

Unity3D - Order list by angle to point

I am trying to make a 2D game in unity. I want to create a convex hull around a group of rigidbody2Ds that I have in a List. To do this, I need to order the List by the angle that each rigidbody2D makes with the start position. Anyone know how I…
flibit
  • 3
  • 2
-1
votes
1 answer

Why Andrew's Monotone Algorithm takes O(N LogN) times?

Andrew's monotone chain convex hull algorithm constructs the convex hull of a set of 2-dimensional points in O(n\log n) time. I followed the steps of the algorithm and found out that it has O(n Logn) time complexity. Sorting is just finding the…
jay jay
  • 25
  • 5
1 2 3
35
36