5

People familiar with Homographies will know that you have to normalize it dividing by any of the matrix components in order to keep homogeneous coordinates. An homography is a 3x3 matrix and it is usually normalized dividing by the element at (3,3).

http://www.cg.tu-berlin.de/fileadmin/fg144/Courses/06WS/scanning/Dennis/Extrinsic%20calibration-Dateien/image006.jpg

The problem comes when that value is very small (for example 0.0000008) and divides a value that is supossed to be zero (0.0000007). The resulting value is almost 0.875 when it was supossed to be zero and the resulting projection has no sense.

I would like to know which is the common way to solve this. I use C++ and floating point arithmetic.

Aziz Shaikh
  • 16,245
  • 11
  • 62
  • 79
Jav_Rock
  • 22,059
  • 20
  • 123
  • 164
  • Umm, make sure your values aren't wrong in the first place? – Oliver Charlesworth Jun 07 '12 at 15:50
  • To expand on my facile comment, if you've already computed values that are of similar magnitude to the normalization value, then it's probably already too late. – Oliver Charlesworth Jun 07 '12 at 16:08
  • The last column is a position vector (x,y,z). The problem comes when z is close to cero. I am avoiding that case as much as possible. But I doubt I am the first having this problem, so there should be a way to choose the normalization elment, I mean, a common way, the good way to proceed. – Jav_Rock Jun 07 '12 at 16:49

1 Answers1

3

So, if i understand the question:

0/0.000000001 = 0   = CORRECT

and:

0.000000001/0.000000001 ~ 1    INCORRECT

I will define a function to check the error, with a parameter sigma.

If value < sigma = 0.001, assume its zero, and return 0, else, return value.

So, it will work always with value over the sigma error, and 0 if not.

Bojangles
  • 99,427
  • 50
  • 170
  • 208
vgonisanz
  • 11,831
  • 13
  • 78
  • 130