DGtal icon indicating copy to clipboard operation
DGtal copied to clipboard

Incorrect position of DSSes in an output of the Board2D

Open copyme opened this issue 12 years ago • 1 comments

I extracted an interpixel boundary of a circle by the track2DBoundaryPoints(), an then I used the SaturatedSegmentation to get a set of maximal segments and after that I sent this circle and DSSes to Board2D. Right now in the results some DSSes looks like moved a bit.

If you want an example which produce this problem I can find a time at the weekend. disc10-0 5

copyme avatar Nov 27 '13 23:11 copyme

Yeah that's a known behavior and a good question. At your figure, the DSS covering is computed on the grid such that pointels (vertices of the object boundary -- vertices of your gray squares--) are mapped to integer point coordinates. I do agree that if you want the two geometrical to match, there is a 1/2 shift to perform.

Unfortunately, the Board2D system (used to generate the figs) does not work well if you want to draw, on the same picture, both digital objects and the red DSS boxes.

Fixing this is in our todolist but in the meantime, you can either display the DSS + boundary (PointsRange from GridCurve), or save in SVG and move the digital set using inkscape for instance.

dcoeurjo avatar Nov 29 '13 09:11 dcoeurjo