Skip to content

retrontology/doorcam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

doorcam

Raspberry Pi Peephole Camera

Requirements

This application requires OpenCV and the optional python package(s) it installs. You'll need to build and/or install that before you proceed with installing doorcam.

Installation

  1. Install the requirements listed above
  2. Clone the repo
    git clone https://github.com/retrontology/doorcam
    
  3. Install the python requirements
    cd doorcam
    python3 -m pip install -r requirements.txt
    

Config

  • analyzer:
    • contour_minimum_area: Minimum contour area of difference between frames of the analyzer to trigger a detection event.
    • delta_threshold: Threshold setting passed to threshold command for detecting difference between frames of tha analyzer
    • max_fps: Maximum desired fps. Minium fps relies on speed of single thread
    • undistort: Whether you want to undistort the camera image before analayzing it or not.
    • undistort_balance: The balance used for the undistort function if enabled
  • camera:
    • D: Array of distortion coeffecients for applying fisheye undistortion. Obtained via the calibrate.py program.
    • K: Camera intrinsic matrix. Obtained via the calibrate.py program.
    • format: A four letter string used for setting the format of the capture device.
    • index: Index of the video device to be used for capture. i.e. if you want to use /dev/video2, your index would be 2
    • max_fps: Desired capture fps for the video device
    • resolution: Desired capture resolution for the video device
    • rotation: Rotation desired for frames retrieved from the video device. Is very intensive and can reduce fps if not None/null
  • capture:
    • enable: Whether or not to enable saving events to disk
    • keep_images Whether or not to keep saved images
    • path: Where the images will be saved
    • postroll: Amount of time in seconds to capture after the last frame where motion is detected
    • preroll: Amount of time in seconds to capture before the first frame where motion is detected
    • rotation: The desired rotation to apply to the frames during post-processing.
    • timestamp: Whether or not to add timestamps to the saved images
    • trim_old: Whether or not to trim/delete old events.
    • trim_limit: Amount of days of events you want to keep. All videos older than this window are trimmed/deleted if trim_old is true.
    • video_encode: Whether or not to encode the saved images to a video file
  • screen:
    • activation_period: How long in seconds you want the screen to activate for when either motion is detected or you touch the screen.
    • backlight_device: Path to the backlight device
    • color_conv: Color conversion to use for rendering to the framebuffer. Refer to https://docs.opencv.org/4.5.3/d8/d01/group__imgproc__color__conversions.html
    • dtype: The dtype to use for determining the width of each framebuffer pixel. Refer to https://numpy.org/doc/stable/reference/arrays.scalars.html#sized-aliases
    • framebuffer_device: Path to the framebuffer device to use for display.
    • resolution: The resolution of the framebuffer for resizing the frame for display.
    • rotation: The desired rotation to apply to the frame retrieved from the camera. Is significantly faster in this application as the image used is 1/4 the size of the original
    • touch_device: Path to the touchscreen device
    • undistort: Whether to undistort the frame on the screen
    • undistort_balance: The balance to pass to the undistortion function
  • stream:
    • ip: The IP address of the desired network device to use for the MJPG server
    • port: The port to listen on for the MJPG server

Usage

usage: run.py [-h] [-c config.yaml] [-d] [-f]

optional arguments:
  -h, --help            show this help message and exit
  -c config.yaml, --config config.yaml
  -d, --debug
  -f, --fps

About

Raspberry Pi Peephole Camera

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published