|
Geometry : |
Subject: [geometry] Draw a polygon in a byte** image
From: Johan Doré (jdh_at_[hidden])
Date: 2015-05-26 16:35:34
Dear Boost::Geometry
Thanks a lot for all you hard work. It is an incredible daily help.
In our work we constantly trace image object outlines and save them as polygons, and draw such polygons as objects in images.
Now my question is on how we best draw a polygon, representing the outline of an image object, as an object in an image.
Our images are byte** images and we draw each polygon according to their object type [0-255].
A simple example could be a boost::geometry polygon with the outline [1 1, 1 4, 4 4, 4 1, 1 1] . We would draw the such object by mapping the boost::geometry polygon on a pixel polygon with the outline [1 1, 1 3, 3 3, 3 1, 1 1]. Like here:
[cid:image001.png_at_01D09804.2DD3C9D0]
My questions is therefore if boost::geometry have a drawing function doing something similar or if it has a function for doing the "to-pixel" outline conversion.
Best regards
Johan
Geometry list run by mateusz at loskot.net