Motion - Motion Frame Buffer Technique

Motion Frame Buffer Technique

Kenneth needs a place to put this info while developing the code. And why not share it on TWIki.

Not completed at all..

Variables used for buffering.

Variable Type Function
cnt->conf.minimum_motion_frames int minimum number of frames following each other with motion detected that is required to trigger motion
cnt->conf.pre_capture int number of frames pre_captured from before motion detected that gets saved.
cnt->precap_nr int size of the frame buffer (number of frames in buffer).
cnt->precap_cur int current position of the buffer where the last captured video frame is stored. First position is 0.
cnt->moved int When this variable is not zero motion detection is disabled. It gets changed to a non-zero value when a camera is moved by the auto tracking feature or when the lightswitch condition is detected.
cnt->shots int The frame number during this second. First frame is 0.
frame_buffer_size int Calculation of the correct size of the frame buffer based on the formular: frame_buffer_size = cnt->conf.pre_capture + cnt->conf.minimum_motion_frames - 1. If frame_buffer_size is not the same value as cnt->precap_nr the frame buffer gets resized.
cnt->imgs.new *char Pointer to first byte (byte 0) in frame buffer = Pointer to first frame (frame 0).
cnt->imgs.timestamp *tm Pointer to first timestamp in timestamp buffer. Used for filename and displayed text.
cnt->imgs.shotstamp *int Pointer to first shot value (frame counter for each second) in shots buffer. Used for filename and displayed text.

-- KennethLavrsen - 17 Oct 2004
Topic revision: r4 - 16 Mar 2005, KennethLavrsen
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.