convex-hull

finding convexity defects in opencv? [crashes depending on the given input image..]

╄→гoц情女王★ 提交于 2020-01-03 18:37:14
问题 I have a program that calculates the convex hull of an image. I'm trying to use this information in order to count the number of fingers that are present in an input image. From some surfing I found out that the way to do this (count fingers) is by Finding contours Convex Hull Convexity defects But I'm having trouble using the convexity defects function. It compiles fine but at runtime the program crashes with certain input images but not with others and I can't seem to figure out why. These

finding convexity defects in opencv? [crashes depending on the given input image..]

血红的双手。 提交于 2020-01-03 18:37:06
问题 I have a program that calculates the convex hull of an image. I'm trying to use this information in order to count the number of fingers that are present in an input image. From some surfing I found out that the way to do this (count fingers) is by Finding contours Convex Hull Convexity defects But I'm having trouble using the convexity defects function. It compiles fine but at runtime the program crashes with certain input images but not with others and I can't seem to figure out why. These

Android Google Maps PolygonOptions not plotted from given set of coordinates

妖精的绣舞 提交于 2020-01-02 05:43:11
问题 I am trying to plot a complex polygon around a route, following its steps with a given radius. To do so I drew 50-sided uniform polygons (which are practically circles) around each step (coordinate) of the route. Now I obtain a set of coordinates of all the plotted circles around the route, and I can see them on the map but they are overlapped which is not very good looking, and it's not a good practice to add such a huge number of overlays on the map. So what I need to do now is to merge all

In scipy's ConvexHull, what does “area” measure?

混江龙づ霸主 提交于 2019-12-30 05:59:18
问题 The value of the "area" attribute in scipy ConvexHull (see http://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.ConvexHull.html) object does not seem to be (what I understand to be) the area of the convex hull. On the other hand, the value of "volume" does seem to be the area of the convex hull. from scipy.spatial import ConvexHull import numpy points = numpy.array([[-1,-1], [1,1], [-1, 1], [1,-1]]) hull = ConvexHull(points) print("Volume is %2.2f" % hull.volume) # Prints 4.00

In scipy's ConvexHull, what does “area” measure?

馋奶兔 提交于 2019-12-30 05:56:09
问题 The value of the "area" attribute in scipy ConvexHull (see http://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.ConvexHull.html) object does not seem to be (what I understand to be) the area of the convex hull. On the other hand, the value of "volume" does seem to be the area of the convex hull. from scipy.spatial import ConvexHull import numpy points = numpy.array([[-1,-1], [1,1], [-1, 1], [1,-1]]) hull = ConvexHull(points) print("Volume is %2.2f" % hull.volume) # Prints 4.00

Removing outliers from convex hull [closed]

冷暖自知 提交于 2019-12-25 17:05:57
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 months ago . I have a few datasets that I'd like to visualise with convex hull (and derive some statistics from that convex hull). However, each dataset contains some noise. Therefore, convex hull covers not only points in the main data cloud, but also all the outliers making the area of convex hull pretty large and not

D3 geom.hull with custom accessors

 ̄綄美尐妖づ 提交于 2019-12-24 12:19:47
问题 According to the D3 documentation the hull method can be assigned custom accessors to get the x and y coordinates. Hull documentation I would like to use these custom accessors , but I can not figure out the syntax. This is what I have done which is basically an unelegant workaround where I manually transform my vertices array. var width = 900, height = 600; var svg = d3.select("#content").append("svg") .attr("width", width) .attr("height", height); var hull = svg.append("path") .attr("class"

How Convexity Defect is calculated in OpenCV?

只谈情不闲聊 提交于 2019-12-23 20:17:26
问题 What is the algorithm used in OpenCV function convexityDefects() to calculate the convexity defects of a contour? Please, describe and illustrate the high-level operation of the algorithm, along with its inputs and outputs. 回答1: Based on the documentation, the input are two lists of coordinates: contour defining the original contour (red on the image below) convexhull defining the convex hull corresponding to that contour (blue on the image below) The algorithm works in the following manner:

Convex Hull Misunderstanding?

早过忘川 提交于 2019-12-23 19:52:46
问题 I wrote an implementation of Graham's Scan convex hull algorithm and for test data I used the points [(2.0,2.0),(4.0,2.0),(0.5,2.5),(3.0,3.5),(1.0,4.0),(0.0,4.0),(1.0,1.0),(3.0,2.5),(4.0,4.0),(3.5,1.5),(0.5,1.0)] According to my program the convex hull is [(0.0,4.0),(1.0,4.0),(4.0,4.0),(3.0,2.5),(4.0,2.0),(3.5,1.5),(1.0,1.0),(0.5,1.0)] However, I expected the convex hull to be [(0.0,4.0),(1.0,4.0),(4.0,4.0),(4.0,2.0),(3.5,1.5),(1.0,1.0),(0.5,1.0)] I tried my set of points with https://github

Strategy for isolating 3d data points

烂漫一生 提交于 2019-12-23 17:43:50
问题 I have two sets of points, one from an analysis and another that I will use for the results of post-processing on the analysis data. The analysis data, in black, is scattered. The points used for results are red. Here are the two sets on the same plot: The problem I have is this: I will be interpolating onto the red points, but as you can see there are red points which fall inside areas of the black data set that are in voids. Interpolation causes there to be non-zero values at those points