This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

A novel algorithm for optimizing bundle adjustment in image sequence alignment

Hailin Xu, Hongxia Wang, Huanshui Zhang

Abstract

The Bundle Adjustment (BA) model is commonly optimized using a nonlinear least squares method, with the Levenberg-Marquardt (L-M) algorithm being a typical choice. However, despite the L-M algorithm’s effectiveness, its sensitivity to initial conditions often results in slower convergence when applied to poorly conditioned datasets, motivating the exploration of alternative optimization strategies. This paper introduces a novel algorithm for optimizing the BA model in the context of image sequence alignment for cryo-electron tomography, utilizing optimal control theory to directly optimize general nonlinear functions. The proposed Optimal Control Algorithm (OCA) exhibits superior convergence rates and effectively mitigates the oscillatory behavior frequently observed in L-M algorithm. Extensive experiments on both synthetic and real-world datasets were conducted to evaluate the algorithm’s performance. The results demonstrate that the OCA achieves faster convergence compared to the L-M algorithm. Moreover, the incorporation of a bisection-based update procedure significantly enhances the OCA’s performance, particularly in poorly initialized datasets. These findings indicate that the OCA can substantially improve the efficiency of 3D reconstructions in cryo-electron tomography.
Key words: Bundle adjustment, Electron tomography, Image sequence alignment, Optimal control algorithm.

1 Introduction

Electron tomography (ET) techniques is an important branch of cryo-electron microscopy. It utilizes the 3D reconstruction method in simultaneous localization and mapping (SLAM) to reconstruct the 3D structure of organisms by photographing biological samples at different oblique angles. footnotetext: This work was supported by the Original Exploratory Program Project of National Natural Science Foundation of China (62450004), the Joint Funds of the National Natural Science Foundation of China (U23A20325), and the Natural Science Foundation of Shandong Province (ZR2021ZD14, ZR2024MF045). (Corresponding author: Huanshui Zhang.) H. Zhang is with the College of Electrical Engineering and Automation, Shandong University of Science and Technology, Qingdao 266590, China, and also with the School of Control Science and Engineering, Shandong University, Jinan, Shandong 250061, China (e-mail: [email protected]). H. Wang is with the College of Electrical Engineering and Automation, Shandong University of Science and Technology, Qingdao 266590, China (e-mail: [email protected];). H. Xu is with the College of Mathematics and Systems Science, Shandong University of Science and Technology, Qingdao 266590, China (e-mail: [email protected];)This method enables the acquisition of relatively accurate biological structural information. The most critical step is the alignment of image sequence, which has a direct impact on the final 3D structure restoration accuracy. Image sequence alignment can be divided into two main methods: marker-free alignment [1] and marker-based alignment [2, 3]. In the marker-based alignment , the bundle adjustment is the core, and the nonlinear least square method is usually used to minimize the reprojection error and optimize the target parameters.

Up to now, there exists a variety of alternative algorithms for solving nonlinear least squares problems, including the Newton method, Gauss-Newton method, and L-M algorithm, among others. The L-M algorithm is commonly employed in many practical applications. Recently, an optimization algorithm based on optimal control has been proposed [4]. This novel approach transforms the optimization problem into an optimal control problem by designing a cost function closely related to the objective function. An optimal controller adjusts a first-order difference equation to minimize the objective function. This method offers several advantages, such as relatively flexible initial value selection, rapid convergence rates, and the avoidance of oscillatory behavior commonly associated with gradient methods. Notably, when the initial value is appropriately chosen, the OCA can yield different local minima by adjusting the input weight matrix.

At present, the OCA remains primarily at the theoretical level and has not yet seen widespread application. This paper explores the practical application of the OCA by optimizing the BA model in cryo-ET and comparing the results with those obtained using the L-M algorithm. The remainder of this paper is organized as follows. Section 2 provides a review of recent research on BA and offers a brief introduction to the steps of the L-M algorithm. Section 3 discusses the projection model employed in BA within the context of cryo-ET, along with the underlying principles of the OCA. In Section 4, we present a comparative experiment between the L-M algorithm and OCA, demonstrating that the latter exhibits faster convergence. Finally, Section 5 outlines future directions for the development of OCA and explores its potential applications.

2 Related work and L-M algorithm

Bundle adjustment refers to the extraction of optimal 3D models and camera parameters (both intrinsic and extrinsic) from visual reconstruction data. It involves adjusting the camera orientation and the spatial positions of feature points such that the optimal alignment of light rays, reflected from each feature point, is achieved. These rays are eventually projected onto the camera’s optical center[5].

