Skip to main content
. 2024 Jan 31;10:e1713. doi: 10.7717/peerj-cs.1713

Algorithm 4. RANSAC method to best subset image selection.

input: X=[x1,x2,,xn]
Initialization: r1 as restored image by averaging on m restored images, r2 as (m+1)th restored image
for k = 1:C
 select mi images randomly
 for l=1:nm
  calculate r1: apply Algorithm 5 on mi images
  calculate r2: apply Algorithm 5 on mi images in addition to each remaining image {gj=1,,nm}
  calculate C1j: calculate similarity of r1 and r2 images using cross correlation
  calculate C2j: calculate noise distribution distance of m and m + 1 image sets using KL divergence
  calculate C3j: calculate transformation distribution distance of m and m + 1 image sets using KL divergence
  add gi image to support set of mi images if weighted average of C1j,C2j,C3j is less than predefined threshold
 end for
end for
select {mi=1,,C} that have largest support set as m* and related support set as s*
return{m+s}