3D Template matching