Box2D-for-Processing
Box2D-for-Processing copied to clipboard
Better way to create a customShape from OpenCV blob
I'm working in some examples using Box2D and OpenCV. My question is related to the best way to create a custom shape coming from OpenCV contour. I already resolved how to find the triangles of the shape using Delaunay. Then the first question is, how to update the custom shape because the triangles are always changing? My first attempt was to create the Box2D shape in one cycle and delete it the next cycle, however, it is not stable, it gives me java.lang.AssertionError. Is there a way to just update the custom shape instead of creating and erasing every two cycles?
Oh! I forgot to add the example, just in case it is useful.
BackgroundSubtraction_CV_Box2D_New.zip