This code calculated the LDP histogram and is based on B Zhang, Y Gao, S Zhao & J Liu, "Local Derivative Pattern Versus Local Binary Pattern: Face Recognition With High-Order Local Pattern Descriptor," Image Processing, IEEE Transactions on, vol.19, no.2,