-Wfloat-equal:
x = 0.3
y = 0.1 + 0.1 + 0.1
x == y // false
use this compiler option to show the reason of "==" is not fit for this comparison.
Code hygiene: prevent function parameters to be re-assigned by using 'const reference' for observing parameters.
Func(Image const& img)
Func(const Image& img)
Naming conventions:
Don't stomp on their universe, and they won't stomp on your code.