Skip to main content
. 2023 Jan 4;25(1):106. doi: 10.3390/e25010106
Algorithm 1 Stitching two images.
Input: a target image Ia and a reference image Ib.
Output: a stitched image.
  •   1:

    Match point and line features between Ia and Ib to obtain {pa,pb} and {la,lb} via feature correspondences increase.

  •   2:

    Calculate a global homography Hgh and a global similarity matrix Hgs via dual-feature.

  •   3:

    Calculate a hybrid warp Hinit by Equation (18) and Equation (19).

  •   4:

    Calculate {laiu,lbiu} and {lajv,lbjv} from Hinit by Equation (16) and Equation (17).

  •   5:

    Detecting salient line segments in the non-overlapping region to obtain {laks}.

  •   6:

    Merge collinear local line segments into global lines {lags}.

  •   7:

    Uniformly sample {laiu},{laiv},{laks},{lags}.

  •   8:

    Solve V^ via minimizing the total energy term in Equation (26).

  •   9:

    Warp Ia via the bilinear interpolation on the basis of V^.

  •   10:

    Stitching the warped Ia with Ib via linear blending or seam-cutting blending.