perhaps you should explain the properties of murky water.
it doesn’t “blur”. trying to detect edges seems pointless to me.
murky water scatters some light (in addition to water itself attenuating light by wavelength). what’s arriving in the camera is an attenuated view of your reference object, some haloing from that light scattering against the medium, and some diffuse flat contribution (media scattering) from far away light sources (sky).
in your place, I’d make a reference object with a few features. you’d want a large black area to estimate ambient light (which you’d then have to subtract from everything else). you’d want a small white dot on a large black area to estimate direct transmission excluding scattering of the same light. and you’d want a large white area to estimate direct transmission including scattering of the same light.
and then you wouldn’t want to “find” those features, you’d wanna know where they are in the picture already, by construction/calibration.
if you want decent measurements, you’d have to figure out how to get raw sensor values out of your camera sensor.
all of that could also be made with a bunch of cheap electronics: photo diodes as sensors, leds/lasers to actively emit light. and everything in a tube to easily shield against ambient light, or else you’d have to estimate that again.
water quality sensors exist. there must be written a lot on their operating principles and construction, and they’re probably trivial to buy, but maybe not terribly cheap.