The 3D object recognition from a single or multiple 2D images is a very important problem in the computer vision field with a wide range of real applications. Considering the affine camera model, the main issue in solving this problem is the matching process between the object's 3D points and their 2D projections. In this work, we tackle the 3D-2D matching problem. It is formulated as a finite set of independent linear programs, solved efficiently. The 2D-2D and 3D-3D are also discussed. To show the validity of the proposed method, synthetic and real experiments are performed.