Skip to main content
. 2024 Dec 20;24(24):8139. doi: 10.3390/s24248139
Algorithm 2 Image reconstruction from a compressive measurement.
Input: y—measurement vector of length k (it i assumed that kn, where n=nx·ny is the image size in pixels, and that the measurement equation is y=M·x, where x is the measured image, and M is the binary measurement matrix)
Input: Vl×m×n binary array such that Vi,j,p=1 at pixels p belonging to region j of map i unless rp=i. In further notation, Vi (i{1,2,,l}) represents a m×n slice of V which corresponds to the i-th map.
Input: W—array of l matrices Wi=Vi·P (i{1,2,,l}) with dimensions m×k. Here P=(D·M)g is the generalized matrix inverse g applied to the measurement matrix M after taking the differences of its rows with operator D
Input: x˜—the initial image reconstruction vector of size n=nx·ny (set by us to the initial reconstruction result ReLu(P·y) but may also be filled with constant positive values)
Input: f(0,1)—learning rate (we took f=0.75)
Output: x˜—vector of size n with the reconstructed image
function IMAGE RECONSTRUCT(y, W, V, x˜, f )
     for i=1,maxiter do
         for j=1,l do ▹ Loop over maps
            wjWj·y ▹ Expected pixel sums in sectors of map
            vjVj·x˜ ▹ Current pixel sums in sectors of map j
            cwj/vj where vj0 else 0
            x˜(1f)x˜+f·diag(c·Vj)·x˜
         end for
        end for
     return x˜ ▹ Return the reconstructed image
end function