`double scalar` is confusing since OpenCV defines `Scalar` as `Vec<double, 4>`;
I suggest `double val` instead.