title: Smooth-filtering image border to create circular image (fourier preparation)
body: <p>I learned how to do it yet couldn't remember now, and am failing to get something useful by searching. I have an image, and would like to use this image to create a larger image of size 3x3 by simply stacking them. The border had to be smoothed so that right edge of the image translates seamlessly to the left edge of the image. </p>
  
  <p><a href="https://i.stack.imgur.com/un1vY.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/un1vY.jpg" alt="enter image description here"></a></p>
  
  <p>Applying convolutional filter should be able to do it as it deems the image as circular, but how exactly should we do it? We could speak Matlab (or any other language you are comfortable speaking/typing). </p>
  
  <p>EDIT 1:
  I prefer only applying the filter to the border, while preserving the original image as much as possible.</p>
  
  <p>EDIT 2:
  I tried a gaussian filter. While it blurs the whole image, the edges became more salient compared to the blurry middle. 
  <code>imshow(repmat(imfilter(imread('un1vY.jpg'), fspecial('gaussian',64,8), 'circular'), [3 3]))</code></p>
  
  <p><a href="https://i.stack.imgur.com/FqISl.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FqISl.jpg" alt="enter image description here"></a></p>