Version 1.0 Sparrow is official! Download ZIP repository here
Version 2.0 Robin is in beta, introducing BIRBVISION to identify bird species in your pictures. Download ZIP repository here
Check out the Roadmap for future plans.
A Raspberry Pi-powered, change-activated camera for watching bird feeders.
Check out Birbserver, a web interface for your Birbcam designed to run on the same RPI.
Birbvision is the prototype machine learning identifier to be introduced in Birbcam v2.0
Requires the following Python packages, available on PIP
picamerax
opecv-python
numpy
imutils
Important settings are saved in the config.ini
file; some can be overridden by CLI arguments when running the app. Defaults are provided, but some will require local configuration.
[Saving] Directory
- Where images taken by the camera are saved. It is suggested that you save to an external drive, rather than the SD card.[Saving] LivePictureInterval
- Number of seconds between each live picture, used by the server. Set to 0 to disable.[Saving] FullPictureInterval
- Number of seconds between each full picture. A full picture is not automatically taken after this interval, rather no full pictures will be taken by triggers before the interval has expired.[Saving] FullPictureResolution
- The resolution of a full picture. See config.ini
for more informating relating to camera hardware.[Saving] LivePictureResolution
- The resolution of a live picture. See config.ini
for more informating relating to camera hardware.[Detection] Threshold
- How strong the difference between the live and reference pictures must be to register as a changed pixel. Higher is less sensitive.[Detection] ContourArea
- How big a detected, continuous difference region must be to trigger a full picture. This balances out noise from the Threshold
setting. Higher is less sensitive.[Detection] ExposureInterval
- Number of seconds between exposure checks[Detection] ExposureLevel
- Target exposure level. The ideal value depends on your set up (feeder color, direct/indirect light, etc), but the default of 100 is a good starting place.[Detection] ExposureError
- Acceptable error +/- ExposureLevel
[Debug] Enable
- Debug mode shows live images from the camera and detector. Can be toggled when running with D
key.Run the app via the command line
python3 birbcam.py
The first screen that opens is a live view from the camera to help you aim the camera, and set the focus. The number in the top right is a relative, unit-less value that approximates how much of the image is in focus. Max focus corresponds to the largest value.
To select a specific area to focus, you can click and drag a rectangle to zoom. To reset the zoom press R
.
To continue, press Q
.
To exit the app, press X
.
The second screen that opens is a live view from the camera to set the Detection Mask. When the camera is running, only changes to the image within the detection mask are used to trigger the taking of a picture.
To select a specific area to mask, you can click and drag with the mouse. The detection area is within the yellow rectangle.
To continue, press Q
.
To exit the app, press X
.
If you are running Debug Mode, the final screen is the observing interface, which you can use to monitor the camera. There are four quadrants in the display:
Top Left
- The live feed from the camera. Changes that could trigger a picture will be highlighted by a green rectangle.Top Right
- Camera settings and exposure histogram. Camera settings can be changed with the keys marked (x)
. The histogram plots the luminance of the image and is used to assist exposure setting.Bottom Left
- The difference between the live and the reference image.Bottom Right
- The difference image clamped to a threshold value, highlighting significant changes.The camera starts paused: it will take live pictures, but will not take full pictures until unpaused.
To pause/unpause recording, press P
.
To exit the app, press Q
.