haar feature implementation in C