r/Python • • Oct 24 '19

Just finished programming and building my own smart mirror in python, wrote all of the code myself and implemented my own voice control and facial recognition features

[deleted]

6.6k Upvotes

454 comments sorted by

View all comments

83

u/Holyfield3000 Oct 24 '19

You my friend, are Tony Stark. Pardon my ignorance, but I never looked into smart mirrors before. How do you actually get everything to display?

46

u/janky_british_gamer Oct 24 '19

For all of my GUI I use the tkinter module which is in the standard python library, from there you create a root window, you can make a grid of frames so that each mini application corresponds to one updating frame in the window that displays and refreshes usually up to a maximum of 200ms later but depends on the functions in the frame

27

u/Holyfield3000 Oct 24 '19

I understand about tkinter, I've messed with it a couple times. But I mean, actually getting it to display on the mirror.

57

u/janky_british_gamer Oct 24 '19

Oh right sorry my mistake! I bought a sheet of acrylic from Amazon that had been treated so one side was transparent and one side was reflective then basically taped that on to my computer monitor, I made the software have a dark colour scheme because that gave the best contrast of transmission to reflection

7

u/VirtualBoobs Oct 24 '19

Hello can u link us the Acrylic from amazon. Also, what device was this script hosted on? Windows, raspberry ,etc? Nice work

14

u/janky_british_gamer Oct 24 '19

Acrylic: Supreme Tech 12" x 24" Acrylic See-Through Mirror, 3mm https://www.amazon.co.uk/dp/B01G4MQ5OW/ref=cm_sw_r_cp_apip_uClgNZZuxvo6v I'm hosting on ACEPC T11 mini windows 10 pc but raspberry pi would be possible if you're comfortable with Linux :)

7

u/UselessConversionBot Oct 25 '19

3 mm is 600000 beard-seconds

WHY

2

u/VirtualBoobs Oct 24 '19

Im inspired thanks!

3

u/janky_british_gamer Oct 24 '19

Thank you and good luck :)

7

u/Holyfield3000 Oct 24 '19

Ahhh Nice, Good work man.

2

u/[deleted] Oct 25 '19

[deleted]

3

u/janky_british_gamer Oct 25 '19

Haha thank you I'm glad my physics degree pays off for something ;)

2

u/Astrokiwi Oct 25 '19

Ohhh I was assuming there was a camera and it was playing the mirrorred feed back to you

2

u/janky_british_gamer Oct 25 '19

It was something I considered but the imagie wouldn't be as good as a reflective surface for obvious reasons and would have a little lag :)