0

I'm trying to match images based on visual words (labeled key points within images). When comparing the simulated results to my theoretical results I get significant deviations, therefore I guess there must be a mistake in my theoretical probability calculation.

You can imagine two images as set of visual words (visual word names range from A to Z):

S1=SetImage1={A, B, C, D, E, F, G, H, I, J, L, M, N, O, Y, Z}
S2=SetImage2={A, L, M, O, T, U, V, W, X, Y, Z}

enter image description here

You can already see that some visual words occur in both sets (e.g. A, Z, Y,...). Now we separate the visual words into primary words and secondary words (see the provided image). Each primary word has a neighborhood of secondary words. You can see the primary words (red rectangles) and their secondary words (words within ellipse). For our example the primary word sets are as follows:

SP1=SetPrimaryWordsImage1={A, J, L}
SP2=SetPrimaryWordsImage2={A, L,}

We now randomly select a visual word img1VAL1 from the set SP1 and one word from the neighborhood of img1VAL1, i.e. img1VAL2=SelFromNeighborhood(img1VAL1) resulting into a pair PairImage1={img1VAL1, img1VAL2}. We do the same with the second image and get PairImage2={img2VAL1, img2VAL2}.

Example: from Image1 we select A as primary visual word and C as secondary word since C is within the neighborhood of A. We get the pair {A, C}

from Image2 we select also A as primary visual word and Z as secondary word. We get the pair {A, Z}

{A,C} != {A,Z} and therefore we have no match. But what is the probability that randomly selected pairs are equal?

Mad A.
  • 401
  • 4
  • 11

1 Answers1

0

The probability is this:

A={1, 2, 3, 4}, B=A={1, 2, 3}

intersection C=A int B={1, 2, 3}

Number of possible pairs out of intersection = 3-choose-2 (binomial)

number of all possibilities=|A|-choose-2 * |B|-choose-2

therefore probability

|intersection|-choose-2/(|A|-choose-2 * |B|-choose-2)
gpasch
  • 2,672
  • 3
  • 10
  • 12