# Revision history [back]

### Generate intrinsic matrix from exif values

Hi all! I'm trying to find the Essential Matrix in order to find the movement of one camera according to another.

I calculate F using SIFT matches, then findFundamentalMat with ransac to remove outliers then findFundamentalMat with LMEDS. The results seems good (the equation xEx' = 0 is nearly verified for each pairs (x,x'). Now, I would like to calculate E, using the formula E = K^(_2)^(t)FK^(_1). Since I don't know which camera was used to generate photos, I would like to create K from scratch, but without any way to calibrate it, so I would like to use Exif values to create it. Actually i'm doing so : K =
Fx 0 Cx
0 Fy Cy
0 0 1
with (Cx, Cy) = (image.width/2, image.height/2) (I have to assume that the principale point is the middle of the image).

But for (Fx, Fy) actually i'm really not sure of what I'm doing...

Fx = focal_length(mm) * X_res(DPI) / 25.4 (because 1inch = 25.4mm) and Fy = focal_length(mm) * Y_res(DPI) / 25.4

1^(st), i'm not sure if the formula is good and 2^(nd), I saw that openCV want pixel instead of mm for matrix but I don't understand...

Can someone help me?

Thanks!

### Generate intrinsic matrix from exif values

Hi all! I'm trying to find the Essential Matrix in order to find the movement of one camera according to another.

I calculate F using SIFT matches, then findFundamentalMat with ransac to remove outliers then findFundamentalMat with LMEDS. The results seems good (the equation xEx' = 0 is nearly verified for each pairs (x,x'). Now, I would like to calculate E, using the formula E = K^(_2)^(t)FK^(_1). K'(t)FK. Since I don't know which camera was used to generate photos, I would like to create K from scratch, but without any way to calibrate it, so I would like to use Exif values to create it. Actually i'm doing so : K =
Fx 0 Cx
0 Fy Cy
0 0 1
with (Cx, Cy) = (image.width/2, image.height/2) (I have to assume that the principale point is the middle of the image).

But for (Fx, Fy) actually i'm really not sure of what I'm doing...

Fx = focal_length(mm) * X_res(DPI) / 25.4 (because 1inch = 25.4mm) and Fy = focal_length(mm) * Y_res(DPI) / 25.4

1^(st), 1st, i'm not sure if the formula is good and 2^(nd), 2nd, I saw that openCV want pixel instead of mm for matrix but I don't understand...

Can someone help me?

Thanks!

 3 None berak 32993 ●7 ●81 ●312

### Generate intrinsic matrix from exif values

Hi all! I'm trying to find the Essential Matrix in order to find the movement of one camera according to another.

I calculate F using SIFT matches, then findFundamentalMat with ransac to remove outliers then findFundamentalMat with LMEDS. The results seems good (the equation xEx' = 0 is nearly verified for each pairs (x,x'). Now, I would like to calculate E, using the formula E = K'(t)FK. Since I don't know which camera was used to generate photos, I would like to create K from scratch, but without any way to calibrate it, so I would like to use Exif values to create it. Actually i'm doing so : :

K =
Fx  0  Cx
0   Fy  Cy
0    0   1
0    0   1


with (Cx, Cy) = (image.width/2, image.height/2) (I have to assume that the principale point is the middle of the image).

But for (Fx, Fy) actually i'm really not sure of what I'm doing...

Fx = focal_length(mm) * X_res(DPI) / 25.4 (because 1inch  = 25.4mm)


and

Fy = focal_length(mm) * Y_res(DPI) / 25.425.4


1st, i'm not sure if the formula is good and 2nd, I saw that openCV want pixel instead of mm for matrix but I don't understand...

Can someone help me?

Thanks!

### Generate intrinsic matrix from exif values

Hi all! I'm trying to find the Essential Matrix in order to find the movement of one camera according to another.

I calculate F using SIFT matches, then findFundamentalMat with ransac to remove outliers then findFundamentalMat with LMEDS. The results seems good (the equation xEx' = 0 is nearly verified for each pairs (x,x'). Now, I would like to calculate E, using the formula E = K'(t)FK. Since I don't know which camera was used to generate photos, I would like to create K from scratch, but without any way to calibrate it, so I would like to use Exif values to create it. Actually i'm doing so :

K =
Fx  0  Cx
0   Fy  Cy
0    0   1


with (Cx, Cy) = (image.width/2, image.height/2) (I have to assume that the principale point is the middle of the image).

But for (Fx, Fy) actually i'm really not sure of what I'm doing...

Fx = focal_length(mm) * X_res(DPI) / 25.4 (because 1inch  = 25.4mm)


and

Fy = focal_length(mm) * Y_res(DPI) / 25.4


1st, i'm not sure if the formula is good and 2nd, I saw that openCV want pixel instead of mm for matrix but I don't understand...

Can someone help me?

Thanks!