Example #1
0
    path = filedialog.askopenfilename(filetypes=typ, initialdir=dir)
    videoPath = path[:path.rfind('/')]

    videolist = glob.glob(videoPath[:videoPath.rfind('/')] + "/*")

    print('Process all the files? (yes, no) :', end=" ")
    flag = input()

    if flag == 'yes':
        for i in videolist:
            savePath = i
            dirName = videoPath[videoPath.rfind('/', 0, videoPath.rfind('/')) +
                                1:]
            path = i + '/pointData_' + i[i.rfind('/') + 1:] + '.txt'
            print(savePath, path)
            make_dirs.deleteDir(savePath, '/fft')
            make_dirs.deleteCatDir(savePath, '/toFirstErrorFFT')

            f = open(path, "rb")
            zahyou = pickle.load(f)

            doGet(zahyou, savePath)
    else:
        savePath = path[:path.rfind('/')]
        dirName = videoPath[videoPath.rfind('/', 0, videoPath.rfind('/')) + 1:]
        print(savePath, path)
        make_dirs.deleteDir(savePath, '/fft')
        make_dirs.deleteCatDir(savePath, '/toFirstErrorFFT')

        f = open(path, "rb")
        zahyou = pickle.load(f)
Example #2
0
    flag = input()

    if flag == 'yes':
        for i in videolist:
            savepath = i
            print(savepath)

            videoName = i[i.rfind('/') + 1:-4]

            dirName = videoDir[videoDir.rfind('/', 0, videoDir.rfind('/')) +
                               1:]
            path = i + '/pointData_' + i[i.rfind('/') + 1:] + '.txt'
            print(savepath, path)
            dirList = ['cat1', 'cat2', 'cat3', 'cat4']
            for d in dirList:
                make_dirs.deleteDir(savepath, '/' + d + '/vec')
                make_dirs.deleteDir(savepath, '/' + d + '/error')

            f = open(path, "rb")
            zahyou = pickle.load(f)

            a = todo(zahyou, savepath)

    else:
        savepath = path[:path.rfind('/')]
        print(savepath, path)
        videoName = path[path.rfind('/') + 1:-4]
        dirList = ['cat1', 'cat2', 'cat3', 'cat4']
        for d in dirList:
            make_dirs.deleteDir(savepath, '/' + d + '/vec')
            make_dirs.deleteDir(savepath, '/' + d + '/error')
Example #3
0
    flag = input()

    if flag == 'yes':
        for i in videolist:
            savepath = i
            print(savepath)

            videoName = i[i.rfind('/') + 1:-4]

            dirName = videoDir[videoDir.rfind('/', 0, videoDir.rfind('/')) +
                               1:]
            path = i + '/pointData_' + i[i.rfind('/') + 1:] + '.txt'
            print(savepath, path)
            dirList = ['cat1', 'cat2', 'cat3', 'cat4']
            for d in dirList:
                make_dirs.deleteDir(savepath, '/' + d + '/vec')
                make_dirs.deleteDir(savepath, '/' + d + '/error')

            f = open(path, "rb")
            zahyou = pickle.load(f)

            a = todo(zahyou, savepath)

    else:
        print(path, path)
        videoName = path[path.rfind('/') + 1:-4]
        dirList = ['cat1', 'cat2', 'cat3', 'cat4']
        for d in dirList:
            make_dirs.deleteDir(path[:path.rfind('/')], '/' + d + '/vec')
            make_dirs.deleteDir(path[:path.rfind('/')], '/' + d + '/error')