Convex-hull.cpp Example
I have the same issue described on this stackexchange item: http://stackoverflow.com/questions/24....
Due to a memory corruption with convexHull(Mat(points), hull, true); The fix on stackexchange resizes the hull before convexing it. Is this a bug or a specific error caused by my setup.
Setup: Windows 7 64-bit Microsoft Visual Studio 2013
please try to explain it without the SO link
the issue is simple, you are doing
convexHull(Mat(points), hull, true);
while a convexHull is calculated on a set of points, so avector<Points>
. Why are you forcing it inside a Mat?I think
Mat(points)
is allowed. The problem should be that hull is also avector<Point>
notvector<int>
.@matman, ow I completely missed that, but indeed, it cannot be a vector int to store locations ...