comparison pymctf.py @ 1:b67c5ec1a9f0

import only needed modules
author Peter Meerwald <pmeerw@cosy.sbg.ac.at>
date Thu, 06 Sep 2007 14:15:54 +0200
parents 4214d9245f8e
children f22cbbbb6814
comparison
equal deleted inserted replaced
0:4214d9245f8e 1:b67c5ec1a9f0
1 # MCTF following Ohm04a 1 # MCTF following Ohm04a
2 2
3 import Image
4 import ImageDraw
5 import pywt 3 import pywt
6 import numpy 4 import numpy
7 import math 5 import math
8 import sys 6 import sys
9 import time
10 import _me 7 import _me
11 8
12 # type of motion vectors 9 # type of motion vectors
13 UNCONNECTED = -(sys.maxint) 10 UNCONNECTED = -(sys.maxint)
14 CONNECTED = -(sys.maxint-1) 11 CONNECTED = -(sys.maxint-1)
139 L[rm:rm+bs,cm:cm+bs] + 0.5 * _H) 136 L[rm:rm+bs,cm:cm+bs] + 0.5 * _H)
140 137
141 return a, b 138 return a, b
142 139
143 def _show_mv_dist(mvf, idx=0, level=0, sr=8, fname='mv_dist'): 140 def _show_mv_dist(mvf, idx=0, level=0, sr=8, fname='mv_dist'):
141 import Image, ImageDraw
144 im = Image.new('RGB', (mvf.shape[1], mvf.shape[0])) 142 im = Image.new('RGB', (mvf.shape[1], mvf.shape[0]))
145 d = ImageDraw.Draw(im) 143 d = ImageDraw.Draw(im)
146 144
147 for r in xrange(mvf.shape[0]): 145 for r in xrange(mvf.shape[0]):
148 for c in xrange(mvf.shape[1]): 146 for c in xrange(mvf.shape[1]):

Repositories maintained by Peter Meerwald, pmeerw@pmeerw.net.