On August 7, 2011 03:25:31 am kfj wrote: > since you, Tom, mention .ini format, I'd like to mention that python > has a module (configparser) which readily scans .ini files with very > little work on the user's part.
Actually Hugin already has/uses wxConfigBase [0] which readily scans/writes .ini files with very little work. > the syntax is a bit spartan for my taste and > I fear that it might be too meagre to encompass all we need +1 or otherwise stated: what is wrong with the syntax of the existing PTO format? and what alternative syntax would be better? XML? > we might stumble upon a ready-made set of modules (or libraries, if we > want to do it in C/C++) which offers > > - a syntax for structured data description (meta-language) > - derived from that, data structures for internal use (the relevent > python ore C++ object definitions) > - and persistent storage for them (like, tables in a database) > - plus an import/export facility to make human-readable output and > possibly even import pto > - a graphical tool to look at the data all of these points strongly toward XML... > - finally, transactional integrity and rollback ability ... and if we use an in-memory database engine (sqlite seems to be the most ubiquitous) we can probably get that as well. Actually, the introduction of a database engine would be a compelling reason for dumping the existing format, because there would be much less code to write if we simply dump/load from/to the database. However, I suspect that given the large base of existing PTO file, some sort of backward- compatibility/migration-path will have to be thought of; probably in the form of an import function that reads the existing PTO file using one of the existing parsers and dump it into the database tables for further use by "Hugin NG". > think of how nice it would be to have all that in a neat packet > instead of having to code it all ourselves (or, maintain the code > which is already there)! And be able to just change or add bits in the > data description and have all facets altered without manual > intervention. Indeed, it would be very nice. What I would like to add, at this moment, is positioning data for images that do not have any CP defined, i.e. the grid from a robotic pano head for those large empty spaces (sky). If I know that there is one image at pitch 20 and another image at pitch 60 and 9 images between them, I will know to spread them at 24,28,32,36,40,44,48,52,56 and the blender will do a good enough job at compositing that sky. With the information recorded, those images could be dragged with the rest of the panorama. > Any ideas? sqlite to represent the internal data structure (table of images, table of lenses, table of CPs). The rest will follow. It is already used in many many apps, no need to reinvent the wheel. Yuv [0] http://docs.wxwidgets.org/stable/wx_wxconfigbase.html
signature.asc
Description: This is a digitally signed message part.
