function [b_adjacent, re_bb_lim] = check_adjacency(camA, camB, re_lim)
	%	check_adjacency(A, B, re_lim)
	%	
	%	check whether cameras A and B share a field of view within
	%	the limits re_lim
	%
	%	Input:
	%		camA	1x1	camera model structure
	%		camB	1x1	camera model structure
	%		re_lim	2x3	limits on reconstruction
    %
    %   Output:
    %       b_adjacent  1x1     boolean flag, true if cameras share FOV
    %       re_bb_lim   2x3     limits on reconstruction
	
	%% evaluate whether there is a solution
	M_A			= frustum(camA).';
	M_B			= frustum(camB).';
	
	A			= -[M_A(1:3,:), M_B(1:3,:)].';
	b			=  [M_A(4  ,:), M_B(4  ,:)].';
	opts				= optimoptions('linprog', 'Display', 'off');
	[x,fval,flag,output,lambda] = linprog(ones(3,1),A,b,[],[],re_lim(1,:).', re_lim(2,:).', opts);
	b_adjacent	= flag > 0;
    re_bb_lim   = zeros(2,3);
    
    if ~b_adjacent
        return;
    end
    
    %% find limits on reconstructed volume between two cameras
    I           = eye(3);
    for i = 1 : 3
        e_i              = I(:,i);
        re_bb_lim(1,i)	= dot(e_i, linprog(+e_i, A, b, [], [], re_lim(1,:).', re_lim(2,:).', opts));
        re_bb_lim(2,i)	= dot(e_i, linprog(-e_i, A, b, [], [], re_lim(1,:).', re_lim(2,:).', opts));
    end
end
