This is a great example of why it's critical to test raw data and not just depend on "it looks right". Yes, the image changed, but not correctly.
Can't see the forest for the trees? ;-) No, I don't think it's the math. TBH, I didn't check the math because I see a bigger, common problem with the logic. The code is corrupting the data used to ...
Tried many times to fix and check Blur image section by check50 but keeps giving errors. I removed and reinstalled the filter folder, retyped code and voila check50 gave all four sections GREEN.
Results for cs50/problems/2021/x/filter/less
:) helpers.c exists
:) filter compiles
:) grayscale correctly filters single pixel with whole number average