# Gaussian Blur with multithreading in C

- Reading in an image file into a single or 2D array
- Applying Gaussian filter on image
- Using multithreading appropriately to apply Gaussian filter
- Using dynamic memory – malloc
- Outputting the correct image with Gaussian Blur applied

### if you have a 5x5 image such as the following (be aware that the coordinate values will depend on how you format your 2D array):

The shaded region above represents the pixel we want to blur, in this case, we are focusing on pixel 1,2 (x,y) (Centre of the matrix). to apply the blur for this pixel, you would sum all the Red values from the surrounding coordinates including 1,2 (total of 9 R values) and find the average (divide by 9). This is now the new Red value for coordinate 1,2. You must then repeat this for Green and Blue values. This must be repeated throughout the image. If you are working on a pixel which is not fully surrounded by pixels (8 pixels), you must take the average of however many neighbouring pixels there are.