Added a "detection threshold" input field beneath the image, and tied it into the logic.
Moved the cam.js beneath the html so that it's initialization could access the document objects.