local binary pattern implementation in C.