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