function ij = p2d_map_obj2im(P2D, xy)
	% xy = p2d_map_im2obj(P2D, ij)
	%
	% using the 2D pinhole model P2D
	% map object space coordinates xy to image space coordinates ij
	%
	% input:
	%    P2D				3 x 3 matrix representing 2D pinhole model
	%    xy				2 x N array of marker locations in object space
	%						which lie on the x-y plane   
	% output:
	%    ij				2 x N array of marker locations in image space
	%						which lie on the i-j plane
	
	ij_tilde			= P2D * [xy; ones(1,size(xy,2))];
	ij					= [ij_tilde(1,:) ./ ij_tilde(3,:);
							ij_tilde(2,:) ./ ij_tilde(3,:)];
end
