How do I even begin to program a method that would take an RGBA BufferedImage as input and turn it into a Polygon that represents the 'outline' of the image using the alpha. Keep in mind that my Polygon class contains an ArrayList of points (which can have float x and y values), and they may represent a concave polygon if necessary. The points have to be in order clockwise or counter-clockwise, and the polygon is ever closed. There is no need for holes. How i do?
Asked
Active
Viewed 284 times
1
-
1st start with the source on [this question](http://stackoverflow.com/questions/7052422/image-graphic-into-a-shape-in-java/) & [this question](http://stackoverflow.com/questions/7218309/smoothing-a-jagged-path), then do your best and edit your own question to ask something (anything) specific. – Andrew Thompson Sep 05 '12 at 03:15
-
Sounds to me like a job for [JavaCV](http://code.google.com/p/javacv/).. And yes if you ask a real question, I may be able to offer a real answer. – Samuel Audet Sep 05 '12 at 03:37
-
Well, I don't need real code for an answer. Just some algorithms that I may write on java myself. On another site somebody came close by showing me the gift wrapping algorithm, however that wasn't quite the answer, since I'm looking for a CONCAVE hull algorithm and not a convex one. – HOW I DO Sep 05 '12 at 14:41