~mierle/libmv/trunk

« back to all changes in this revision

Viewing changes to test/make_robust_sixpointnview_data.py

  • Committer: Keir Mierle
  • Date: 2008-01-14 01:29:43 UTC
  • Revision ID: keir@cs.utoronto.ca-20080114012943-d58q3rh44tlredyf
More work on six point nview code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
from generatedata import *
 
2
nviews = 18
2
3
scene = NViewTestScene(
3
 
    nviews=10, npoints=50, dist=1.5,
 
4
    nviews=nviews, npoints=50, dist=1.5,
4
5
    fx=3000, fy=3000,
5
6
    ax=600, ay=600,
6
7
    sigma=0.00)
7
8
 
 
9
# 2D projections are roughly in [0,1200]
8
10
x = vstack([xx[:2,:] for xx in scene.x]).T
9
11
 
10
 
# Make 20 of the 50 points outliers
11
 
for i in range(10):
12
 
    scene.x[i,:2,:20] += 10*(randn(2,20)-.5)
 
12
# Make the first 20 of the 50 points outliers
 
13
noise_magnitude = 10
 
14
for i in range(nviews):
 
15
    scene.x[i,:2,:20] += noise_magnitude*(randn(2,20)-.5)
13
16
 
14
17
x_noisy = vstack([xx[:2,:] for xx in scene.x]).T
15
18