Motorized panoramic camera mount – calibration and image capture

: Panoramic cameras have become popular because they provide impressive and immerse experience of the scene and allow several interesting applications. Among the large variation of panoramic camera systems, we have focused on concentric panoramic imaging with a frame camera. In order to establish the concentric image acquisition, the camera mount must be calibrated so that the projection centre of the camera is located at the rotation centre of the mount. For this purpose, we developed a novel mount calibration method, which allows an accurate recovery of the rotation centre in two image acquisition steps. In addition, we have built a motorized camera mount that can self-calibrate the camera position within the mount, given the previously solved rotation centre, and then be used to automatically capture panoramic images. Hence, we have streamlined the previously laborious manual phase of iterative position calibration, but also automated the capturing of panoramic images. For validation purposes, reference results from a conventional manual mount are provided. In the case of non-motorized mount, the average distance between the projection centre of the camera and the rotation centre of the mount was 0.253 mm and the standard deviation was 0.161 mm. For the motorized mount, the corresponding average distance and standard deviation were 0.549 mm and 0.404 mm, respectively.


INTRODUCTION
Panoramic photographs have been created almost as early as there have been cameras.Panoramic images can provide impressive and immerse experience of the scene.Recently panoramic images have attracted significant amount of attention.Consumer-grade cameras nowadays have easy interfaces for taking and creating panoramic images.Google Street View has proven how effective panoramic images can be for virtual navigation.In addition, the development of virtual glasses has created a need and interest to collect panoramic images.
There are various methods how to create panoramic images.It is even possible to acquire stereo-panoramic images (e.g., Huang and Hung, 1997).In fixed panoramic systems no moving parts are needed.Such systems typically include several cameras or images are taken through mirrors with a single sensor.Multicamera systems are typically designed to have a diverging camera arrangement which does not provide the common projection centre to sub-images.An alternative is to arrange cameras in such a way that they share the common perspective centre.This can be done by using mirror pyramids.Cameras can be placed in such a way that their virtual projection centres behind the mirrors coincide (Nalwa, 1996;Tan et al., 2004).In this case, sub-images can safely be merged into a single panoramic image mosaic, also for measuring purposes.Fixed systems can alternatively rely on a single camera sensor, if a curved mirror is placed in the front of the camera.Typical implementations utilize convex mirrors that provide 360° horizontal viewing angle (e.g., Gluckman et al. 1998;Chen et al., 2009).*

Corresponding author
Panoramic images can be captured also with a rotating frame or a linear array camera.Typically, these systems have only one camera sensor.For visualization purposes, any camera mount or even a free-hand rotation is sufficient, however, resulting in separate projection centres of all sub-images.If final panoramic images are applied for measurements (Fangi and Nardinocchi, 2013), the concentric image acquisition is desired (Haggrén et al., 1998).If every sub-image has the same projection centre, there are no perspective differences between sub-images.The presence of perspective differences can make seamless image stitching more difficult or impossible.However, if objects are far away from the camera, small deviations from the ideal concentric case cause very small errors at the image plane (Kauhanen and Rönnholm, 2012).On the other hand, by ensuring the concentric data acquisition the best accuracy for image measurements can be achieved.
Both fixed and rotating panoramic cameras need to be calibrated.In the case of non-concentric systems, measurements should be done only using original sub-images which means their interior and exterior orientations need to be solved.Pre-knowledge of allowed camera trajectories because of the mount can be added as constraints in bundle adjustment (Heikkilä, 2005).The concentric multi-camera systems can be calibrated, in which case all relative orientations of sub-images are directly known if the directions of optical axes of sub-images can be detected.In the case of mirror-based systems, the effect of the mirror should be included in the camera calibration.Rotating concentric systems require both the known interior and relative orientations of the camera and, additionally, the accurate placing of camera in the mount in order to ensure the rotation centre and the projection centre to coincide.Therefore, also the camera mount should be calibrated.Schneider and Maas (2003) solved the calibration of a linear array panoramic camera with a point-based calibration frame whereas Parian and Gruen (2005) solved the corresponding calibration with 3D straight lines.Kukko (2004) presented an interactive method how to find the correct camera placement of the rotating panoramic camera mount in order to achieve the concentric image acquisition.The mount had the possibility to adjust the camera location within the system (Haggren et al., 2004).The calibration method utilized multi-distance calibration targets.The general idea was to place small targets to at least two different distances from the camera so that the nearest target occluded the more distant target.The camera was then manually rotated around all axes separately and if the targets did not move in relation to each other on the image plane, the camera projection centre was properly placed to the rotation axes crossing of the panoramic mount.This was an iterative process which made the process very time consuming.The accuracy of the camera placement was reported to be 1 mm.
The aim of our research is to develop a method for solving the amounts and directions of necessary camera shifts to calibrate a panoramic frame camera mount and therefore ensure the concentric image capturing.In contrast to the laborious iterative camera adjustment process of the method, such as in Kukko (2004) and in Barazzetti et al. (2013), we want to find the correct shifts of the camera directly.In addition, we design and build a motorized panoramic frame camera system, which allows automatized panoramic image acquisition.Our system can also change the camera location within the mount allowing the computer-aided calibration.For validation purposes, we test our calibration method also with an older non-motorized panoramic mount.
The paper is organized as follows.The materials and methods are described in Section 2 including the description of the old nonmotorized panoramic camera mount and the novel motorized panoramic camera mount, as well as the proposed calibration process.The results have been collected in Section 3.After the discussion in Section 4 we summarize the conclusions in Section 5.

