Almost vanishing polynomials and an application to the Hough transform