title: Matlab: Increase the pixel size (decrease the spatial resolution) of a satellite image by applying a Gaussian filter with a (large) width
body: <p><strong>The goal</strong></p>
  <p>I am trying to simulate coarse data <em>as though they were measured with a coarse PSF</em> (point spread function).</p>
  <p><strong>The data</strong></p>
  <p>I have a satellite image with 15m pixel size and I want to upscale it to 460 using a <code>Gaussian filter</code>. To do this I need to apply a transfer function (TF; e.g., Gaussian) to the fine data, but with a very large width. This produces the coarse data.</p>
  <p>I came across the function <code>iamgaussfilt</code> but the output is an image with the same pixel size as my input. Is there any other function that takes as input a fine resolution image, applies a <strong>Gaussian TF</strong> and produces a coarse spatial resolution image?</p>
  <p>To make my problem even more clear, I am following the paper '<em>The effect of the point spread function on downscaling continua</em>'. All in all, the authors wanted to downscale a coarse satellite image using an ancillary fine spatial resolution variable. The downscaling consists of two steps:</p>
  <ol>
  <li>regression</li>
  <li>kriging on regressions residuals</li>
  </ol>
  <p>During the regression, they had to upscale the fine resolution image to match the pixel size of the coarse resolution image and then they performed the regression. This upscaling <strong>had to be done using the PSF</strong>. The image below illustrates my problem as well.</p>
  <p><a href="https://i.stack.imgur.com/UYbjx.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UYbjx.jpg" alt="problem" /></a></p>
  <p>I am trying to use the <code>imfilter</code> function but the output seems to be the same as the input in terms of dimensions (i.e., pixel size). But, I have found this <a href="https://uk.mathworks.com/matlabcentral/answers/430031-how-to-i-apply-gaussian-filter-on-images-in-matlab" rel="nofollow noreferrer">post</a> where they use the <code>imresize</code> function to change the resolution of the filtered image. I was wondering if that's the right way to upscale (decrease the spatial resolution) an image using a <code>Gaussian filter</code> or I can do it, <strong>only</strong> by using the <code>imfilter</code>.</p>
  <p>Here is my code, based on the post I found:</p>
  <pre><code>ntl = imread('ntl.tif');
  r = imread('pan15.tif');
  figure()
  imshow(r);
  kernel = fspecial('gaussian', [7 7], 1.6);
  blurredImage = imfilter(r, kernel);
  downSample = imresize(blurredImage, [91 48]); % dimensions based on the ntl img 
  imshow(downSample);
  figure()
  imshow(downSample);
  </code></pre>
  <p>And here is the output:</p>
  <p><a href="https://i.stack.imgur.com/NZs7Z.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NZs7Z.png" alt="output" /></a></p>
  <p>I was wondering if I am on the right path to degrade the spatial resolution or not. If not, how should I proceed? From <a href="https://drive.google.com/drive/folders/18_1Kshb8WbT04gwOw4d_xhfQenULDXdB?usp=sharing" rel="nofollow noreferrer">here</a> you can download the image.</p>