i have bufferedimage image objects have transparent pixels. i'd shape or area objects enclose transparent portion of image.
you try way: treat original image undirected graph nodes transparent pixels. put edge between adjacent nodes on image (i.e. transparent pixels directly above, left, right, below, , diagonal). find connected components graph. each connected component, compute convex hull. return list containing each of hulls, each hull being shape.
Comments
Post a Comment