Created
May 6, 2014 02:18
-
-
Save TakashiNakagawa/e827041dfa8259e60110 to your computer and use it in GitHub Desktop.
computer vision5章
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
from PIL import Image | |
from pylab import * | |
import camera | |
# 画像を読み込む | |
im1 = array(Image.open('images/001.jpg')) | |
im2 = array(Image.open('images/002.jpg')) | |
# 各画像上の2D点をリストに読み込む | |
points2D = [loadtxt('2D/00'+str(i+1)+'.corners').T for i in range(3)] | |
# 3D点を読み込む | |
points3D = loadtxt('3D/p3d').T | |
# 対応関係を読み込む | |
corr = genfromtxt('2D/nview-corners',dtype='int',missing='*') | |
# カメラパラメータをCameraオブジェクトに読み込む | |
P = [camera.Camera(loadtxt('2D/00'+str(i+1)+'.P')) for i in range(3)] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment