bug fix in LBP

In order to sum the result of the macro "SGN" (ex. SGN(1)* 2 + SGN(-1)*3)
casting to int was required