Method and device for detecting the water pollution