Show HN: Critter.Camera – Browser based motion detection and image capture
critter.camera
critter.camera
I hooked a webcam to an old netbook and downloaded an app which would take a picture whenever it detected motion.
What I didn't take into account was the mirror in the hallway which during sunset would reflect sunlight at just the right angle to hit the toilet bowl.
In the end my results were a time-lapse of the sun shining on porcelain, because the mirror was far away enough to make the sun's movement trigger the motion detection sensing done by the app.
Picture based detection can be a time sink by itself.
He's in kitty heaven now, but the younger one proved to still be an avid shess player when my SO had to take him along with her while she was working seasonally as a hotel receptionist. He found a worthy opponent there, so it might have been him from the start.
I essentially subtracted the current frame from the max across a moving window.
I'd be interested to chat about it if you like, my email is in my profile. The code is at https://github.com/nuchi/multi_object_tracking
I also would love a sensitivity setting and a number of images per second to capture setting. I would be interested in using this overnight but curious how quickly I would fill up memory.
Can't you recalibrate after every N frames, utilizing the fact that daytime lighting changes are only gradual?
WebRTC has been in iOS Safari for quite a while. However, all other apps and browsers were limited to what was in offer within WKWebView. From iOS 14.3 beta 1 onwards WKWebView gained getUserMedia/WebRTC features. It is now up to the browser and apps you use to make sure they have implemented their web views correctly and allow the correct permissions for WebRTC to work.
https://stackoverflow.com/questions/48775154/notreadableerro... https://bugs.webkit.org/show_bug.cgi?id=208667 https://bugs.chromium.org/p/chromium/issues/detail?id=752458
If you were to implement a camera picker, take a gander at: https://webrtc.github.io/samples/src/content/devices/input-o...
iOS and Android don't have the same camera picker like Chrome on Windows 10, even then it is difficult to always override. I would recommend using enumerateDevices to allow you to pass the deviceId when firing getUserMedia. Not a lot of work. Implemented this a few times for cross-browser WebRTC experiences. A pro-tip is use getUserMedia with audio and video constraints set to true. This forces the permissions pop up to appear. You can kill the feed once the user has accepted the permissions, then ask them what device they want to use, and then fire getUserMedia with the correct deviceId. This is a [nice?] hack as some browsers don't allow you to use enumeratedDevices until after getUserMedia has asked you for the permissions. e.g. Safari...
https://developer.mozilla.org/en-US/docs/Web/API/MediaDevice...