2
$\begingroup$

I have several cameras in space; each pixel in an image of a camera corresponds to a ray in 3D space, starting at the position of the camera and with direction depending on which pixel it is. I want to create a distance function between those rays that gives an intuition about how likely it is that two pixels (either from the same camera or different cameras) could be looking at the same object (we never know if they are actually doing so since we're missing one dimension).

Here's an example: example

  • A,B,C,D are the positions of the cameras. A pixel in a photo made by one of them defines a ray of where that pixel could come from.
  • Intuitively it's practically impossible that the C-blue ray and the B-blue ray come from the same object because those rays never come close.
  • Similarly the red and orange ray from B are also unlikely to come from the same object even though the rays intersect. We are making the assumption that cameras are at least some distance (1 meter) from what they're looking at.
  • The C-green and A-blue rays come very close; thus it's likely they could look at the same object.
  • Same for B-orange, B-blue since they share a camera and the angular distance is very close.

Goal Designing a distance function that gives small distance between those rays that could be looking at the same object and a big distance for those that cannot.

Thus, a first attempt is picking the distance in Euclidean space between the rays: $$d(r_1,r_2) = min_{(p_1,p_2)\in (r_1,r_2)} dist(p_1,p_2)$$

This has a problem: two rays from the same camera have distance 0, which is not desired.

A second option is to restrict the minimization to points that are at least one meter from the camera. However we still have a problem with triangular inequality: for any pair of rays A,B we could find another ray C (actually many) that crosses both, thus: $$d(A,C) = d(B,C) = 0$$ using the triangular inequality we have: $$d(A,B) \leq d(A,C)+d(B,C) = 0 \Rightarrow d(A,B) = 0$$ and everything is at distance 0.

Any way to fix it or of creating a distance function that captures this idea of two pixels coming from the same object?

Thanks!

$\endgroup$
4
  • $\begingroup$ The distance is angular. If you will explain how you plan to use the "distance" you might get a more practical response. $\endgroup$
    – Moti
    Commented Apr 29, 2017 at 1:06
  • $\begingroup$ Are the cameras randomly placed? Do they view in all directions? $\endgroup$ Commented Apr 29, 2017 at 9:25
  • $\begingroup$ I've added a visual example with explanations. Cameras are arbitrarily (though not randomly) placed and in principle look in all directions. In practice I want cameras on the walls looking all at the same room, but most likely this subcase cannot be exploited. $\endgroup$
    – etal
    Commented Apr 29, 2017 at 19:38
  • $\begingroup$ I think that you already have answered your question, because your arguments about triangular inequality can be applied to any distance $d$ to show that it is not suitable, isn’t it? $\endgroup$ Commented Apr 30, 2017 at 3:36

0

You must log in to answer this question.

Browse other questions tagged .