Maritime environment represents a challenging scenario for automatic video surveillance due to the complexity of the observed scene: waves on the water surface, boat wakes, and weather issues contribute to generate a highly dynamic background. Moreover, an appropriate background model has to deal with gradual and sudden illumination changes, camera jitter, shadows, and reflections that can provoke false detections. Using a predefined distribution (e.g., Gaussian) for generating the background model can result ineffective, due to the need of modeling non-regular patterns. In this paper, a method for creating a “discretization” of an unknown distribution that can model highly dynamic background such as water is described. A quantitative evaluation carried out on two publicly available datasets of videos and images, containing data recorded in different maritime scenarios, with varying light and weather conditions, demonstrates the effectiveness of the approach.