Background
Currently, I need to perform Gaussian filtering on images, but I want to avoid using MATLAB's built-in functions. Given an image of size N x N, my idea is to construct a sparse matrix where both dimensions are N*N. Each column of this matrix should contain the values of the Gaussian kernel related to the current pixel.
Task
- Implement the construction of such a sparse matrix for Gaussian filtering.
- The matrix should be of size NN x NN, where N is the image width/height.
- Each column should represent the Gaussian kernel for the corresponding pixel.
- The solution should not use MATLAB's built-in Gaussian filtering functions.
Expected Outcome
- MATLAB or Python code to create and apply the sparse matrix for filtering.
- Comments explaining the construction and application process.
- An example usage demonstrating the filter on a sample image.
Additional Notes
- This issue is for algorithm implementation and should avoid built-in high-level Gaussian filter functions.
- The approach should be efficient and leverage sparse matrix operations for large images.
Background
Currently, I need to perform Gaussian filtering on images, but I want to avoid using MATLAB's built-in functions. Given an image of size N x N, my idea is to construct a sparse matrix where both dimensions are N*N. Each column of this matrix should contain the values of the Gaussian kernel related to the current pixel.
Task
Expected Outcome
Additional Notes