Water Level Detection
Given a Reigon of interest, the water level can be estimated for preventing flood. There are three ways to detect the water level that I implemented - texture, optical flow, and matting methods.
Using Optical Flow
When the current of water is strong, the optical flow of the ROI is useful to detect the water level. I implemented  for this, and the optical flow is calculated in each patch of the ROI. As a result, a kind of probaility map for water is created. It can be used as a water mask. This is a time consuming algorithm due to the optical flow estimation as the ROI is getting large, but it is the most intuitive way to detect the water level when the flow is obvious. Considering we want to detect the flood after all, it is a reasonable assumption that the flow would be strong when we use this algorithm.
There may be the light or shadow which is obstructing the correct detection. For this situation, the only ripple shape or feature can be extracted in the water image. In , it is possible that the strong ripple can be estimated column by column which is pre-determined using Local Binary Patterns. The middle image is the LBP of the left image which has ripples as above. From this LBP, the ripple line can be estimated as the red lines of the right image. The pixels below this lines can be considered as a water mask.
Matting is well-known algorithm for foreground detection. It can separate a complex object such as hair or fur from the background image. This can be applied to detect the water level becuse we can see the water area as the foreground. In , the authors suggest a probabilitic way to estimate matte, and it seems to be great to detect the water level in terms of the performance. The middle image is the estimated matte from the left image, and the right image is the extracted foreground.
 Mettes, P., Tan, R. T., Veltkamp, R. C., Water Detection through Spatio-Temporal Invariant Descriptors, 2015
 Kaiming He, Christoph Rhemann, Carsten Rother, Xiaoou Tang, Jian Sun, A Global Sampling Method for Alpha Matting, 2011