Efficient people counting in thermal images