Hi Anuj, Please let me finish my thoughts below...
>> Each curved segment has a large number of neighboring grid points. >> each of which has a unique nearest projection on the curve. The curve >> is naturally sampled by these projection points a very large number of >> times and quite uniformly. Therefore, why not divide the curve into a >> large number of segments to begin with and then just find whatever >> point is close to each grid? It could be a lot faster to find the >> distance this way. So each curve is sampled a large number of times and the distances are recorded at the grid points. This distance information is about those projection points, not the entire curve. Indeed, should we simply connect those projection points with straight segments, we would get exactly the same distance field. Ultimately, distance fields produce smooth borders because they contain information on how to thread a line between the grid points. It will be very close to the original Bezier curve, but not exactly the same. It will also be close enough to the jagged line though the projection points. It is at this point I am asking why not just split the curve using De Casteljau's algorithm recursively a large number of times and calculate the distance field for a slightly jagged line to begin with. The distance field will do the magic regardless and thread the boundary smoothly through the grid... On Wed, Jun 17, 2020 at 1:08 AM Anuj Verma <an...@iitbhilai.ac.in> wrote: > I guess this is similar to the Euclidean distance transform algorithm. > http://webstaff.itn.liu.se/~stegu/JFA/Danielsson.pdf No, I do not think this is it. > As I said before I will not leave out this option, I will try to implement > this > and then we can compare the performance. [skip] > I don't find anything offending in your suggestions. ;)