Hi David Many thanks, this will help me greatly, when parsing the .svg files. Upcoming patches will not be an issue, because i will have to run this just once.
Thanks again and have a good day Lukas David Nalesnik <[email protected]> schrieb am Mo., 26. Sep. 2016 um 20:13 Uhr: > Hi Lukas, > > On Fri, Sep 23, 2016 at 5:06 AM, Lukas Tuggener <[email protected]> > wrote: > > Dear All > > > > To create labeled training data for a machine learning project, I need to > > extract the location at which symbols are printed. Is it possible to > extract > > coordinates for every symbol? Methods which reveal the position of one > > symbol at a time would also already help a lot (e.g. control which symbol > > will be printed at the exact center) > > > > I am aware that similar questions have been asked have been asked in the > > past. But those are pretty old, so I am hoping that there has been some > > development in this area. > > (http://lists.gnu.org/archive/html/lilypond-user/2007-05/msg00142.html) > > > > The link you cite mentions looking at SVG output, and I suppose that > would be the best way. I can't think of another method to get the > actual print positions of objects. > > I can't help with processing the SVG output to get the information you > want (a bounding box for each element?), but the attached file might > help with preparing an interpretable file. > > Objects aren't assigned a unique id by default. The attached tries to > do this. Hopefully, the information included (grob name, moment, > horizontal and vertical coordinates) is sufficient. The coordinates > used in the ID aren't the print position -- they are relative to the > system on which the grob is found, for one thing. I include them to > distinguish between the note heads in a chord, which obviously occur > at the same time (moment). > > There's a patch being reviewed which replaces the 'id property with > 'output-properties and this will need to be updated accordingly > (https://sourceforge.net/p/testlilyissues/issues/4974/). > > Hope this helps, > David >
_______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
