Use uint8 type for simple moments functions