Changes for expo

This commit is contained in:
Ruben 2019-02-05 17:48:40 +01:00
parent d5823a0a8d
commit b5e63b9fd0

View file

@ -76,7 +76,12 @@ coloredlogs.install(
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
# Read Image # Read Image
#c = cv2.VideoCapture(args.camera)
c = cv2.VideoCapture(args.camera) c = cv2.VideoCapture(args.camera)
c.set(3, 1280)
c.set(4, 720)
#c.set(3, 480)
#c.set(4, 320)
# im = cv2.imread("headPose.jpg"); # im = cv2.imread("headPose.jpg");
@ -89,6 +94,7 @@ screenDrawCorners = np.array([[10,60], [90, 60], [10, 110], [90, 110]])
# metrics matrix # metrics matrix
metricsSize = [1920,1080] metricsSize = [1920,1080]
metricsSize = [1280,800]
dataframe = pd.DataFrame(columns=['x','y']) dataframe = pd.DataFrame(columns=['x','y'])
metrics = np.zeros((metricsSize[1], metricsSize[0])) # (y, x) metrics = np.zeros((metricsSize[1], metricsSize[0])) # (y, x)
screenDrawCorners = np.array([[0,0], [1919,0], [0, 1079], [1919,1079]]) screenDrawCorners = np.array([[0,0], [1919,0], [0, 1079], [1919,1079]])
@ -225,11 +231,11 @@ if not args.hide_graph:
canvas.get_tk_widget().pack(side=Tk.TOP, fill=Tk.BOTH, expand=1) canvas.get_tk_widget().pack(side=Tk.TOP, fill=Tk.BOTH, expand=1)
imageWindowRoot = Tk.Toplevel() imageWindowRoot = Tk.Toplevel()
imageWindowSize = (1000,1000) imageWindowSize = (1280,800)
imageWindowRoot.geometry('%dx%d+%d+%d' % (imageWindowSize[0],imageWindowSize[1],0,0)) imageWindowRoot.geometry('%dx%d+%d+%d' % (imageWindowSize[0],imageWindowSize[1],0,0))
imageWindowRoot.attributes("-fullscreen", True) imageWindowRoot.attributes("-fullscreen", True)
# imageCanvas is where the heatmap image is drawn # imageCanvas is where the heatmap image is drawn
imageCanvas = Tk.Canvas(imageWindowRoot,width=1000,height=1000) imageCanvas = Tk.Canvas(imageWindowRoot,width=1280,height=800)
imageCanvas.pack() imageCanvas.pack()
imageWindowRoot.lift() imageWindowRoot.lift()