rudimentary error handling to detect when the camera is not available
store images in memory instead of processing each frame on the fly; implement dynamic brightness detection