### How to estimate the homography matrix

Verfasst:

**14. Jul 2013 16:09**Hello,

I'm trying to estimate the homography-matrix by using the formulas in lecture 10, slide 20 and 21 but it doesn't work for me and by applying the homography-matrix H to an image, I'm getting the picture you see below.

What I did so far:

1) Estimating four correspondences and I checked them several times.

For the left image (p1) and the right image (p2) I have these points, where the 1.row contains the x- and the 2.row the y-values
2) Using the formulas on slide 21 for scaling and shifting the points. I received
3) Creating A-Matrix for SVD, I'm using the formula on slide 20 and receive
4) Denormalize as on slide 21 returns
I already tried a lot of things that didn't help to solve the problem and I have no clue what to try next. Do you have any idea what I can try next?

Thanks a lot!!!

Notschko

I'm trying to estimate the homography-matrix by using the formulas in lecture 10, slide 20 and 21 but it doesn't work for me and by applying the homography-matrix H to an image, I'm getting the picture you see below.

What I did so far:

1) Estimating four correspondences and I checked them several times.

For the left image (p1) and the right image (p2) I have these points, where the 1.row contains the x- and the 2.row the y-values

Code: Alles auswählen

```
p1=[
369 385 361 248
204 201 220 251
]
p2=[
171 185 163 47
202 199 217 248
]
```

Code: Alles auswählen

```
(p1) u=[
0.1301 0.2038 0.0933 -0.4271
-0.0691 -0.0829 0.0046 0.1474
]
(p2) u_=[
0.2171 0.3202 0.1583 -0.6956
-0.1067 -0.1288 0.0037 0.2319
]
```

Code: Alles auswählen

```
A=[
0 0 0 0.1301 -0.0691 1.0000 0.0139 -0.0074 0.1067
-0.1301 0.0691 -1.0000 0 0 0 0.0282 -0.0150 0.2171
0 0 0 0.2038 -0.0829 1.0000 0.0262 -0.0107 0.1288
-0.2038 0.0829 -1.0000 0 0 0 0.0652 -0.0265 0.3202
0 0 0 0.0933 0.0046 1.0000 -0.0003 -0.0000 -0.0037
-0.0933 -0.0046 -1.0000 0 0 0 0.0148 0.0007 0.1583
0 0 0 -0.4271 0.1474 1.0000 0.0990 -0.0342 -0.2319
0.4271 -0.1474 -1.0000 0 0 0 0.2971 -0.1025 -0.6956
]
```

Code: Alles auswählen

```
H=[
0.1174 0.0060 -56.7479
-0.1017 0.1684 -87.4186
0.0000 -0.0000 0.1514
]
```

Thanks a lot!!!

Notschko