Generation of lbp histogram