1 | initial version |
Simply iterate over each pixel in your image and just use a variable that you increase after each operation to indicate which operation to apply on the current pixel (value stays, use pixel from 3x3 image, use pixel from 5x5 image).