Commit Graph
49 Commits
Author SHA1 Message Date
Josh HawkinsandGitHub 2d22800a3d Set aspect ratios on live display (#9780)
* set aspect ratios on live display

* try 8/9
2024-02-10 16:28:23 +00:00
Josh HawkinsandGitHub 92a0705b03 show version in production builds (#9602) 2024-02-05 17:55:08 -06:00
Josh HawkinsandGitHub 3df8b5829c Small autotracking changes (#9571)
* ignore web-new

* remove web-new

* catch exceptions for unsupported cameras

* don't split up large ptz movements

* fix ruff
2024-02-02 06:23:14 -06:00
Josh HawkinsandBlake Blackshear d2ab44ce72 Reactify MSE player component (#9163)
* make mse a functional component with react hooks

* iOS 17 fixes

* birdseye mse

* remove debug

* fix test
2024-01-31 12:56:11 +00:00
Josh HawkinsandBlake Blackshear d430b99562 Autotracking: better handle objects that touch frame edges (#9062)
* handle edge cases better

* don't lowercase status strings

* ruff formatting
2024-01-31 12:56:11 +00:00
Josh HawkinsandBlake Blackshear 7bec162353 Scrubber UI component (#9036)
* add scrubber and ui playground when running dev

* fix mobile dropdown menu width

* timeline scrubber and revamp for all event handlers
2024-01-31 12:56:11 +00:00
696434b36d Initial framework for new UI with React/Typescript (#8885)
* Write a low resolution low fps stream from decoded frames (#8673)

* Generate low res low fps previews for recordings viewer

* Make sure previews end on the hour

* Fix durations and decrase keyframe interval to ensure smooth scrubbing

* Ensure minimized resolution is compatible with yuv

* Add ability to configure preview quality

* Fix

* Clean up previews more efficiently

* Use iterator

* Ensure final frame in preview is not duplicated

* initial react/ts framework

* fix gitignore glob excluding ts files

* ignore folders in web-new

* SWRConfig changes for swr 2.x

* use frigateConfig type in websocket handlers

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2024-01-31 12:56:11 +00:00
Josh HawkinsandGitHub a4f5ad3a94 Proxy websockets in devcontainers (#8886)
* proxy websockets

* remove whitespace
2023-12-08 01:08:35 +00:00
Josh HawkinsandGitHub cc5297f180 handle onvif connection failure in autotrack init (#8838)
* handle onvif connection failure in autotrack init

* remove whitespace and add consistency

* error message consistency

* more consistency
2023-12-03 03:14:52 +00:00
Josh HawkinsandGitHub 678f1201c6 use timeout for move queues (#8662) 2023-11-18 15:36:13 -06:00
Josh HawkinsandGitHub 7b520e8a9d use enabled_in_config for switch in HA integration (#8630) 2023-11-16 01:25:48 +00:00
Josh HawkinsandGitHub 266b4099b5 a few small onvif fixes and relativemove debug (#8583) 2023-11-15 05:41:41 -06:00
Josh HawkinsandGitHub e89db13282 fix restart from webui (#8541) 2023-11-08 09:37:54 -07:00
Josh HawkinsandGitHub 1d99bb908d only use max target box for relative zoom limiter (#8509) 2023-11-07 11:31:39 +00:00
Josh HawkinsandGitHub ef750e73a2 add motion mask recommendation (#8448) 2023-11-04 02:18:43 +00:00
Josh HawkinsandGitHub fc36be4f88 suppress error by overriding class func (#8431) 2023-11-02 23:24:14 +00:00
Josh HawkinsandGitHub 6eff08eb2d Add MQTT topic for active autotracking (#8419)
* prevent estimate clipping when autotracking

* use unclipped estimate in distance function only

* remove autotracking velocity changes

* publish on init
2023-11-01 23:20:26 +00:00
Josh HawkinsandGitHub af24eb7dbf Autotracking tweaks (#8400)
* optimize motion and velocity estimation

* change recommended fps and fix config validate

* remove unneeded var

* process at most 3 objects per second

* fix test
2023-11-01 06:12:43 -05:00
Josh HawkinsandNicolas Mowen 16dc9f4bf7 update debug message 2023-10-26 17:32:58 -06:00
Josh HawkinsandNicolas Mowen 52b47a3414 empty assumption for events 2023-10-26 17:32:58 -06:00
Josh HawkinsandNicolas Mowen 139664e598 assumption on empty 2023-10-26 17:32:58 -06:00
Josh HawkinsandNicolas Mowen 441c605312 make sure entire segment is accounted for 2023-10-26 17:32:58 -06:00
Josh HawkinsandNicolas Mowen def889e3a8 start_time is a datetime obj 2023-10-26 17:32:58 -06:00
Josh HawkinsandNicolas Mowen 613f1f6bd6 check frame time for segment 2023-10-26 17:32:58 -06:00
Josh HawkinsandNicolas Mowen e173377859 change warning to debug 2023-10-26 17:32:58 -06:00
Josh HawkinsandGitHub a399cb09fa Autotracking tweaks and docs update (#8345)
* refactor thresholds and reduce a duplicate call

* add camera to docs

* udpate docs
2023-10-26 18:21:58 -04:00
Josh HawkinsandGitHub b9649de327 Don't generate region boxes from motion when autotracking (#8306)
* no region boxes from motion boxes when ptz moving

* debug contours and calibration

* remove debugging

* clarifying comment
2023-10-24 19:25:22 -04:00
Josh HawkinsandGitHub 9df5927ac5 Autotracking bugfixes and zooming updates (#8103)
* zoom in/out in search for lost objects

* predicted box should not be empty

* clean up and update zoom logic

* only zoom if enabled

* more cleanup

* check for valid velocity when zooming

* only try absolute zoom in if obj area has changed

* zoom logic

* don't enqueue lost object zoom if already at limit

* don't disable motion boxes during ptz moves

* velocity threshold based on move coefficients

* fix area zoom logic

* disable debug zoom

* don't process objects if ptz moving

* recalc with exponent

* change exponent

* remove lost object zooming

* increase distance threshold for stationary object

* increase distance threshold constant

* only zoom out if nonzero

* camera name in all debug logging

* add camera name to debug logging

* camera variable name consistency

* update calibration behavior and docs

* docs and better zooming

* more sensible target values

* docs wording

* fix velocity threshold variable

* zooming tweaks and remove iou for current objects

* debug and docs

* get valid velocity

* include zero

* additional debug statements

* add zoom hysteresis

* zoom on initial move if relative

* only update target box if we actually zoom

* merge dev

* use getattr instead of get

* increase distance threshold

* reverse logic

* get_camera_status after preset move to store zoom

* final tweaks and docs

* use constants and catch possible debug exception

* adjust zoom factor exponent

* don't run motion estimation when calling preset

* adjust dimension threshold

* use numpy for velocity estimate calcs

* more numpy conversion

* fix numpy shapes

* numpy zeros dimension

* more zoom out conditions

* fix velocity bug

* ensure init has been called in debug view

* ensure onvif init if enabling by mqtt

* change default hysteresis values

* recalc relative zoom value

* zoom out value

* try to zoom when object isn't moving

* try zoom when tracked object is not moving

* don't try to zoom every time

* negate zoom out condition when needed

* hysteresis constants for absolute zooming

* update zoom conditions

* don't recalc target box on zoom only

* zoom out if above area threshold

* don't print zooming debug for stationary obj

* revamp zooming to use area moving average

* zooming tweaks and expose property

* limit zoom with max target box

* use calibration to determine zoom levels

* zoom logic fix

* docs

* add tapo c200 camera

* fix initial absolute zoom

* small zoom logic fix

* better invalid velocity checks

* fix test

* really fix test this time
2023-10-22 12:59:13 -04:00
Josh HawkinsandGitHub ee1e1b748c fix logic error in preset fetch (#8245) 2023-10-20 19:27:47 -04:00
Josh HawkinsandGitHub dbd21eb6fa use getattr instead of get (#8094) 2023-10-08 14:30:23 -05:00
Josh HawkinsandGitHub 67a5a7d21a onvif: use preset token if name is unsupported (#8046)
* onvif: use preset token if name is unsupported

* move parenthesis
2023-10-07 09:20:42 -05:00
Josh HawkinsandGitHub 8298806028 update list of onvif capable cams (#8021)
* update list of onvif capable cams

* clarify hikvision

* wording

* hikvision

* add sunba and ctronics from forum reports

* add cams
2023-10-07 09:20:10 -05:00
Josh HawkinsandGitHub fe9fcf3eaa remove erroneous check for move threads (#8031) 2023-10-07 09:18:07 -05:00
Josh HawkinsandGitHub 20c2ab39bc disable zooming if relative zoom not supported (#8028) 2023-10-07 09:17:54 -05:00
Josh HawkinsandGitHub 22b9507797 add image of debug view (#8003) 2023-09-30 06:25:39 -05:00
Josh HawkinsandGitHub e77fedc445 docs for onvif camera support (#7999)
* docs for onvif camera support

* fix warning

* warning to caution

* update table

* centering

* no autotracking for reolinks

* zoom only for 511WA
2023-09-29 17:52:57 -05:00
Josh HawkinsandGitHub ead03c381b Autotracking improvements and bugfixes (#7984)
* add zoom factor and catch motion exception

* reword error message

* check euclidean distance of estimate points

* use numpy for euclidean distance

* config entry

* use zoom factor and zoom based on velocity

* move debug inside try

* change log type to info

* logger level warning

* docs

* exception handling
2023-09-28 18:21:37 -05:00
Josh HawkinsandGitHub 50f13b7196 thread lock for move queues (#7973) 2023-09-28 18:01:05 -05:00
Josh HawkinsandGitHub 27144eb0b9 Autotracker: Basic zooming and moves with velocity estimation (#7713)
* don't zoom if camera doesn't support it

* basic zooming

* make zooming configurable

* zooming docs

* optional zooming in camera status

* Use absolute instead of relative zooming

* increase edge threshold

* zoom considering object area

* bugfixes

* catch onvif zooming errors

* relative zooming option for dahua/amcrest cams

* docs

* docs

* don't make small movements

* remove old logger statement

* fix small movements

* use enum in config for zooming

* fix formatting

* empty move queue first

* clear tracked object before waiting for stop

* use velocity estimation for movements

* docs updates

* add tests

* typos

* recalc every 50 moves

* adjust zoom based on estimate box if calibrated

* tweaks for fast objects and large movements

* use real time for calibration and add info logging

* docs updates

* remove area scale

* Add example video to docs

* zooming font header size the same as the others

* log an error if a ptz doesn't report a MoveStatus

* debug logging for onvif service capabilities

* ensure camera supports ONVIF MoveStatus
2023-09-27 06:19:10 -05:00
Josh HawkinsandGitHub 64705c065f update docs sidebar for go2rc 1.7.1 (#7946) 2023-09-27 06:11:37 -05:00
Josh HawkinsandGitHub a3eccce8f3 use useEffect for key listeners on camera control panel (#7827)
* use useEffect for key listeners

* dependencies

* useCallbacks
2023-09-21 05:25:57 -05:00
Josh HawkinsandGitHub b538572afb Clarify autotracking preset docs (#7576) 2023-09-01 07:01:48 -05:00
Josh HawkinsandGitHub dc2e786a6f remove sleeps and improve queue logic (#7163) 2023-07-14 19:01:10 -05:00
Josh HawkinsandGitHub c9254b256a Autotracking: reset motion estimator (#7129)
* reset motion estimator after returning to preset

* small tweaks and a bugfix
2023-07-13 05:32:51 -05:00
Josh HawkinsandGitHub 7a2d09dc35 Autotracking optimizations (#7109)
* much improved motion estimation and tracking

* docs updates

* move ptz specific mp values to ptz_metrics dict

* only check if moving at frame time

* pass full dict instead of individual values
2023-07-11 06:23:20 -05:00
Josh HawkinsandGitHub 691e9d26d2 Autotracking fixes (#7096)
* only check camera status if autotracking enabled

* a more sensible sleep time

* Only check camera status if preparing for a move

* only update tracked obj position when ptz stopped

* both pantilt *and* zoom should be idle

* check more often after moving

* No need to move pan and tilt separately
2023-07-08 16:02:54 -05:00
88fc0fac8f Basic PTZ object autotracking functionality (#6913)
* Basic functionality

* Threaded motion estimator

* Revert "Threaded motion estimator"

This reverts commit 3171801607.

* Don't detect motion when ptz is moving

* fix motion logic

* fix mypy error

* Add threaded queue for movement for slower ptzs

* Move queues per camera

* Move autotracker start to app.py

* iou value for tracked object

* mqtt callback

* tracked object should be initially motionless

* only draw thicker box if autotracking is enabled

* Init if enabled when initially disabled in config

* Fix init

* Thread names

* Always use motion estimator

* docs

* clarify fov support

* remove size ratio

* use mp event instead of value for ptz status

* update autotrack at half fps

* fix merge conflict

* fix event type for mypy

* clean up

* Clean up

* remove unused code

* merge conflict fix

* docs: update link to object_detectors page

* Update docs/docs/configuration/autotracking.md

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* clarify wording

* pass actual instances directly

* default return preset

* fix type

* Error message when onvif init fails

* disable autotracking if onvif init fails

* disable autotracking if onvif init fails

* ptz module

* verify required_zones in config

* update util after dev merge

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2023-07-08 07:04:47 -05:00
Josh HawkinsandBlake Blackshear 7845995dfd Adjust threshold and contour_area with mqtt 2022-07-05 08:46:10 -05:00
Josh HawkinsandGitHub 65e0ec7826 Allow improve_contrast to be toggled via mqtt (#3011)
* Toggle improve_contrast for cameras via MQTT

* Process parameter to mqtt toggle improve_contrast

* Update mqtt docs for improve_contrast topic

* Spacing

* Add class variable and update in process_frames

* Pass to constructor

* pass by reference mistake

* remove parameter

* remove parameter
2022-04-16 08:52:02 -05:00