The reference mount and the calibration target
In order to compare the accuracy of our motorized platform, we gathered reference data from a non-motorized, manually operable panoramic mount (Figure 1) developed by Pöntinen (2004).The reference mount allows similar spherical image acquisition through adjustments for the camera pose, as our motorized version.For operational convenience, the reference mount is made from aluminium and has a very robust structure.Figure 2 illustrates available directions for moving the camera within the mount.Moving the camera in the X and Z directions change the location of the camera in the horizontal plane that is needed for adjusting the projection centre at the vertical rotation axis of the mount.The Y direction allows moving of the camera upwards and downwards, which is needed to place the projection centre at the horizontal rotation axis.All the shifts of the camera are done manually using a screwdriver.If it is known how much the camera needs to be moved, the amount of shifts can be measured with a caliper.In the background of Figure 1, there is the calibration rig that was compatible with Australis software and was utilized for the calibration.
Figure 2. The correction directions of the mount calibration.

The novel motorized camera mount
The motorized panoramic mount built in this project aimed to automate metric image capture and calibration tasks involved in photogrammetric use of panoramic imaging.Commercially available panoramic mounts already offer highly automated image capture but usually lack the accurate calibration capabilities that are required in photogrammetric applications.Concentricity calibration requires the platform to have means to translate the camera in three directions perpendicular to each other.The correctable axes of the motorized mount were selected similarly than with the non-motorized system (Figure 2).The Z axis is pointing to the same direction than the optical axis of the camera, the X axis is pointing to the right as seen from inside of the camera and the Y axis is pointing up.In practice, the axes may not be exactly perpendicular to each other because of the mount structure, which potentially can cause some errors in the concentricity calibration.The hardware consists of six motors out of which three are responsible for X, Y and Z translational movements required for the concentric calibration of the optical system and other three are needed to rotate the platform over yaw, pitch and roll axes (Figure 3).The actual implementation can be seen in Figure 4.The IMU can be used to find out the orientation and movement of the mount.Originally, that information is an input to the Arduino-based control circuit that can calculate in which directions the brushless motors need to be driven in order to keep the platform level and pointing the right direction.Brushless motors are preferred instead of servomotors because for the stabilization of the mount, a very fast operation is needed and brushless motors are able to provide that while also being mechanically less complex than servomotors.It should be noted, however, that brushless motors allow no positional feedback and thus the orientation of the platform relies solely on the IMU data.
For terrestrial applications the stabilization is not critical because the platform will be mounted on a stable tripod or clamped to some solid surface.The brushless gimbal system was chosen to make the mount to be able to also perform mobile tasks such as mounting on a rover or UAV in the future.However, the Arduino control circuit also accepts servo signal inputs to control the rotational motors.This is intended to provide means to aim the camera in UAV applications from the ground control station.In this application, we use the controls to turn the camera around yaw and pitch axes to produce panoramic images.The roll rotation is allowed to change to keep the camera level according to the IMU sensor readings.In practice, because the mount is used on a relatively level surface, the variation of the mount roll angle is small.
For the automatic controlling of the mount, we have attached an Arduino Uno control circuit (Figure 5) which we use to generate three separate signals to the motors and one signal to trigger the camera.One servo signal is fed into the brushless gimbal control circuit to control the yaw axis rotation and the other servo signal controls the pitch axis.In addition we also use a third servo signal to set the roll angle but it is kept fixed resulting in self levelling mount.The camera trigger signal is fed directly into the trigger port of the camera if the camera is compatible with the 5V trigger signal.Normally commercial digital cameras offer triggering by shorting the trigger signal pin to ground and thus we had to put a transistor into the 5V Arduino signal path and use the transistor as a switch to trigger the camera.
Figure 5.The Arduino control circuit is operating the mount automatically.Smaller blue circuit board is the MPU6050 IMU.
The Arduino Uno control circuit is programmed to provide a suitable horizontal and vertical overlap between images depending on the image capture requirements.Generally locations where there are high amount of details to aid the image stitching, less overlap is required.The platform rotation is stopped for each image capture to provide the highest possible image quality.Currently we have programmed the platform to take an image every six seconds, but it would also be possible to improve the system by reading accelerometer data from the IMU and take sub-images as soon as the mount has stabilized from the rotational movement.This would accelerate the image capture without reducing the image quality.
For the concentricity calibration, we need three motorized translational axes.For the X and Z directions this is done by modifying a camera equipment macro slide by attaching a ST-PM35-15-11C stepper motor to a M4-0.7 thread rod which connects to a nut attached to the moving sled part of the macro slide.Each stepper motor is controlled by the Sparkfun Easy Stepper control board which is controlled by the Arduino Uno control board.That way we can control the movement of the sled by spinning the stepper motor by a certain amount of steps.Each step of the motor corresponds to approximately 1.8 µm movement of the sled.For the Y direction translation, two slides are required making synchronized operation essential.The hardware for this is the same as with X and Z axes but two motors need to be spun at the same time by the same amount of steps to ensure the Y translation stays level and does not jerk.

