water drip timing detection algorithm using camera