Skip to content

Commit

Permalink
ver 13.00 Major update see Readme.md
Browse files Browse the repository at this point in the history
Requires a new config.py
  • Loading branch information
pageauc committed Sep 18, 2023
1 parent 789bc10 commit 8988834
Show file tree
Hide file tree
Showing 19 changed files with 3,056 additions and 1,049 deletions.
18 changes: 18 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,24 @@ to ensure your system is up-to-date.
This will download and run the **speed-install.sh** script. If running under python3 you will need opencv3 installed.
See my Github [menu driven compile opencv3 from source](https://github.com/pageauc/opencv3-setup) project

***Ver 13.00 Notes***
Version 13.00 is a major speed camera revision. Camera thread code is now handled by a strmcam.py module.
config.py variable names have changed so you will need to backup and cp config.py.new config.py (see below for details)

Also the camera settings are moved to configcam.py to allow code to be more portable.

The code to start a video stream thread is now greatly simplified. per example below

from strmcam import strmcam # import camera stream function

vs = strmcam() # start video stream thread per configcam.py settings using appropriate strm.....py file

# example implementation
image1 = vs.read() # read video stream image frame into variable
# your code here
vs.stop() # Stop Camera Thread


***IMPORTANT*** speed-cam.py ver 8.x or greater Requires Updated config.py and plugins.

cd ~/speed-camera
Expand Down
233 changes: 107 additions & 126 deletions config.py

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions configcam.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# ver 13.00 configcam.py Camera Settings. These are imported by strmcam.py

CAMERA = "pilibcam" # valid values usbcam, rtspcam, pilibcam, pilegcam
CAM_LOCATION = "Front Window"

USBCAM_SRC = 0 # Device number of USB connection usually 0, 1, 2, Etc
RTSPCAM_SRC = "rtsp://user:password@IP:554/path" # Set per IP Cam Docs and config see example below
# rtsp://admin:[email protected]:554/12

# Camera Image Stream Settings
IM_SIZE = (320, 240) # Image resolution width, height pixels
IM_VFLIP = False # True enables flipping image vertically
IM_HFLIP = False # True enables flipping image horizonally
IM_ROTATION = 0 # Rotate camera image valid values are 0, 90, 180, 270
IM_FRAMERATE = 30 # Legacy Picamera Framerate
Loading

0 comments on commit 8988834

Please sign in to comment.