-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathconfig.py
101 lines (86 loc) · 5.06 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# Config.py file for inout.py Release 1.2
# Display Settings
# ----------------
WINDOW_ON = False # Set to True displays opencv windows (GUI desktop reqd)
# Need HDTV or Monitor connected to RPI HDMI port.
DEVICE_CONTROL_ON = False # True=On False=Off enable/disable device_control function code
VERBOSE = True # Set to False to suppress console logging messages
# Settings for in out
CENTER_LINE_VERT = True # True=Vert False=horiz centerline trigger orientation
INOUT_REVERSE = False # reverse Enter and Leave orientation
IMAGE_PATH = "media/images" # Folder for storing images (rel or abs)
MOVE_LIST_TIMEOUT = 0.5 # wait seconds with no motion then clear movelist
# Settings for Logging and Messages
SAVE_LOG = False # Send console log messages to a log file instead of screen
SAVE_CSV_FILE = False # save CSV data file
SAVE_IMAGES = True # save image when leave or enter activated
SHOW_MOVES = False # show detailed x,y tracking movement data
SHOW_FPS = False # Show Frames per second
# Camera Settings
# ---------------
WEBCAM = False # default = False False=PiCamera True=USB WebCamera
# Web Camera Settings
WEBCAM_SRC = 0 # default = 0 USB opencv connection number
WEBCAM_WIDTH = 320 # default = 320 USB Webcam Image width
WEBCAM_HEIGHT = 240 # default = 240 USB Webcam Image height
WEBCAM_HFLIP = False # default = False USB Webcam flip image horizontally
WEBCAM_VFLIP = False # default = False USB Webcam flip image vertically
# Pi Camera Settings
CAMERA_WIDTH = 320 # default = 320 PiCamera image width can be greater if quad core RPI
CAMERA_HEIGHT = 240 # default = 240 PiCamera image height
CAMERA_HFLIP = False # True=flip camera image horizontally
CAMERA_VFLIP = False # True=flip camera image vertically
CAMERA_ROTATION = 0 # Rotate camera image valid values 0, 90, 180, 270
CAMERA_FRAMERATE = 25 # default = 25 lower for USB Web Cam. Try different settings
# OpenCV Settings
# ---------------
MIN_AREA = 700 # excludes all contours less than or equal to this Area
DIFF_WINDOW_ON = False # Show OpenCV image difference window
THRESH_WINDOW_ON = False # Show OpenCV image Threshold window
SHOW_CIRCLE = True # True= show circle False= show rectancle on biggest motion
CIRCLE_SIZE = 5 # diameter of circle for SHOW_CIRCLE
LINE_THICKNESS = 2 # thickness of bounding line in pixels
FONT_SCALE = .5 # size opencv text
WINDOW_BIGGER = 2 # Resize multiplier for Movement Status Window
# if gui_window_on=True then makes opencv window bigger
# Note if the window is larger than 1 then a reduced frame rate will occur
THRESHOLD_SENSITIVITY = 25
BLUR_SIZE = 10
# When variable DEVICE_CONTROL_ON = True
# Use these settings if you wish to use the Device Control Option
# Stop Light and Gate controlled by servo
# LED control variables
LIGHT_TIMER = 60
LED_GREEN_PIN = 11
LED_RED_PIN = 13
# SERVO control variables
SERVO_PIN = 12 # Set gpio pin to control servo
SERVO_FREQ = 50 # Set Frequency for servo control
SERVO_0 = 2.5 # Set Duty Cycle for Servo at 0 degrees
SERVO_90 = 7.5 # Set Duty Cycle for 90 Degrees
SERVO_180 = 12.5 # Set Duty Cycle for 180 Degrees
#======================================
# webserver.py Settings
#======================================
# Web Server settings
# -------------------
web_server_port = 8080 # default= 8080 Web server access port eg http://192.168.1.100:8080
web_server_root = "media" # default= "media" webserver root path to webserver image/video sub-folders
web_page_title = "Track Enter Leave Activity" # web page title that browser show (not displayed on web page)
web_page_refresh_on = False # False=Off (never) Refresh True=On (per seconds below)
web_page_refresh_sec = "180" # default= "180" seconds to wait for web page refresh seconds (three minutes)
web_page_blank = True # True Starts left image with a blank page until a right menu item is selected
# False displays second list[1] item since first may be in progress
# Left iFrame Image Settings
# --------------------------
web_image_height = "768" # default= "768" px height of images to display in iframe
web_iframe_width_usage = "70%" # Left Pane - Sets % of total screen width allowed for iframe. Rest for right list
web_iframe_width = "100%" # Desired frame width to display images. can be eg percent "80%" or px "1280"
web_iframe_height = "100%" # Desired frame height to display images. Scroll bars if image larger (percent or px)
# Right Side Files List
# ---------------------
web_max_list_entries = 0 # 0 = All or Specify Max right side file entries to show (must be > 1)
web_list_height = web_image_height # Right List - side menu height in px (link selection)
web_list_by_datetime = True # True=datetime False=filename
web_list_sort_descending = True # reverse sort order (filename or datetime per web_list_by_datetime setting
# ---------------------------------------------- End of User Variables -----------------------------------------------------