blakeblackshear / frigate

NVR with realtime local object detection for IP cameras
https://frigate.video
MIT License
18.14k stars 1.65k forks source link

PTZ Auto Tracking without RelativePanTilt FOV #7504

Closed kennethgomez01 closed 1 year ago

kennethgomez01 commented 1 year ago

For most, just playing around with the dev branch and looking to see if my current PTZ camera are.capable to work with auto tracking, as surprise it says it does not have RelativePanTilt FOV. Is it possible to allow cameras without this, as my camera is clone Hikvision which support auto tracking Pan/Tilt/Zoom for Human, but luck of Frigate PTZ Auto Tracking requirements for RelativePanTilt FOV.

NickM-27 commented 1 year ago

Personally I am not sure this makes sense at least in the near term. Without relative move we have to basically know the speed & just move the camera for a certain amount of time. Of course different cameras will vary depending on their speed and that will throw the tracking off.

NickM-27 commented 1 year ago

Curious what @hawkeye217 thinks as well

kennethgomez01 commented 1 year ago

@NickM-27 Sorry what I mean is my camera supports Relative movement, is just that the fov term requirements after running the fovtest.py that my camera does not support.

NickM-27 commented 1 year ago

I'm not aware of relative move that doesn't use that https://www.onvif.org/specs/srv/ptz/ONVIF-PTZ-Service-Spec-v1712.pdf

hawkeye217 commented 1 year ago

I agree with @NickM-27, it doesn't make much sense to try to support particular cameras that don't work with the ONVIF RelativeMove FOV standard in the near term.

My guess is that your Hikvision clone camera's firmware just doesn't fully support the ONVIF standard.

Figuring out how fast the motor moves on one particular camera or another might be an imprecise guessing game. It's something I experimented with and considered when writing the initial code. But the manufacturers of each camera have done the heavy lifting of implementing field of view movement with their lens/motor combination and exposing that via the ONVIF standard. I have a feeling it would vary too much from camera to camera for Frigate to support it and have it work reliably, but maybe it's worth a try at some point later.

I have played around with ONVIF absolute movement (which more cameras probably support) and that might be something that Frigate could support in the future. It would probably require the user to define the limits of their field of view and then Frigate could do some math. It would still not be as precise as the camera firmware's relative move function, though.

kennethgomez01 commented 1 year ago

Make sense. Thank you!

NickM-27 commented 1 year ago

I think I'll close this as not planned for now. Can revisit once we have more info on how the auto tracking works for more users in its existing use case of relative move.