## [PanoTools-devel] PToptimiser question - batch stitching constraints

 [PanoTools-devel] PToptimiser question - batch stitching constraints From: Stuart Milne - 2005-01-05 15:01:23 Attachments: Message as HTML ``` Hi all, =A0 I=A0understand this list=A0was created to=A0improve PTools, = and wondered if you could help - specifically=A0with=A0use of PTOptimiser. = =A0 I have produced a very accurate panoramic head recently (www.360Preci= sion.com), and am having a hell of a time reliably calibrating the=A0lens/r= ig using PTGui/PTmac. Let me explain the situation. =A0 The head should i= s very accurate, rotating the camera about a known point by precisely 45 d= egrees each time (i am confident it is accurate to <0.05deg). Pitch is unkn= own as the camera is presently placed on the rig by user with a bubble leve= l=A0(probably to +-0.2 degrees accuracy), but given the camera is so well c= onstrained in relation to=A0the axis of rotation, this pitch=A0will remain = constant (relative to axis of rotation). The same is true=A0with roll value= s. =A0 Typically=A0i would expect my rig to have a roll due to camera sag= of=A0say 0.3 degrees, and pitch is arbitrary due to how the camera is moun= ted (+-0.2 probably). I have found no way of reliably calibrating the lens/= rig and stitching to=A0one=A0I would deem=A0 a 'nice' solution* - one that = demonstrates my known physical constraints.=A0After calibration with 3 high= overlap images (confirmed calibration as difference mask in PShop is total= ly black, FoV correct) I imported the lens coeffs. to PTGui to stitch a ful= l pano. Then fully optimised from PTOptimiser, i find to approx +-0.3 degre= es=A0error from=A045deg increments and pitch and roll are noticably differe= nt (+-0.2 degrees=A0variance across all numbers - this is with no vertical = cp's so all pitches should be relative to axis of rotation, therefore ident= ical).=A0After much struggling, it seems that optimiser is not obtaining th= e correct solution. As such stitching errors occur, and batch stitching is = not proving perfect every time. I have tried forcing yaw -=A0then pitch val= ues, and roll values decrease, but do not remain constant as i would expect= , and errors creep in. =A0 I was wondering if it possible to create a ver= sion of PTOtimiser that optimises using the known=A0physical constraints, t= hat is Yaw is 45..90..135 etc.=A0and=A0all pitches (relative to roation axi= s ) are identical, all roll (relative to rotation axis)=A0are identical. I = think that if I could get a version of PTOtimiser to do this, then using th= ese constraints, and a panorama, it should very easy to reliably calibrate = the lens. Do you understand my problem/rationale of solution? Is this=A0pos= sible=A0to implement PTOptimiser? If so, i would be extremely grateful if a= ny of you could try to adapt PTOptimiser to do this. =A0 =A0 * i would e= xpect (assuming a perfectly level tripod) Yaw 0 pitch 0.2 roll -0.3 Yaw= =A045 pitch 0.2 roll -0.3 Yaw=A090 pitch 0.2 roll -0.3 Yaw=A0135 pitch = 0.2 roll -0.3 Yaw=A0180 pitch 0.2 roll -0.3 etc.... =A0 If the tripod = is set up off level and vertical c/ps set, i would expect a superposition o= f pitch and roll values to reflect the tripod level on of those fixed offse= ts above. In this case your final=A0pitch and roll per image is the combina= tion of the intrisnic head offsets, and then the pitch/yaw required to alig= n the head to the real world. =A0 Any help or advice in regard to this is= highly appreciated, =A0 Yours, =A0 Stuart Milne =0D=0A=0D=0A ```

 [PanoTools-devel] PToptimiser question - batch stitching constraints From: Stuart Milne - 2005-01-05 15:01:23 Attachments: Message as HTML ``` Hi all, =A0 I=A0understand this list=A0was created to=A0improve PTools, = and wondered if you could help - specifically=A0with=A0use of PTOptimiser. = =A0 I have produced a very accurate panoramic head recently (www.360Preci= sion.com), and am having a hell of a time reliably calibrating the=A0lens/r= ig using PTGui/PTmac. Let me explain the situation. =A0 The head should i= s very accurate, rotating the camera about a known point by precisely 45 d= egrees each time (i am confident it is accurate to <0.05deg). Pitch is unkn= own as the camera is presently placed on the rig by user with a bubble leve= l=A0(probably to +-0.2 degrees accuracy), but given the camera is so well c= onstrained in relation to=A0the axis of rotation, this pitch=A0will remain = constant (relative to axis of rotation). The same is true=A0with roll value= s. =A0 Typically=A0i would expect my rig to have a roll due to camera sag= of=A0say 0.3 degrees, and pitch is arbitrary due to how the camera is moun= ted (+-0.2 probably). I have found no way of reliably calibrating the lens/= rig and stitching to=A0one=A0I would deem=A0 a 'nice' solution* - one that = demonstrates my known physical constraints.=A0After calibration with 3 high= overlap images (confirmed calibration as difference mask in PShop is total= ly black, FoV correct) I imported the lens coeffs. to PTGui to stitch a ful= l pano. Then fully optimised from PTOptimiser, i find to approx +-0.3 degre= es=A0error from=A045deg increments and pitch and roll are noticably differe= nt (+-0.2 degrees=A0variance across all numbers - this is with no vertical = cp's so all pitches should be relative to axis of rotation, therefore ident= ical).=A0After much struggling, it seems that optimiser is not obtaining th= e correct solution. As such stitching errors occur, and batch stitching is = not proving perfect every time. I have tried forcing yaw -=A0then pitch val= ues, and roll values decrease, but do not remain constant as i would expect= , and errors creep in. =A0 I was wondering if it possible to create a ver= sion of PTOtimiser that optimises using the known=A0physical constraints, t= hat is Yaw is 45..90..135 etc.=A0and=A0all pitches (relative to roation axi= s ) are identical, all roll (relative to rotation axis)=A0are identical. I = think that if I could get a version of PTOtimiser to do this, then using th= ese constraints, and a panorama, it should very easy to reliably calibrate = the lens. Do you understand my problem/rationale of solution? Is this=A0pos= sible=A0to implement PTOptimiser? If so, i would be extremely grateful if a= ny of you could try to adapt PTOptimiser to do this. =A0 =A0 * i would e= xpect (assuming a perfectly level tripod) Yaw 0 pitch 0.2 roll -0.3 Yaw= =A045 pitch 0.2 roll -0.3 Yaw=A090 pitch 0.2 roll -0.3 Yaw=A0135 pitch = 0.2 roll -0.3 Yaw=A0180 pitch 0.2 roll -0.3 etc.... =A0 If the tripod = is set up off level and vertical c/ps set, i would expect a superposition o= f pitch and roll values to reflect the tripod level on of those fixed offse= ts above. In this case your final=A0pitch and roll per image is the combina= tion of the intrisnic head offsets, and then the pitch/yaw required to alig= n the head to the real world. =A0 Any help or advice in regard to this is= highly appreciated, =A0 Yours, =A0 Stuart Milne =0D=0A=0D=0A ```
 Re: [PanoTools-devel] PToptimiser question - batch stitching constraints From: Jim Watters - 2005-01-05 17:44:01 ```Stuart, I believe the changes you are looking for are already there. Stuart Milne wrote: > [snip] I have produced a very accurate panoramic head recently > (www.360Precision.com ;), and am having a > hell of a time reliably calibrating the lens/rig using PTGui/PTmac. > Let me explain the situation. > > [snip] I was wondering if it possible to create a version of > PTOtimiser that optimises using the known physical constraints, that > is Yaw is 45..90..135 etc. and all pitches (relative to roation axis ) > are identical, all roll (relative to rotation axis) are identical. I > think that if I could get a version of PTOtimiser to do this, then > using these constraints, and a panorama, it should very easy to > reliably calibrate the lens. Do you understand my problem/rationale of > solution? Is this possible to implement PTOptimiser? If so, i would be > extremely grateful if any of you could try to adapt PTOptimiser to do > this. See http://photocreations.ca/panotools On 2003/09/24 I made a modification that allowed the options yaw, pitch, and roll ( y, p, & r ) to be made equal to each other like v, a, b, & c can when optimizing. i f2 r0 p5 y0 v183 a0 b-0.1 c0 mx400 my400 i f2 r=0 p=0 y182 v=0 a=0 b=0 c=0 mx400 my400 This allows to get a general value if you know the camera was level. But each image should be allowed to calculate separately for best results to compensate for little play or movement in pan head and tripod. PTGui interface currently does not have a gui interface to set this type of relationship, but you can edit the script before optimization. Be aware that PTGui uses a phony image 0 in the script. If you optimize the first image (1 in the script) set the p and r of same images to 1 then you can just add the = when modifying the script. Maybe you could test the movement of your set up by securely fastening a mirror on top of the lens and bouncing a laser pointer off it. As you rotate the camera and take pictures it should reflect to the same place each time. > > * i would expect (assuming a perfectly level tripod) > Yaw 0 pitch 0.2 roll -0.3 > Yaw 45 pitch 0.2 roll -0.3 > Yaw 90 pitch 0.2 roll -0.3 > Yaw 135 pitch 0.2 roll -0.3 > Yaw 180 pitch 0.2 roll -0.3 > etc.... > > If the tripod is set up off level and vertical c/ps set, i would > expect a superposition of pitch and roll values to reflect the tripod > level on of those fixed offsets above. In this case your final pitch > and roll per image is the combination of the intrisnic head offsets, > and then the pitch/yaw required to align the head to the real world. > > Any help or advice in regard to this is highly appreciated, > > Yours, > > Stuart Miln Hope this helps. Jim Watters Graphic Software Developer http://photocreations.ca ```
 Re: [PanoTools-devel] PToptimiser question - batch stitching constraints From: Stuart Milne - 2005-01-05 21:53:47 ```After sending a couple of comedy emails off to Jim, I am please to announce that i have cracked it! YEY! Thankyou for your help Jim, I am sorry for missing it on your update page, in hindisght it was there clear as day. Forcing all Pitch/Roll together has not really affected c/p distance, but I think has improved abc calibration. We shall be working on this more, to try to get this truly hammered down - we are so frustratingly close. Thanks again Jim, and all you guys/gals for your efforts. Stuart ----- Original Message ----- From: "Jim Watters" To: Sent: Wednesday, January 05, 2005 5:44 PM Subject: Re: [PanoTools-devel] PToptimiser question - batch stitching constraints > Stuart, > > I believe the changes you are looking for are already there. > > > Stuart Milne wrote: > >> [snip] I have produced a very accurate panoramic head recently >> (www.360Precision.com ;), and am having a >> hell of a time reliably calibrating the lens/rig using PTGui/PTmac. Let >> me explain the situation. >> [snip] I was wondering if it possible to create a version of PTOtimiser >> that optimises using the known physical constraints, that is Yaw is >> 45..90..135 etc. and all pitches (relative to roation axis ) are >> identical, all roll (relative to rotation axis) are identical. I think >> that if I could get a version of PTOtimiser to do this, then using these >> constraints, and a panorama, it should very easy to reliably calibrate >> the lens. Do you understand my problem/rationale of solution? Is this >> possible to implement PTOptimiser? If so, i would be extremely grateful >> if any of you could try to adapt PTOptimiser to do this. > > See http://photocreations.ca/panotools On 2003/09/24 I made a > modification that allowed the options yaw, pitch, and roll ( y, p, & r ) > to be made equal to each other like v, a, b, & c can when optimizing. > > i f2 r0 p5 y0 v183 a0 b-0.1 c0 mx400 my400 > i f2 r=0 p=0 y182 v=0 a=0 b=0 c=0 mx400 my400 > > This allows to get a general value if you know the camera was level. > But each image should be allowed to calculate separately for best > results to compensate for little play or movement in pan head and > tripod. > > PTGui interface currently does not have a gui interface to set this type > of relationship, but you can edit the script before optimization. Be > aware that PTGui uses a phony image 0 in the script. If you optimize the > first image (1 in the script) set the p and r of same images to 1 then you > can just add the = when modifying the script. > > Maybe you could test the movement of your set up by securely fastening a > mirror on top of the lens and bouncing a laser pointer off it. As you > rotate the camera and take pictures it should reflect to the same place > each time. > >> * i would expect (assuming a perfectly level tripod) >> Yaw 0 pitch 0.2 roll -0.3 >> Yaw 45 pitch 0.2 roll -0.3 >> Yaw 90 pitch 0.2 roll -0.3 >> Yaw 135 pitch 0.2 roll -0.3 >> Yaw 180 pitch 0.2 roll -0.3 >> etc.... >> If the tripod is set up off level and vertical c/ps set, i would expect >> a superposition of pitch and roll values to reflect the tripod level on >> of those fixed offsets above. In this case your final pitch and roll per >> image is the combination of the intrisnic head offsets, and then the >> pitch/yaw required to align the head to the real world. >> Any help or advice in regard to this is highly appreciated, >> Yours, >> Stuart Miln > > > Hope this helps. > > Jim Watters > > Graphic Software Developer > http://photocreations.ca > > > > ------------------------------------------------------- > The SF.Net email is sponsored by: Beat the post-holiday blues > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt > _______________________________________________ > PanoTools-devel mailing list > PanoTools-devel@... > https://lists.sourceforge.net/lists/listinfo/panotools-devel > ```