System calibration algorithm
The concentricity calibration is based on observations how the projection centres of sub-images move when the mount is rotated.In the case of the ideal concentric data acquisition, the projection centres of sub-images do not move.Our method solves the concentricity calibration using a numerical method where the eccentricity of the camera rotation is calculated and as a result we get X, Y and Z shifts for the correction of the camera location within the mount.Applying corrections to the non-motorized mount requires manual shifts of the camera.The motorized mount can automatically drive the camera to the crossing of the rotational axes as shown in Figure 3.
As for preliminary measures, the (physical) camera is calibrated for interior orientation including lens distortions.This is done using Australis and calibration target (Figure 1), which also yields the 3D (homogenous) point coordinates of the calibration rig {xi}.For convenience, we choose the global coordinates so that the camera Ci is pointing towards x-axis.The problem itself is two-fold.First, we want to bring the centre of rotation of the platform Crot into the same coordinate system with the cameras, and second, we want to minimize the distance between these.In order to determine Crot , we need to rotate the camera while it is displaced.
The camera, attached on the panoramic mount, is rotated on a circular trajectory around the yaw axis with a constant radius R=√ + .The radius R is chosen large to cause highly eccentric rotation.The camera orientation with respect to the mount is kept fixed, at first.At least three photos of the test field are taken while rotating the camera, a constraint explained later, resulting into camera positions that we index with i.Then for each position i, the camera rotation matrix Ri and translation vector Ti are computed from known 3D and image points {ui} (see e.g.Quan and Lan, 1999).Therefore, at the beginning, we also have the camera projection matrices (1) for ideal points and an optical axis oi for each (virtual) camera.In the global coordinates, the camera locations are written as where R -1 =R T by orthogonality.The practical operation is mainly limited due to the field of view (FoV) of the camera, because the test field must be visible in each of these photos for resectioning purposes.This culminates into that the baseline between camera positions in our setup is 4 cm at maximum, with concurrent positions being about 0.5 cm apart.
Using the camera locations Ci on the XZ-plane and the a-priori knowledge that they lie on the perimeter of a circle, we perform a least-squares circular fit to find the centre of the circle, which is the centre of rotation of the platform Crot.Formally, we minimize where the distance Here the radius R and the centre of the circle Crot= (Xr,Zr) are the quantities obtained through iteration.The previously stated requirement of at least three photos, N=3, is a practical minimum to obtain a solution for the circular fit.Redundancy in form of more images is used to avoid multiple minima (see Chernov and Lesort, 2005), but also for error determination.
The distance between the projection centre of the cameras Ci and the centre of rotation Crot now has to be separated into orthogonal components in order to recover the underlying X and Zdirectional displacements.This is conveniently done in two steps.First, by computing the distance of the point Crot on the X-Z plane to the line, ai X + biZ + ci = 0, drawn by the optical axis of each of the camera positions i, which is the X-directional displacement.Second, by minimizing the distance of the point Crot on the same plane to the line drawn perpendicularly to the optical axis of each of the camera positions i, which is the Z-directional displacement.We write For both sets of displacement, we compute the averages X = avg(Xi) and Z = avg(Zi), which are the final results and tell us how the camera must be translated in order to have its centre of projection on the top of the rotation centre of the mount.Now only Y displacement remains, which is recovered in a similar manner by using the rotation over the pitch axis.Note that while doing this, we obtain the Z shift again, but this time it ought to be close to zero.
The process can be streamlined into one step by rotating multiple angles during the image capture phase.Then the recovery of the displacements in full 3D can be done from a single set of images.However, we experienced that in this case, mechanical reasons degrade the robustness of the solution.In the future, we plan to replace the calibration rig with feature points obtained from arbitrary environments, so that the automated version of the method is as self-sustained as possible.

