Below is a list of changes and improvements made to sba in reverse chronological order:

  • August 31, 2009: sba version 1.6 released
    • CAUTION FOR PREVIOUS VERSIONS USERS: A new argument (ncon, the points equivalent of mcon), has been added to all driver routines:
      Version 1.6 has added support for fixed points (e.g., ground control points) in the adjustment. This feature provides the option of employing points whose structure parameters are accurately known and, therefore, should remain unchanged. Such points should be specified as the first ncon points of a reconstruction and their structure derivatives are treated as zeros, i.e. all B_ij with i < ncon are assumed to be zero. On the other hand, the image projections of such points should participate in the estimation of the motion parameters pertaining to their respective images. Note that this change has also affected the matlab interface which now expects the ncon argument.
      A zero value for ncon indicates that the parameters of all points should be refined, as was the case in previous versions.
    • Fixed a couple of issues with memory alignment on 64 bit systems. Thanks to Heiko Hirschmueller for pinpointing the errors and to Sandro Esquivel for testing the modified code.
    • Removed some unnecessary memory copying from most linear solvers.
    • Implemented a local rotation representation for the demo program eucsbademo:
      Given an initial rotation estimate R0, a refined rotation R can be factorized as R=Rs*R0, where Rs is a small rotation to be estimated. This approach makes less likely the previously occasional problem of quaternions becoming non-unit during the minimization. See also P.F. McLauchlan. Gauge Independence in Optimization Algorithms for 3D Vision. In Proc. Int'l Workshop on Vision Algorithms: Theory and Practice. LNCS, vol. 1883. Springer-Verlag, London, pp. 183-199, 2000.. The local rotation representation was also implemented in the matlab demo program.
    • Added to eucsbademo the option of refining the camera distortion parameters in addition to the camera intrinsics and motions.
    • CAUTION FOR PREVIOUS VERSIONS USERS: Two more arguments were added to the user-supplied projection and Jacobian functions for the matlab MEX interface. These arguments are the indices of the camera and point whose parameters are being passed. Both indices are zero based!
    • Generated optimized user-supplied projection and Jacobian functions for the matlab demo program.
    • Made a few minor other changes.

  • July 04, 2008: sba version 1.5 released
    • CAUTION FOR PREVIOUS VERSIONS USERS: A new argument (covx) has been added to all driver routines:
      Version 1.5 has added support for the covariance matrices of the image projections. This feature provides the option of weighting the reprojection errors with the inverses of the point covariances, i.e. minimizing the sum of squared sigma_x_ij^-1 norms ||e_ij||_sigma_x_ij^-1 (a.k.a. Mahalanobis distance) rather than the sum of L2 norms ||e_ij||.
      A NULL value for covx results in identity matrices being used as covariances, i.e. minimizes the sum of L2 norms ||e_ij||.
    • CAUTION FOR PREVIOUS VERSIONS USERS: The size of the opts argument (i.e., SBA_OPTSSZ) was increased by one to include a new stopping threshold \epsilon_4 that forces termination when the relative reduction in the RMS reprojection error drops below it.
    • Reduced further the memory requirements of sba_motstr_levmar_x() by using the same memory to store the matrices V* and V*-1. This is achieved by exploiting their symmetry to store only their triangular parts.
    • Ensured that any working memory retained between invocations of the linear solvers is released upon the termination of sba routines.
    • Introduced the new error code 7 that signals infinite (i.e. NaN or Inf) values of the user-supplied projection function.
    • Implemented a loop unrolling scheme for speeding up the computation of e=x-hx.
    • Fixed a subtle error in readparams.c of the demo program, which could cause initial values to be read incorrectly in some rare cases.

  • January 11, 2008: sba version 1.4 released
    • CAUTION FOR PREVIOUS VERSIONS USERS: The Jacobian's memory layout for the sba_motstr_levmar_x() routines has been changed:
      Version 1.4 has improved memory management by reusing memory among computations. This has reduced the total required memory size and seems to have improved locality, thus reducing total execution time. However, it has necessitated a change in the memory layout of the non-zero blocks of the Jacobian. More specifically, the blocks of the Jacobian for a certain image projection x_ij should be placed back-to-back, i.e. the Jacobian should be computed in the order
      (A_11, B_11, ..., A_1m, B_1m, ..., A_n1, B_n1, ..., A_nm, B_nm), instead of the previous ordering in which all A_ij blocks came first and B_ij blocks followed, i.e.
      (A_11, ..., A_1m, ..., A_n1, ..., A_nm, B_11, ..., B_1m, ..., B_n1, ..., B_nm).
      Be reminded that A_ij=dx_ij/da_j and B_ij=dx_ij/db_i.
      Due to this reordering of blocks A_ij and B_ij, user code computing the Jacobian for the motion & structure expert driver should be adapted accordingly. However, user code employing the motion or structure only expert drivers or any of the simple drivers, remains unaffected.
    • Added a matlab MEX-file interface to sba's simple drivers. This allows sba to be used from the matlab environment and the projection and Jacobian functions to be coded in matlab. See the matlab directory for more details.
    • Improved error handling in various routines. Instead of an immediate exit, tolerable errors result in a return with value SBA_ERROR (-1).
    • Improvements to the demo program eucsbademo:
      • Fixed a problem with rotation quaternions: Previous code performed BA using 4 parameters per quaternion but did not enforce the unit norm property for them; therefore, it could end up with final quaternion estimates that were not of unit norm. The new version uses only 3 parameters for each quaternion: quat (w, x, y, z) is first normalized to unit norm and if necessary, its scalar part w is made positive via negation. Then, the quaternion is represented using its vector part, which also uniquely determines its scalar part (i.e., w=sqrt(1-x^2-y^2-z^2)). Thanks to Stuart Nixon for reporting this problem with quaternions norms.
      • Added the option of refining the intrinsic camera parameters in addition to the camera motions.
      • Modified the Jacobian calculation code to eliminate if statements.

  • June 2, 2006: sba version 1.3 released
    • Implemented a few performance improvements, of which the most important is the exploitation of the symmetry of matrix U* - W V*^-1 Wt in eq.(20) of TR-340. Instead of computing every element of this matrix, the new version computes only its diagonal and upper triangle and then copies it to the lower part, saving computations.
    • Included utilities allowing the visualization of the approximate Hessian J^t J and the script-based evaluation of the reprojection error pertaining to a 3D reconstruction.

  • November 24, 2005: sba version 1.2.1 released
    • Fixed a minor error in sba_levmar.c related with info[6] code 5: if the test for terminating succeeded before the completion of the first iteration, mu and eab_inf ended up containing garbage. Thanks to Costas Plakas for noticing this.

  • November 04, 2005: sba version 1.2 released
    • CAUTION FOR PREVIOUS VERSIONS USERS: The following changes were made to the behaviour/arguments of sba_XXX_levmar() and sba_XXX_levmar_x() routines :
      1. The size of the opts argument was increased to include a new stopping threshold \epsilon_3 that forces return when the total reprojection error drops below it. info[6] code 5 is signaled in this case.
      2. Introduced the new info[6] codes 5 and 6.
      3. A zero value for itmax in sba_XXX_levmar() and sba_XXX_levmar_x() now triggers verification of the user-supplied Jacobians followed by an immediate return with a value of 0.
    • Implemented a new, more efficient strategy for computing the expert drivers Jacobians using finite differences. This new strategy exploits the sparse structure of the sought Jacobian to obtain several of its columns at the cost of a single function evaluation, thus drastically reducing the total number of necessary function evaluations.
    • Added code for verifying the correctness of user-supplied Jacobians.
    • A makefile for Microsoft's Visual Studio C compiler has been created. See
    • Increased SBA_OPTSSZ to accomodate an additional stopping threshold which forces termination when the total reprojection error drops below it.
    • Corrected minnor problems: tolerating damping factor overflows for singular Hessians (code 6), canceling Hessian damping after convergence.
    • Added a FAQ with common questions regarding sba.

  • December 30, 2004: sba version 1.1 released
    • Added sba_str_levmar() and sba_str_levmar_x(), resp. simple and expert driver for structure only BA.
    • Added sba_Axb_CG(), a linear systems solver that is based on the conjugate gradients method. When applied to very large problems, this solver might be more efficient than solvers based on decompositions such as Cholesky, LU, QR, SVD, etc.
    • Made several minor other changes.

  • September 30, 2004: sba version 1.0 released (first public release)