A Generalized Hough-like Transformation for Shape Recognition