将卷积转化为乘积:
function A = GetA(I,m,n)
%GetA get A which transforms P@k to A*k
% I is the input imageP;
%m and n are the height and weight of k respectively.
[height width] = size(I);
A = zeros(height*width, m*n);
for ii =(floor(m/)+):(height-floor(m/))
for jj = (floor(n/)+):(width-floor(n/))
for c = :n
for r= :m
A((ii-)*width + jj, (c-)*m+r) = I(ii+floor(m/)-r+, jj+floor(n/)-c+);
end
end
end
end
end