RESULTS
At first, we solved planimetric shifts along the X and Z axes of the camera within the mount.For that we rotated the camera around the yaw axis of the mount.The exterior orientations of sub-images were solved using the calibration rig.The result can be seen in Figures 6 and 7, in which blue filled circles present the locations of the projection centres of images.As can be seen, projection centres form a circular path.The second step is illustrated in Figures 6 and 7, in which we draw a line from each projection centre facing the direction of the optical axis (blue arrows) and other line perpendicular to that and facing the direction obtained from camera orientation roll parameter (red lines).Then for each of those lines, a line is drawn from the yaw axis, which was obtained as the centre point of the circle drawn through projection centre coordinates, perpendicularly to each line drawn in the previous step.These are illustrated by thin black lines.This gives us two sets of resections.These resections are marked in Figures 6 and 7 as blue and red circles.The translation needed to drive the camera into the yaw axis in the X direction (ΔX in Figure 3) is the length of the blue arrows.In practice they are not all the same length and thus an average length is used.
Similarly the Z direction translation (ΔZ in Figure 3) can be obtained as the average length of the red lines.This process was repeated for both the non-motorized and motorized mounts.After this step the concentricity calibration is complete.Figure 8 shows that the lines drawn from each camera do not intersect precisely at one point which results in error in the calibration while the motorized mount (Figure 9) results in more precise Y direction translational movements leading to a more precise intersection.The size of circles in Figures 10 and 11 depend on the initial position of the camera with respect to the rotation centre of the mount.In Table 1, the shift values for each three correction directions are presented.The non-motorized and motorized mounts were corrected according to these values.The nonmotorized mount required manual moving of the camera, but the motorized mount used motors to apply shifts.1.The correction shifts of the camera found by the calibration algorithm.The X and Z shifts move the projection centre of the camera at the top of the vertical rotation axis and the Y shift aligns it with the horizontal rotation axis.
To ensure that the motorized mount can reliably and consistently perform given shifts, a test was conducted where the calibration sled was moved in 1000 step increments for a total of 27 times.The total displacement resulted into a 48.6899 mm movement of the sled.The displacement of the sled was measured with a digital caliper after each 1000 steps.Data is represented in Figure 12.The average movement of the sled was 1.8033 mm for every 1000 steps.Standard deviation of movements was 0.0430 mm.The average movement of 1.8 µm per step was used when translating the camera into correct position acquired from the calibration algorithm.
Figure 12.The repeatability test of the camera sled.The camera was moved 27 times for 1000 motor steps each resulting in an average movement of 1.8033 mm.
In our calibration method, we performed the shifts of the camera only once according to computed optimal shifting values.After the correction we repeated the calibration measurements in order to verify if our correction had succeeded.The yellow dots in Figures 10 and 11 are the projection centres of sub-images after the calibration.Expectedly, they are now very close to each other.We computed the mass centre from all sub-image locations.In table 2, we present the average distances between the mass centre and all sub-images for both mounts and corresponding standard deviations.In addition, after the system calibration we captured an example of a panoramic image which is shown in Figure 13.  2. Average distances and standard deviations of the projection centres from the mass centre that was calculated from all available camera centres after the mounts were calibrated.