The BA was first introduced by Brown and Duane[6], with its cost function formulated as the sum of squares of multiple nonlinear functions. Given that the minimization process is carried out using nonlinear least squares, the L-M algorithm is the most commonly employed optimization technique. Recent studies have primarily concentrated on expanding the application scenarios of the BA model. For example, Liu et al.[7] propose a new cost function that extends the applicability of BA to lidar mapping. However, relatively few works have addressed the fundamental aspects of the problem by exploring alternative algorithmic structures to replace the L-M algorithm. In this regard, Li et al.[8] introduce a Broyden–Fletcher–Goldfarb–Shanno algorithm to approximate the cost function. Similarly, Zhou et al. [9] propose a point-to-plane cost function aimed at jointly optimizing depth camera poses and plane parameters for 3D reconstruction.

The aforementioned approaches, including the L-M algorithm, can be regarded as variations of the Gauss-Newton method. Consequently, the linearization of the cost function is an inherent aspect of these methods, which leads to increased errors and a higher number of iterations. In contrast, the OCA, introduced in the subsequent section, does not rely on such linearization techniques.

2.1 Levenberg-Marquardt algorithm

The L-M algorithm is a widely used algorithm for solving non-linear least squares problems, which combines the concepts of gradient descent and the Gauss-Newton algorithm to provide a robust approach for parameter estimation.

Let φ(x)=(φ1(x),φ2(x),,φm(x))T\varphi(x)=(\varphi_{1}(x),\varphi_{2}(x),...,\varphi_{m}(x))^{T}, the objective is to minimize the sum of squared residuals

minxnΦ(x)=12φ(x)2=12i=1mφi2(x).\underset{x\in\mathbb{R}^{n}}{\text{min}}\quad\Phi(x)=\frac{1}{2}||\varphi(x)||^{2}=\frac{1}{2}\sum_{i=1}^{m}\varphi_{i}^{2}(x). (1)

The update rule for the parameters xx is given by

(JT(xk)J(xk)+μkI)dk\displaystyle\left(J^{T}(x_{k})J(x_{k})+\mu_{k}I\right)d_{k} =JT(xk)φ(xk),\displaystyle=-J^{T}(x_{k})\varphi(x_{k}), (2)
xk+1\displaystyle x_{k+1} =xk+dk,\displaystyle=x_{k}+d_{k},

where J(xk)J(x_{k}) is the Jacobian matrix of partial derivatives, II is the identity matrix and μk\mu_{k} is referred to as damping parameter, which controls the behavior of the algorithm.

A larger μk\mu_{k} makes the update resemble gradient descent while a smaller μk\mu_{k} approximates the Gauss-Newton method. This adaptability allows the L-M algorithm to efficiently handle a wide range of problem conditions.

In this approach, we employ the trust-region method to adjust μk\mu_{k}. First, we define a quadratic function at the current iteration point to represent the predicted value

P(d)=φ(xk)+(JT(xk)φ(xk))Td+12dT(JT(xk)J(xk))d.P(d)=\varphi(x_{k})+(J^{T}(x_{k})\varphi(x_{k}))^{T}d+\frac{1}{2}d^{T}(J^{T}(x_{k})J(x_{k}))d. (3)

The step dkd_{k} is then computed based on the current value of μk\mu_{k}, and the ratio of the actual decrease to the predicted decrease is evaluated as

ξk=φ(xk+1)φ(xk)P(dk)φ(xk).\xi_{k}=\frac{\varphi(x_{k+1})-\varphi(x_{k})}{P(d_{k})-\varphi(x_{k})}. (4)

Equation (4) reflects the degree to which the linearized model aligns with the nonlinear objective function.

  • When ξk\xi_{k} approaches 1, the quadratic model P(d)P(d) provides a good approximation of the objective function at xkx_{k}, suggesting that μk\mu_{k} should be reduced.

  • When ξk\xi_{k} approaches 0, the quadratic model P(d)P(d) poorly approximates the objective function at xkx_{k}, indicating that μk\mu_{k} should be increased.

  • When ξk\xi_{k} is neither close to 0 nor 1, μk\mu_{k} is considered to be appropriately chosen, and no adjustment is necessary.

Typically, the threshold values for ξk\xi_{k} are set to 0.25 and 0.75. Based on this, the update rule for μk\mu_{k} in the L-M method is as follows

