forked from kursawe/LECsegmenter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVisualize
More file actions
44 lines (37 loc) · 1.08 KB
/
Visualize
File metadata and controls
44 lines (37 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Dec 2 13:17:13 2019
@author: thibautgold
"""
import os, sys
import numpy as np
import cv2 as cv
from skimage.morphology import skeletonize
from random import randrange
from matplotlib import pyplot as plt
from scipy.signal import argrelextrema
import pickle as pickle
import easygui as gui
from xlwt import Workbook
with open('SAVED_WORK', 'rb') as infile:
outcome = pickle.load(infile)
def display(outcome):
cv.namedWindow('Press E to Exit')
frame_num=0
while(1):
k = cv.waitKey(1) & 0xFF
display_right=outcome[frame_num][0]
display_left=outcome[frame_num][3]
display= np.hstack((display_left,display_right))
cv.imshow('Press E to Exit',display)
cv.moveWindow('Press E to Exit',150,10)
if k ==ord('p'):
if frame_num<(len(outcome)-1):
frame_num+=1
if k==ord('o'):
if frame_num>0:
frame_num-=1
if k==ord('e'):
break
display(outcome)