From: D M G. <dm...@uv...> - 2009-12-31 17:08:12
|
Hi Tom, Tom> Hi Daniel Tom> I'm trying to set up to test my revised general pannini code in libpano, and need some guidance about how projection parameters get passed to/ Tom> from hugin. Tom> First, I don't quite understand this code in queryfeatures.c QueryFeatures was built as an interface to hugin. Hugin will use it to know how many projections are supported, their field of view and any parameters needed. Look at the albert conic projection for an example of one with 2 parameters. This way Hugin dynamically adjusts to the features of libpano without having to be recompiled. Tom> case PANO_FORMAT_PANINI_GENERAL: Tom> features->maxVFOV = 179; Tom> features->maxHFOV = 359; Tom> features->numberOfParameters = 1; Tom> features->parm[0].name = "d"; Tom> features->parm[1].name = "phi2"; Tom> for (i=0;i<2;i++) { Tom> features->parm[i].minValue = +0.00001; Tom> features->parm[i].maxValue = 10e10; Tom> } Tom> break; Tom> If there is just one parmeter, why do you intialize two of them? What is phi2? A "cloning" error. I just copied the code from the Albert. I should have removed that line, and adjusted the for loop accordingly. I'll do that right now. As I mentioned before, queryfeatures is code that is not used inside libpano (I think it should, for verification of parameters, but it is not currently). Tom> How is the size of parm[] set? What do I have to do to add two more parameters? #define PANO_PROJECTION_MAX_PARMS 3 I said yesterday it was equal to 2. I was wrong, it is currently equal to 3. I am not sure how hugin sets it. So to add two parameters you don' t need to do anything, just start using them in the projection. And set them in the script, of course "P<val1> <val2> <val3>" Tom> Second, are any source changes needed on the hugin side, or can I Tom> just relink a several months old build of hugin against this Tom> pano13.lib? I'll check for the maximum number of parameters with the hugin people. Maybe yes, maybe not (the only problem is how the maximum number of parameters is set). Tom> Happy New Year, Tom Happy new year! -- Daniel M. German http://turingmachine.org/ http://silvernegative.com/ dmg (at) uvic (dot) ca replace (at) with @ and (dot) with . |