# NavList:

## A Community Devoted to the Preservation and Practice of Celestial Navigation and Other Methods of Traditional Wayfinding

**Re: camera sextant?**

**From:**George Huxtable

**Date:**2010 Jul 6, 21:56 +0100

Marcel wrote- | Greg's calibrations are based on calculated positions of the sun above | the horizon. The procedure he uses for calibration would lead very | likely to larger errors at small angles (refraction). This is a | drawback of this calibration technique. It's for this reason that he | didn't calibrate his lenses for small angles but only for a "useful" | pixel/angle range. Depending on the angle to measure he selects the | appropriate lens. It doesn't really make sense to extrapolate his | calibration data to pixel/angle ranges which haven't been considered | when performing the calibration. I don't see why Greg should have stopped his calibrations of the 50mm lens at such a large angle as 12.5�, then. He could have gone quite a lot less before refraction became a serious problem. Even better, though it would probably call for a second observer, would be to calibrate by taking simultaneous photos and sextant observations, in which case refraction wouldn't need to be predicted, and the job could be done right down to zero. The consequence of the restricted calibration range is that the camera can only be used for observations that are made spanning across more than half the array. Marcel added- | The calibration procedure adopted in | SAMT doesn't have this drawback. With SAMT a lens can be calibrated | for all of its pixel/angle range. Yes, but the difficulty is the small size of the yardstick being used, the diameter of the Sun. I would liken it to measuring up a room for a fitted carpet, by stepping a penny across the floor. It depends, crucially, on that Sun diameter. Not just the scatter in measuring it, which shows up as scatter in Marcel's calculations of scale-factor in his "cal fig" plot. But also in systematic error, if there happens to be any effect of over-exposure on the apparent size of the Sun disc, the camera's equivalent to "irradiation". How confident can Marcel be that any such effect is negligible? What evidence can he offer to base that on? For the uninitiated, SAMT is Marcel's spreadsheet procedure, "Tool for measuring spherical angles with a digital camera", to be found attached to one of his postings of 5 July, as _SAMT 1.1.xml . He concluded- | Regarding again the conversion function: After some additional | thoughts I gained the impression that the transformation of the second | order polynomial calibration function into the conversion function is | likely to result in the conversion function also to be a second order | polynomial. I'm however not in a position to prove this | mathematically. If I understand his meaning of "calibration function" and "conversion function" correctly, such proof will be impossible, because it just isn't so. One is the slope of the other. =================== Now let me go back to an earlier posting today, from Marcel, in which he asked- "Could the reason for this confusion be that in one case we have pixel POSITIONS and in the other pixel RANGES and as a consequence of this also the meaning of the origin (0,0)?" Yes, that's part of it. The three of us have approached this problem from somewhat different directions and some confusion has resulted. I have tried to define the terms I have used but may not have succeeded. Let me try again, from the start, and see if we can agree. If we take axial symmetry for granted, then it seems simplest to define everything in terms of that central axis, and a radial line passing through the centre of the array. The incoming angle A, is measured from that axis, and the corresponding pixel count Px (in the x direction), is measured from the centre of the array, positive or negative along the x axis. If, in some implementation, pixels are instead counted from one edge of the array, a suitable offset is to be subtracted from that count. That relationship, Px = f(A) defines everything we need to know about the distortion of the system. That seems to be what Marcel refers to as the "conversion function", and I'll go along with that name. That is the function that has to be antisymmetric about the zero point, so that f(-A) = -f(A) : because of which, if it's a polynomial in A, it can not contain any constant term or any terms in even powers of A. So it can have only terms in A, A cubed, A to the 5th power, and so on. Another possibiliity is a tan function, which is also antisymmetric, passing through the origin at (0,0). This function then has a slope, dPx / dA, which is simply the reciprocal of what Marcel has referred to as the "calibration function", which he measures by putting a known Sun diameter at varying offsets from the centre, and measuring the ensuing change in Px across it. If we know the conversion function, we simply differentiate it to get the slope. If we know the slope, we simply integrate it to get the conversion function, knowing that the conversion function has to pass through the origin. And there's another function, with the same dimensionality as that slope, but different in number, defined by Px/A. Let me name this the "span slope", because it's the slope of a line joining the origin to a point on the curve of the conversion function. When Greg makes his calibration observations, centred on the origin, he observes an angle 2A, which spans between -A and +A, and a pixel difference of 2Px, between -Px and +Px. So, if we simply halve the two quantities he observes, we can immediately plot a point on the graph of Px as a function of A. (we also find its span slope Px/A, but I would not propose to make much use of that). To me, that appears to be a precise procedure for plotting the conversion function. I expect it would be rather immune to slight inexactness in centring of the image on the array. I would supplement Greg's observations by measuring such spans down to much smaller angles, and, of course, add a (0,0) point at the origin. This allows us to obtain a series of points along that conversion curve, in the range between the origin and some maximum angle near the edge of the array (because that procedure only gives one side; not the complete curve about the origin). The next step is to get some sort of best-fit of an analytic function to it; in terms of either a polynomial ot tan function or some combination of the two. Having got that fit, that allows us to correct an observed value of Px to obtain the corresponding angle A, so we can obtain an angular span between two values of Px, whether or not they may be symmetrical about the centre. ================= Marcel wrote- "Calibration function: Here we look at the scale (moa per pixel) as a function of pixel *positions*. This function shows to be about symmetrical about the centre of the picture at x about 1940 pixel. These measurements can't reasonably be approximated better than with a second order polynomial." Exactly as I would expect. We agree. But then he continues- "If for this function the scale would be zero at zero pixel then something would definitely be wrong with the lens. Your reflections can't be valid for this function." Something certainly would be wrong. That is NOT what I predicted! If the conversion function happened to be- Px = K1A + K3A^3, which is a plausible choice, then the function that represents its slope would be its differential, K1 + 3*K3A^2, as I wrote. Around the origin, where the angle A tends to zero, this has a constant value of K1 pixels per angle, not zero. It's the reciprocal of the calibration function used by Marcel, which at small angles turns out to peak, on his "cal fig" plot, at .09775 moa per pixel.. Similarly, if we fitted a conversion function of Px = K Tan A, then the slope would vary as K / (cosA)^2. At small values of A the slope would be constant with a value of A. This asymptotic trend of the conversion function to constant slope, near the origin, is shown in the extension curves I have added to Greg's calibration plots, in which it shows up as the vertical way in which that line approaches the centre-line of the array. That reflects the unusual way those axes have been chosen (by Greg). The value, at that point, should correspond with the peak value of the curve in the "cal fig" graph in the spreadsheet, which needs to be twisted throgh 90� to show the comparison . Conversion function: Here we look at integrated angles as a function of pixel *ranges* derived from the calibration function around the centre at about x=1940 pixels. It is correct that for zero pixel range the angle has obviously also to be zero. However, in my opinion, the symmetry relative to this origin (0,0) doesn't apply the way how you imagine it since we are looking at pixel ranges and not at pixel positions. Greg's photos indicate that there could possibly be higher polynomial terms involved in his calibration derived directly from sun-horizon observations (but possibly containing additional errors from refraction). In the case of SAMT the conversion function is derived from the calibration function. The calibration function can just about be approximated with a second order polynomial. In this case I hesitate to use higher polynomial terms for the conversion function than what was used for the calibration function from where it was derived from. Marcel, for the observations shown in his SAMT spreadsheet, uses an optical system with only a small field of view, of little more than 3� or so either side of the central axis. In that case, the deviations from a linear conversion function are small, and so the difference of the resulting calibration function from a constant value is also small and nearly, but not quite, swamped by statistical errors. So I would be very surprised if it was possible to discern any contribution from higher polynomial terms, in that setup. George contact George Huxtable, at george@hux.me.uk or at +44 1865 820222 (from UK, 01865 820222) or at 1 Sandy Lane, Southmoor, Abingdon, Oxon OX13 5HX, UK.