μk+1:={10μk,ξk<0.25,μk,0.25ξk0.75,0.1μkξk>0.75.\mu_{k+1}:=\left\{\begin{aligned} 10\mu_{k},\quad&\xi_{k}<0.25,\\ \mu_{k},\quad&0.25\leq\xi_{k}\leq 0.75,\\ 0.1\mu_{k}\quad&\xi_{k}>0.75.\end{aligned}\right. (5)

In summary, the complete flow of the L-M algorithm is as follows

Algorithm 1 Levenberg-Marquardt Algorithm
1:Initialize: Set initial guess x0x_{0}, initial damping parameter μ0\mu_{0}, and tolerance ε\varepsilon.
2:Input: Residual function φ(x)\varphi(x), Jacobian J(x)J(x), damping parameter μ\mu.
3:for k=0,1,2,k=0,1,2,\dots do
4:     Compute the Jacobian J(xk)J(x_{k}) and the residual φ(xk)\varphi(x_{k}).
5:     Solve for dkd_{k} using:
(JT(xk)J(xk)+μkI)dk=JT(xk)φ(xk)\left(J^{T}(x_{k})J(x_{k})+\mu_{k}I\right)d_{k}=-J^{T}(x_{k})\varphi(x_{k})
6:     Compute the iteration: xk+1=xk+dkx_{k+1}=x_{k}+d_{k}.
7:     if xk+1xk<ε||x_{k+1}-x_{k}||<\varepsilon then
8:         Terminate the algorithm.
9:     end if
10:     Evaluate the ratio of actual to update μ\mu:
ξk=φ(xk)φ(xk+1)P(dk)φ(xk)\xi_{k}=\frac{\varphi(x_{k})-\varphi(x_{k+1})}{P(d_{k})-\varphi(x_{k})}
11:     if ξk<0.25\xi_{k}<0.25 then
12:         Increase the damping parameter: μk+1=10μk\mu_{k+1}=10\mu_{k}.
13:     else if 0.25ξk0.750.25\leq\xi_{k}\leq 0.75 then
14:         Hold the damping parameter: μk+1=μk\mu_{k+1}=\mu_{k}.
15:     else
16:         Decrease the damping parameter: μk+1=0.1μk\mu_{k+1}=0.1\mu_{k}.
17:     end if
18:end for
19:Output: Optimal solution xx^{*}.

3 Method

This section is divided into two parts. The first part introduces the projection model of cryo-ET, a crucial component in BA. The second part explains the principles of the OCA and extends the algorithm by incorporating a parameter update mechanism.

3.1 Projection model

An essential component of BA is the camera projection model, which maps the 3D coordinates of objects in the real world onto 2D coordinates in an image. In this paper, we focus on the application of a projection model specifically for cryo-ET image sequence[10]

(uv)=Rγ1(1sPRβRα(XYZ)t),\begin{pmatrix}u\\ v\end{pmatrix}=\textbf{R}_{\gamma}^{-1}\left(\frac{1}{s}\textbf{P}\textbf{R}_{\beta}\textbf{R}_{\alpha}\begin{pmatrix}X\\ Y\\ Z\end{pmatrix}-\textbf{t}\right), (6)

where (X,Y,Z)T(X,Y,Z)^{T} is the 3D coordinates of the fiducial markers, (u,v)T(u,v)^{T} is the 2D projection of the fiducial markers in the image, ss is the image scale change, t=(t0,t1)T\textbf{t}=(t_{0},t_{1})^{T} is the translation during projection and P represents the orthogonal projection matrix. R denotes the rotation matrix of the projection process, the details of R and P as follows

P=(100010),\textbf{P}=\begin{pmatrix}1&0&0\\ 0&1&0\end{pmatrix},
Rα=(1000cosαsinα0sinαcosα),\textbf{R}_{\alpha}=\begin{pmatrix}1&0&0\\ 0&cos\alpha&sin\alpha\\ 0&-sin\alpha&cos\alpha\end{pmatrix},
Rβ=(cosβ0sinβ010sinβ0cosβ),\textbf{R}_{\beta}=\begin{pmatrix}cos\beta&0&-sin\beta\\ 0&1&0\\ sin\beta&0&cos\beta\end{pmatrix},
Rγ=(cosγsinγsinγcosγ).\textbf{R}_{\gamma}=\begin{pmatrix}cos\gamma&sin\gamma\\ -sin\gamma&cos\gamma\end{pmatrix}.

xc=(s,α,β,γ,t0,t1)T\textbf{x}_{c}=(s,\alpha,\beta,\gamma,t_{0},t_{1})^{T} is called as camera parameters and xp=(X,Y,Z)T\textbf{x}_{p}=(X,Y,Z)^{T} is called as point parameters.

When sufficient projection data for a single 3D point is available, triangulation can be used to approximate the coordinates of that point. However, due to various uncertainties, the initial estimates of the 3D coordinates may not be entirely accurate. When this estimated 3D point is reprojected onto the 2D image, a discrepancy, or error, arises in comparison to the observed point.

Let the observed point be denoted as z=Δ(u,v)T\textbf{z}\stackrel{{\scriptstyle\Delta}}{{=}}(u,v)^{T} and the point obtained by reprojection can be expressed as follows

(u^v^)=Rγ01(1s0PRβ0Rα0(X0Y0Z0)t0)=h(xc0,xp0),\begin{pmatrix}\hat{u}\\ \hat{v}\end{pmatrix}=\textbf{R}_{\gamma_{0}}^{-1}\left(\frac{1}{s_{0}}\textbf{P}\textbf{R}_{\beta_{0}}\textbf{R}_{\alpha_{0}}\begin{pmatrix}X_{0}\\ Y_{0}\\ Z_{0}\end{pmatrix}-\textbf{t}_{0}\right)=\textbf{h}(\textbf{x}_{c_{0}},\textbf{x}_{p_{0}}), (7)

where ()0(\cdot)_{0} represents the initial estimation of parameters. Thus the reprojection error can be written as

e=zh.\textbf{e}=\textbf{z}-\textbf{h}. (8)

To account for all observations, we can introduce a subscript to represent the error for each observation. Let zij\textbf{z}_{ij} denotes the data generated by the ii-th marker in the jj-th image. The overall cost function can be expressed as

12i=1nj=1meij2δij=i=1nj=1m12zijh(xcj,xpi)2δij.\frac{1}{2}\sum_{i=1}^{n}\sum_{j=1}^{m}||\textbf{e}_{ij}||^{2}\delta_{ij}=\sum_{i=1}^{n}\sum_{j=1}^{m}\frac{1}{2}\left|\left|\textbf{z}_{ij}-\textbf{h}(\textbf{x}_{c_{j}},\textbf{x}_{p_{i}})\right|\right|^{2}\delta_{ij}. (9)

During the sample collection process, some marker points may become obscured at certain angles and thus will not be visible. To represent the visibility of these points, we introduce a visibility indicator δij={0,1}\delta_{ij}=\{0,1\}. If the projection of the jj-th marker is visible in the ii-th image, δij=1\delta_{ij}=1; otherwise, δij=0\delta_{ij}=0.

Solving this least-squares problem involves jointly optimizing both the camera parameters xc\textbf{x}_{c} and the point parameters xp\textbf{x}_{p}, a process known as Bundle Adjustment.

The effectiveness of the adjustments is evaluated using the following average residual formula

L1=12mni=1nj=1mzijh(xcj,xpi)1,L_{1}=\frac{1}{2mn}\sum_{i=1}^{n}\sum_{j=1}^{m}\left|\left|\textbf{z}_{ij}-\textbf{h}(\textbf{x}^{*}_{c_{j}},\textbf{x}^{*}_{p_{i}})\right|\right|_{1}, (10)

where ||||1||\cdot||_{1} denotes the 1-norm, xcx_{c}^{*} and xpx_{p}^{*} are the adjusted parameters. A smaller L1L_{1} value indicates a lower reprojection error.

3.2 Optimal control algorithm

Suppose f(x):nf(x):\mathbb{R}^{n}\rightarrow\mathbb{R} is a nonlinear function with a continuous second derivative. Consider the following optimization problem

minxnf(x).\underset{x\in\mathbb{R}^{n}}{min}\quad f(x). (11)

Generally it can be solved by the following iteration

xk+1=xk+dk,x_{k+1}=x_{k}+d_{k}, (12)

where dkd_{k} is step size.

If we interpret dkd_{k} as a control input in a control system, the iteration (12) exhibits a structure analogous to that of the following discrete-time linear time-invariant system

xk+1=xk+uk.x_{k+1}=x_{k}+u_{k}. (13)

By designing a performance index related to the cost function [4], the optimization problem (11) can be reformulated as the following optimal control problem,

min𝑢k=1N(f(xk)+12ukTRuk)+f(xN+1),\displaystyle\underset{u}{\text{min}}\quad\sum_{k=1}^{N}(f(x_{k})+\frac{1}{2}u_{k}^{T}Ru_{k})+f(x_{N+1}), (14)
s.t.xk+1=xk+uk,\displaystyle s.t.\quad x_{k+1}=x_{k}+u_{k},

where f(xN+1)f(x_{N+1}) represents the terminal cost function, NN is the terminal time, and x0x_{0} is given. The positive definite matrix RR denotes the control weight.

Based on the Pontryagin Maximum Principle, the optimal trajectory satisfies a set of forward and backward equations. Solving these equations yields the optimal controller for the problem (14)

uk=R1i=k+1N+1f(xi).u_{k}=-R^{-1}\sum_{i=k+1}^{N+1}\nabla f(x_{i}). (15)

Thus, we can derive the following iterative algorithm

xk+1=xkR1i=k+1N+1f(xi).x_{k+1}=x_{k}-R^{-1}\sum_{i=k+1}^{N+1}\nabla f(x_{i}). (16)

Although the above iteration is implicit, we can obtain an approximate explicit solution through Taylor expansion. First, take the first-order Taylor expansion of f(xi)\nabla f(x_{i}) at xi1x_{i-1}

xk+1=xkgk,k=0,,N,x_{k+1}=x_{k}-g_{k},k=0,\dots,N, (17)
gk=[R+Hk]1[fk+i=k+1N(fiHigi)],g_{k}=[R+H_{k}]^{-1}[\nabla f_{k}+\sum_{i=k+1}^{N}(\nabla f_{i}-H_{i}g_{i})], (18)
gN=[R+Hk]1fN,g_{N}=[R+H_{k}]^{-1}\nabla f_{N}, (19)

where fk=f(xk),Hk=H(xk)\nabla f_{k}=\nabla f(x_{k}),H_{k}=H(x_{k}), and H(xk)H(x_{k}) is the Hessian matrix of the objective function f(x)f(x). By replacing all xix_{i} with xkx_{k} for i>ki>k, we obtain the following optimal control algorithm to address BA

xk+1=xkgk(xk),\displaystyle x_{k+1}=x_{k}-g_{k}(x_{k}),
g0(xk)=[R+H(xk)]1f(xk),\displaystyle g_{0}(x_{k})=[R+H(x_{k})]^{-1}\nabla f(x_{k}), (20)
gk(xk)=[R+H(xk)]1[f(xk)+Rgk1(xk)].\displaystyle g_{k}(x_{k})=[R+H(x_{k})]^{-1}[\nabla f(x_{k})+Rg_{k-1}(x_{k})].

The optimal control algorithm has been demonstrated to exhibit a superlinear convergence property[11], and the algorithm operates through the following stages

Algorithm 2 Optimal Control Algorithm
1:Initialize: Set initial guess x0x_{0}, control weight matrix RR, and tolerance ε\varepsilon.
2:Input: Objective function f(x)f(x), gradient f(x)\nabla f(x), Hessian H(x)H(x).
3:for k=0,1,2,k=0,1,2,\dots do
4:     Compute the gradient J(xk)J(x_{k}) and the Hessian H(xk)H(x_{k}).
5:     for j=0,1,2,,kj=0,1,2,\dots,k do
6:         if j=0j=0 then
7:              Compute the initial search direction:
g0(xk)=[R+H(xk)]1f(xk)g_{0}(x_{k})=\left[R+H(x_{k})\right]^{-1}\nabla f(x_{k})
8:         else
9:              Compute the search direction for j1j\geq 1:
gj(xk)=[R+H(xk)]1[f(xk)+Rgj1(xk)]g_{j}(x_{k})=\left[R+H(x_{k})\right]^{-1}\left[\nabla f(x_{k})+Rg_{j-1}(x_{k})\right]
10:         end if
11:     end for
12:     Update the solution:
xk+1=xkgk(xk)x_{k+1}=x_{k}-g_{k}(x_{k})
13:     if xk+1xk<ε||x_{k+1}-x_{k}||<\varepsilon then
14:         Terminate the algorithm.
15:     end if
16:end for
17:Output: Optimal solution xx^{*}.

The selection of an appropriate weight matrix RR is critical for the effective operation of the OCA. For convenience, RR is generally defined as R=λIR=\lambda\cdot I, where λ>0\lambda>0 is a constant. Under the condition that (R+H(x0))>0(R+H(x_{0}))>0, smaller values of λ\lambda lead to faster convergence of the OCA. In the simulation experiments presented in Section 4.2, a set of poorly initialized data was generated, with initial points positioned far from the extremum points. In such cases, a larger λ\lambda is typically required to ensure algorithmic convergence; however, this also results in a slower convergence rate for the OCA. To resolve this issue, we propose an update procedure based on the bisection method, which allows the weight matrix RR to progressively decrease as the number of iterations increases. This approach ensures algorithmic convergence while simultaneously enhancing convergence speed. The detailed update strategy is presented as follows.

Algorithm 3 Optimal Control Algorithm with Adaptive Update of RR
1:Initialize: Set initial guess x0x_{0}, update factor λ0,λ1\lambda_{0},\lambda_{1}, and tolerance ε\varepsilon.
2:Input: Objective function f(x)f(x), gradient f(x)\nabla f(x), Hessian H(x)H(x).
3:for k=0,1,2,k=0,1,2,\dots do
4:     if k\leqthen
5:         Set Rk=λkIR_{k}=\lambda_{k}\cdot I
6:         Compute the gradient J(xk)J(x_{k}) and the Hessian H(xk)H(x_{k}).
7:         for j=0,1,2,,kj=0,1,2,\dots,k do
8:              if j=0j=0 then
9:                  Compute the initial search direction:
g0(xk)=[Rk+H(xk)]1f(xk)g_{0}(x_{k})=\left[R_{k}+H(x_{k})\right]^{-1}\nabla f(x_{k})
10:              else
11:                  Compute the search direction for j1j\geq 1:
gj(xk)=[Rk+H(xk)]1[f(xk)+Rgj1(xk)]g_{j}(x_{k})=\left[R_{k}+H(x_{k})\right]^{-1}\left[\nabla f(x_{k})+Rg_{j-1}(x_{k})\right]
12:              end if
13:         end for
14:     else
15:         Take Rk=Rk1R_{k}=R_{k-1} and do step 7-13.
16:         Set xtemp=xkgk(xk)x_{\text{temp}}=x_{k}-g_{k}(x_{k}) and compute the objective function
cost1=f(xtemp).cost_{1}=f(x_{\text{temp}}).
17:         Initialize interval bounds for line search: a=0a=0, b=λk1b=\lambda_{k-1}.
18:         while (ba)>0.1(b-a)>0.1 do \triangleright Binary search to adjust RkR_{k}
19:              Set c=b+a2c=\frac{b+a}{2} and update Rk=cIR_{k}=c\cdot I
20:              Recompute the search direction using steps 7-13
21:              Set xtemp=xkgk(xk)x_{\text{temp}}=x_{k}-g_{k}(x_{k}) and compute the new objective function
cost2=f(xtemp).cost_{2}=f(x_{\text{temp}}).
22:              if cost1>cost2cost_{1}>cost_{2} then
23:                  b=cb=c
24:                  Update cost1=cost2cost_{1}=cost_{2}
25:              else if cost1<cost2cost_{1}<cost_{2} then
26:                  a=ca=c
27:                  Update cost1=cost2cost_{1}=cost_{2}
28:              else
29:                  break \triangleright Terminate the binary search if no improvement
30:              end if
31:         end while
32:         Finalize Rk=cIR_{k}=c\cdot I \triangleright Set the optimized weight matrix
33:     end if
34:     Update the solution:
xk+1=xkgk(xk)x_{k+1}=x_{k}-g_{k}(x_{k})
35:     if xk+1xk<ε||x_{k+1}-x_{k}||<\varepsilon then
36:         Terminate the algorithm.
37:     end if
38:end for
39:Output: Optimal solution xx^{*}.

It is important to note that this update procedure does not affect the convergence of OCA. Given that λk\lambda_{k} is non-increasing, it follows that the spectral radius ρ((Rk+H(xk))1Rk)\rho((R_{k}+H(x_{k}))^{-1}R_{k}) is also non-increasing. As λk\lambda_{k} decreases, the convergence rate of OCA improves. For a detailed proof, the reader is referred to [11].

4 Result

In this section, we apply the OCA and the L-M algorithm to the collected datasets and compare the convergence speed and accuracy of the two methods based on the experimental results. The algorithms and data used in this study were implemented in MATLAB R2023b, with the integration of the third-party CasADi[12] software tool.

4.1 Real datasets experiment

We selected three real-world cryo-electron microscopy datasets, Centriolehttp://bio3d.colorado.edu/imod/files/tutorialData-1K.tar.gz, VEEVhttps://doi.org/10.5281/zenodo.11172321 and Vibrio https://doi.org/10.5281/zenodo.11172858 to evaluate our algorithms. The Centriole dataset consists of a tilted sequence of 64 projections, with the projected images tilted between -61° and +65° at 2° intervals. Each projection is a 1024x1024-pixel image, with each pixel corresponding to 1.01 nm. The VEEV dataset consists of a tilted sequence of 21 projections, with the projected images tilted between -50° and +50° at 5° intervals. Each projection is a 1536x2048-pixel image, with each pixel corresponding to 0.2 nm. The Vibrio dataset[13] consists of a tilted sequence of 41 projections. The tomographic reconstructions of these samples were performed using the incline program from the MarkerAuto software suite[3].

Table 1 presents the experimental results of the real datasets, indicating that the Optimal Control algorithm has a faster convergence speed compared to the L-M algorithm.

Table 1: Real datasets
Data Method R/μ0\mu_{0} Iteration Initial residual Final residual
Centriole OCA R=0.08IR=0.08I 4 1.729723 1.196488
L-M μ0=0.1\mu_{0}=0.1 9 1.196488
VEEV OCA R=17IR=17I 28 10.412596 1.202426
L-M μ0=0.1\mu_{0}=0.1 236 1.202426
Vibrio OCA R=0.01IR=0.01I 5 10.431754 1.123689
L-M μ0=0.1\mu_{0}=0.1 7 1.123689
Refer to caption
Figure 1: Convergence error

Using the VEEV dataset as an illustrative example, Figure 1 presents the error in the parameters to be optimized at each iteration, represented as xkxk1x_{k}-x_{k-1}. Notably, when k=28k=28, the OCA satisfied the convergence criterion of ε<106\varepsilon<10^{-6}. In contrast, the L-M algorithm exhibited oscillatory behavior, which led to an increased number of iterations. Consequently, it only met the convergence criterion at k=236k=236.

4.2 Simulated datasets experiment

To obtain a broader range of experimental results, we randomly constructed nn 3D points and mm projection images at various angles for simulated dataset experiments, where n=20,40,60n=20,40,60 and m=21,41,64m=21,41,64. The projection images are sized 1024×10241024\times 1024 pixels, and the 3D points are distributed within an 800×800×400800\times 800\times 400 space. To enhance the realism of the simulated dataset, we processed the constructed data as follows

  • Step 1 Randomly select 5%–30% of the 2D projection points as invisible.

  • Step 2 Add Gaussian noise with a standard deviation of a%×1024a\%\times 1024 to the 2D projection points, where a=0.2,2,10a=0.2,2,10.

  • Step 3 Add b%b\% noise to the camera parameters, with noise magnitude based on the average of each parameter (avg), uniformly distributed in the range [avg,avg][-\text{avg},\text{avg}], where b=5,10b=5,10.

  • Step 4 Select 5% of the 2D projection points as outliers and add Gaussian noise with a mean of 0.01×10240.01\times 1024 and a standard deviation of 0.04×10240.04\times 1024.

For convenience, we denote the dataset with parameters m=21,n=20,a=0.2,b=5m=21,n=20,a=0.2,b=5 as “21c_5%_20p_0.2%.” To ensure a fair comparison, the weight matrix RR in the OCA and the damping factor μ\mu in the L-M algorithm were iteratively adjusted to promote faster convergence. The results of this experiment are presented in Table 2.

Table 2: Simulated datasets for small noise
Noise Method R/μ0R/\mu_{0} Iteration Initial residual Final residual
21c_5% OCA R=0.25IR=0.25I 6 11.178429 2.051380
_20p_0.2% L-M μ0=0.1\mu_{0}=0.1 8 2.051380
21c_5% OCA R=0.25IR=0.25I 6 14.683220 12.377970
_20p_2% L-M μ0=1\mu_{0}=1 24 12.377970
41c_5% OCA R=0.25IR=0.25I 5 8.411878 1.920106
_20p_0.2% L-M μ0=0.1\mu_{0}=0.1 6 1.920106
41c_5% OCA R=0.625IR=0.625I 5 15.658034 12.106996
_20p_2% L-M μ0=10\mu_{0}=10 17 12.106996
21c_5% OCA R=0.25IR=0.25I 6 8.085499 1.992593
_40p_0.2% L-M μ0=0.1\mu_{0}=0.1 6 1.992593
21c_5% OCA R=IR=I 8 14.191696 11.834401
_40p_2% L-M μ0=1\mu_{0}=1 16 11.834401
41c_5% OCA R=0.25IR=0.25I 5 7.968274 1.860539
_40p_0.2% L-M μ0=0.1\mu_{0}=0.1 6 1.860539
41c_5% OCA R=0.5IR=0.5I 5 16.647453 13.511510
_40p_2% L-M μ0=1\mu_{0}=1 9 13.511510

When large noise is introduced into the simulated dataset, the initial estimates of the camera parameters and the 2D point coordinates exhibit significant deviations. This suggests that the initial parameters are considerably distant from the extremum, necessitating a greater number of iterations for both the OCA and L-M algorithm. It is worth noting that, in the L-M algorithm, the damping factor μ\mu is continuously updated, whereas the weight matrix RR in the OCA remains constant throughout the iterations. If we allow the matrix RR in the OCA to be updated gradually similar to μ\mu in the L-M algorithm, the OCA could potentially achieve faster convergence. The detailed experimental results are displayed in the Table 3.

Table 3: Simulated datasets for large noise
Noise Method R0/μ0R_{0}/\mu_{0} Iteration Initial residual Final residual
21c_10% OCA R0=105IR_{0}=10^{5}I 8 75.677900 67.390553
_20p_10% L-M μ0=0.01\mu_{0}=0.01 108 67.390553
41c_10% OCA R0=2105IR_{0}=2*10^{5}I 9 68.691760 58.815270
_20p_10% L-M μ0=0.1\mu_{0}=0.1 146 58.815270
21c_10% OCA R0=75IR_{0}=75I 8 70.903339 65.472015
_40p_10% L-M μ0=100\mu_{0}=100 168 65.472015
41c_10% OCA R0=10IR_{0}=10I 8 79.020956 73.499860
_40p_10% L-M μ0=0.1\mu_{0}=0.1 26 73.499860

5 Discussion

In this paper, we introduce a novel algorithm, OCA, to optimize the BA model for the image sequence alignment of cryo-ET . We extended the OCA from a purely theoretical framework to practical applications. Through experiments on real-world datasets, the OCA exhibited a notably faster convergence rate compared to the widely adopted L-M algorithm, underscoring its practical significance. Furthermore, in experiments with simulated datasets, the advantages of the OCA became even more pronounced as the noise level increased. This indicates that, in real-world scenarios with poor initial estimates, the OCA may offer substantial benefits.

The BA model used for cryo-ET image sequence alignment involves parameters of relatively low magnitude, with matrices of only a few hundred dimensions. However, the successful application of the OCA in this context suggests its broader potential within the field of computer vision. While the implicit iterative formula of the OCA theoretically guarantees the optimal solution, as described in (16), it is technically challenging to implement. At present, several explicit iterative formulas have been proposed [11], and many explicit solutions remain to be explored. This presents a promising avenue for future research.

References

  • [1] R. Guckenberger. Determination of a common origin in the micrographs of tilt series in three-dimensional electron microscopy. Ultramicroscopy, 9(1):167–173, 1982.
  • [2] Michael C. Lawrence. Least-Squares Method of Alignment Using Markers, pages 197–204. Springer US, Boston, MA, 1992.
  • [3] Renmin Han, Liansan Wang, Zhiyong Liu, Fei Sun, and Fa Zhang. A novel fully automatic scheme for fiducial marker-based alignment in electron tomography. Journal of Structural Biology, 192(3):403–417, 2015.
  • [4] Huanshui Zhang and Hongxia Wang. Optimization methods rooting in optimal control. arXiv preprint arXiv:2312.01334, 2023.
  • [5] Bill Triggs, Philip F. McLauchlan, Richard I. Hartley, and Andrew W. Fitzgibbon. Bundle adjustment — a modern synthesis. In Bill Triggs, Andrew Zisserman, and Richard Szeliski, editors, Vision Algorithms: Theory and Practice, pages 298–372. Springer Berlin Heidelberg, 2000.
  • [6] Duane Brown. The bundle adjustment-progress and prospect. In XIII Congress of the ISPRS, Helsinki, 1976.
  • [7] Zheng Liu and Fu Zhang. Balm: Bundle adjustment for lidar mapping. IEEE Robotics and Automation Letters, 6(2):3184–3191, 2021.
  • [8] Yanyan Li, Qiang Wang, and Yanbiao Sun. Bundle adjustment method using sparse bfgs solution. Remote Sensing Letters, 9, 05 2018.
  • [9] Lipu Zhou, Daniel Koppel, Hul Ju, Frank Steinbruecker, and Michael Kaess. An efficient planar bundle adjustment algorithm. In 2020 IEEE International Symposium on Mixed and Augmented Reality (ISMAR), pages 136–145. IEEE, 2020.
  • [10] Renmin Han, Xiaohua Wan, Zihao Wang, Yu Hao, Jingrong Zhang, Yu Chen, Xin Gao, Zhiyong Liu, Fei Ren, Fei Sun, and Fa Zhang. Autom: A novel automatic platform for electron tomography reconstruction. Journal of Structural Biology, 199(3):196–208, 2017.
  • [11] Hongxia Wang, Yeming Xu, Ziyuan Guo, and Huanshui Zhang. Superlinear optimization algorithms, 2024.
  • [12] Joel AE Andersson, Joris Gillis, Greg Horn, James B Rawlings, and Moritz Diehl. Casadi: a software framework for nonlinear optimization and optimal control. Mathematical Programming Computation, 11:1–36, 2019.
  • [13] Davi R. Ortega, Catherine M. Oikonomou, H. Jane Ding, Prudence Rees-Lee, Alexandria, and Grant J. Jensen. Etdb-caltech: A blockchain-based distributed public database for electron tomography. PLOS ONE, 14(4):1–15, 04 2019.