opExtend Symmetric extension operator.
opExtend(P,Q,PEXT,QEXT) creates an extension operator that acts on a
"vectorized" matrix and appends a mirror symmetric boundary to the
right and bottom portions of matrix. The original matrix is of size
PxQ. The operator generates a matrix that is PEXTxQEXT matrix. The
adjoint of the operator creates a PxQ matrix whose entries adjacent to
the extension border are twice the value of the entries of the original
matrix.
Q QEXT
*************++++++
* * +
* * +
* * +
P ************* +
+ +
PEXT +++++++++++++++++++
Example 1. Extend a 2-by-3 matrix into a 4-by-6 matrix:
A = [1 2 3; 4 5 6];
E = opExtend(2, 3, 4, 6);
reshape(E*A(:),4,6)
Example 2. Requires imaging toolbox:
I = double(imread('cameraman.tif'));
E = opExtend(256,256,650,1400);
Isup = reshape(E*I(:),650,1400);
figure; imshow(uint8(Isup));