Unformatted text preview: % between four different mappings in order to eliminate boundary artifacts. % It uses a division; since division is often an expensive operation, I added code to % perform a logical shift instead when feasible. % subImage = zeros(size(subBin)); num = XSize * YSize; for i = 0:XSize-1 inverseI = XSize - i; for j = 0:YSize-1 inverseJ = YSize - j; val = subBin(i+1,j+1); subImage(i+1,j+1) = fix((inverseI*(inverseJ*LU(val) + j*RU(val)) . .. + i*(inverseJ*LB(val) + j*RB(val)))/num); end end e...
View Full Document
- Spring '10
- new greylevel assignments, image submatrix