DISCUSSION
Calibrating the camera and the non-motorized mount is quite time-consuming process leading to the reduced flexibility of the system.The new calibrations are needed if aperture, zoom or focus of the camera is changed.With the motorized mount it is possible to quickly calibrate the concentricity of the system, so changing camera settings or even changing the camera becomes feasible.For this we need to be able to find out the interior orientation of the camera on site and then run our concentricity calibration algorithm for driving the camera into the correct position in the panoramic mount.It is possible to use a similar calibration rig than we used for the laboratory calibration of our system but also natural targets such as furniture, walls, ceiling, floor, and doors could be used for the in-situ calibration.There are also many commercial panoramic mounts (for example Gigapan Epic series, www.gigapan.com)that can achieve the same level of automatization in image capture than our prototype but they lack the precise automated concentricity calibration possibilities.
The results in Table 2 indicate that the final calibration accuracy of the motorized mount was slightly worse than of the nonmotorized mount even if Figure 8 reveals that the non-motorized mount has more misalignment between rotation axes.The reason for this is most likely dependent on two issues.Firstly, the physical structure of the motorized mount is not as rigid as of the non-motorized mount.Secondly, the time interval of image capture was set to a constant.Therefore, the system did not check if the movement of the mount was stabilized for sure.In the future, we will examine how to strengthen the mount structure and optimize the image acquisition algorithm more intelligent.
The time it takes to capture a full spherical panorama with the non-motorized mount using normal 45° lens with 50% overlap, for example, can take up to an hour if lighting conditions require the use of long exposure time in the order of seconds.In that kind of situations the platform needs to be stable and free of vibrations.Thus in manual operation, a remote trigger needs to be used because the operator is not allowed to touch the mount when the exposure is about to start.This increases significantly the time required to take the photographs.In the motorized version, the image acquisition is automated making it fast.In addition, we could read the accelerations of the platform from IMU and start the exposure as soon as the platform is deemed stable.We could also start to rotate to the next orientation as soon as the image has been captured.
When taking hundreds of images per panoramic station this saves a large amount of time.These extensions, however, have not yet been implemented in our system.
In addition to improved speed of operation and versatility, our motorized mount also offers greatly improved accuracy of translational calibration movements.As can be seen from Figures 8 and 9, there is a clear improvement in the intersection accuracy of the Y direction calibration.This is caused by much better repeatability of the calibration movements offered by the stepper motor drive approach.In practice this means that once the mechanical robustness of the motorized mount has been improved, the system offers not only better speed of operation and versatility of quickly changing the camera system, but also better geometrical accuracy than conventional manually calibrated panoramic mounts.We discuss the eccentricity error more elaborately in our previous publication (Kauhanen and Rönnholm, 2012).In the example case of this paper, stitching of images succeeded without visible discontinuities (Figure 13).
In many photogrammetric applications there is a need to cover the area being measured from many different viewpoints.Using the non-motorized panoramic camera this requires careful planning because the amount of panoramic stations one can produce in a given time is limited.Our prototype offers stabilized image capture while moving so if the platform was mounted on a rover for example, the camera could be used to aid the system to navigate to a proper place to take the panoramic image while recording a video footage which could be used for SFM reconstruction, for example.That way the same system would produce mobile mapping data as well as high resolution panoramic images coupled with the versatility to change the optical configuration of the system thanks to field calibration possibilities offered by the motorized concentricity calibration.

