Effective background subtraction algorithm for food inspection using a low-cost near infrared camera