function res=lane2im(A,r,c)

[nr,nc]=size(A)
res =zeros(r,c);

for io=1:nc;
	for jo=1:min(nr,r);
		cpos=A(jo,io);
		if (cpos > 0 ) & (cpos < c)
			res(jo,cpos)=io;
		end;
	end;
end;
end;

