I*k-AK
?
將卷積轉化為乘積:
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/2)+1):(height-floor(m/2))for jj = (floor(n/2)+1):(width-floor(n/2))for c = 1:nfor r= 1:mA((ii-1)*width + jj, (c-1)*m+r) = I(ii+floor(m/2)-r+1, jj+floor(n/2)-c+1); endendend end end?
轉載于:https://www.cnblogs.com/jiangnanrain/p/3271050.html
《新程序員》:云原生和全面數字化實踐50位技術專家共同創作,文字、視頻、音頻交互閱讀總結
- 上一篇: Objective-C学习笔记2013[
- 下一篇: android AIDL服务