CONCLUSIONS
We introduced a novel calibration method to position the centre of projection of the camera at the rotation centre of a panoramic camera mount.In addition, we designed and built a motorized camera mount that allows both the use of the previous position calibration method, and an automatic image acquisition.Our method can be applied to calibrate any panoramic mount having motorized or manual adjustment for camera placement provided the mount has enough space to move the camera in all XYZ directions in order of couple of centimetres from the correct projection centre placement.The mount calibration process included the interior orientation of the camera, solving locations of projection centres of sub-images after rotating camera, computing of necessary shifts of the camera within the mount, applying the shifts, and verification of concentric imaging after the calibration.Our method corrects the camera positioning in two image acquisition steps and there is no need to have further iterations.The calibration process was successfully applied to both non-motorized and motorized camera mounts.
After the calibration, we compared the distances from all projection centres to the mass centre of them.In the case of nonmotorized mount, the average distance was 0.253 mm and the standard deviation was 0.161 mm.For the motorized mount the corresponding average distance and standard deviation were 0.549 mm and 0.404 mm, respectively.Slightly worse results of the motorized mount can be explained with less robust structure if compared with the non-motorized mount.
Our prototype of the motorized panoramic mount included three motors for adjusting the internal camera location.Another three motors were reserved for turning the camera around three axes with yaw, pitch and roll angles.However, we applied the roll rotation only to keep the horizon levelled.In addition, the system was able to trigger the camera.All the automation was handled by the programmable Arduino Uno control circuit.In practice, the mount was automatically able to turn the camera horizontally and vertically and capture sub-images with the given time interval.
Future work includes replacing the calibration rig with a featurebased calibration procedure that can be used in arbitrary environments.

Figure 1 .
Figure 1.The non-motorized reference platform and the calibration rig.

Figure 3 .
Figure 3.The structural image of the motorized panoramic mount.

Figure 4 .
Figure 4.The motorized camera mount.The hardware is based on modified DYS Eagle Eye brushless gimbal.Brushless gimbals are typically used in Unmanned Aerial Vehicle (UAV) industry to stabilize the image capture.Eagle Eye gimbal features three brushless motors to stabilize all three rotation axes (yaw, pitch, roll) and an MPU6050 Inertial Measurement Unit (IMU).The IMU can be used to find out the orientation and movement of the mount.Originally, that information is an input to the Arduino-based control circuit that can calculate in which directions the brushless motors need to be driven in order to keep the platform level and pointing the right direction.Brushless motors are preferred instead of servomotors because for the stabilization of the mount, a very fast operation is needed and brushless motors are able to provide that while also being mechanically less complex than servomotors.It should be noted, however, that brushless motors allow no positional feedback and thus the orientation of the platform relies solely on the IMU data.

Figure 6 .
Figure 6.Geometry to determine the X and Z translations for the concentric imaging in the case of the non-motorized mount.

Figure 7 .
Figure 7. Geometry to determine the X and Z translations for the concentric imaging in the case of the motorized platform.

Figures 8
Figures8 and 9show geometry to determine the Y direction translation needed to move the camera projection centre into pitch axis.For the Y direction shift, only the radius of the circle fitted to the projection centre coordinates needs to be considered because the first step of the calibration has already solved the Z direction movement.Thus lines drawn from each projection centre facing down should all resect at one point which is also the centre of the circle fitted to projection centres of the cameras and each line should have the same length than the radius of the fitted circle.

Figure 8 .
Figure 8. Geometry to determine the Y translation for the concentric imaging in the case of the non-motorized mount.

Figure 9 .
Figure 9. Geometry to determine the Y translation for the concentric imaging in the case of the motorized mount.Once we had properly placed the camera in the panoramic mount, we could test for the accuracy of the calibration by photographing the calibration rig again while rotating the camera in the yaw and pitch directions.All the projection centres should locate at the same place if the ideal calibration is achieved.In practice there is always some residual error.The change of the projection centre movements during the rotations are illustrated in Figures 10 and 11 (right images), in which red points are the projection centres due to pitch rotations and white points presents the projection centres due to yaw rotations before the calibration.The left images in Figures 10 and Figure 11 highlight how the projection centres move along the arc of circles.After the calibration the projection centres of rotated sub-images (yellow points) are close to each other's without any regular pattern, as expected.

Figure 10 .
Figure 10.The calibration of the non-motorized camera mount.The sub-image locations before the mount calibration are presented in the left image.In the right the image, yellow dots represent the sub-image locations after the mount calibration.

Figure 11 .
Figure 11.The calibration of the motorized camera mount.The sub-image locations before the mount calibration are presented in the left image.In the right image, the yellow dots represent the sub-image locations after the mount calibration.

Figure 13 .
Figure 13.Panoramic image acquired with the motorized mount after the mount calibration.