patched error

patched error where program crashed when phone (and camera) was laid
flat on table (where camera sees all black)

Still need to optimise algorithm to not do training data every frame