File: datasets.py

package info (click to toggle)
python-dtcwt 0.14.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 8,588 kB
  • sloc: python: 6,287; sh: 29; makefile: 13
file content (11 lines) | stat: -rw-r--r-- 401 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
import os
import numpy as np

def regframes(name):
    """Load the *name* registration dataset and return source and reference frame."""
    frames = np.load(os.path.join(os.path.dirname(__file__), name + '.npz'))
    return frames['f1'], frames['f2']

def mandrill():
    """Return the "mandrill" test image."""
    return np.load(os.path.join(os.path.dirname(__file__), 'mandrill.npz'))['mandrill']