예제 #1
0
def run():
    if not os.path.isdir(OUTPUT):
        os.makedirs(OUTPUT)
    if not os.path.isdir(INPUT):
        die('No directory named `%s` found.' % (INPUT))
    files = glob.glob('input/*.avi')
    for filename in files:
        base = os.path.basename(filename)
        outbase = os.path.join(OUTPUT, base)
        firstframe =outbase+'.first.tif' 
        if not os.path.exists(firstframe):
            first(filename, firstframe)
        contourpath =outbase+'.contours.pkl'
        if not os.path.exists(contourpath):
            contours(filename, contourpath)
        pathspath = outbase+'.path.pkl'
        if not os.path.exists(pathspath):
            path(contourpath, pathspath)
        circlespath = outbase + '.circ.tif'
        if not os.path.exists(circlespath):
            circularity(pathspath, circlespath)
        motionpath = outbase+'.motion.avi'
        if not os.path.exists(motionpath):
            showmotion(filename, 
                       pathspath,
                       motionpath)
    jsonify('input', 'output')
    makecsv()
예제 #2
0
def testCircle(base):
    first(base, base+'.path.png')
    contours(base, base+'.contour.pkl')
    path(base+'.contour.pkl', base+'.path.pkl')
    showmotion(base, 
               base+'.path.pkl',
               base+'.motion.avi')