Algorithm for fringe pattern normalization