function I2 = replicateConv(I, F)
% do a convolution with replicated bounds.

[Frow, Fcol] = size(F);
deltay = Frow;
deltax = Fcol; %ceil(Fcol/2)+1;

repI = replicateBounds(I, deltax, deltay);
repI2 = filter2(F, repI);
[Irow, Icol] = size(I);
I2 = repI2((deltay+1):(deltay+Irow), (deltax+1):(deltax+Icol));
