So this is my first time using Stack Exchange, I have been relying on reddit so far for cs50 however I am stuck on blur. Someone on reddit told me I have to "create a temporary container that is the size of the original image, and then using nested for loops fill that container with the same image" however I do not know how to do that. I wanted to use pseudocode to try to explain what I imagine the code I have written for blur is doing.
[code removed per academic honesty guidelines. If anyone wants to help and needs to see it, you can use the edit button]
Enter row (
Enter column (
Defines a matrix (the for loop's of
Restricts the matrices to not go out of bounds (x and y
ifstatements) if the matrix is 2x6 or 3x3 it stays within those parameters
!! here is where I am going lost, as I do not know how to assign each image[i][j] (pixel) to a temporary variable "elements" in the case of my code. Unless I was to do red elements/blue elements/green elements and use image[i][j].rgbtRed...Green...Blue for instance ¡¡
i also do not know where to insert my incrementing variable, much less how to write that variable
If anyone has any ideas I would greatly appreciate, I know my code as well as pseudocode most likely contain issues, I have been stuck for a few weeks now!