Skip to content
Commit a20d5eb2 authored by Daniel Calviño Sánchez's avatar Daniel Calviño Sánchez
Browse files

Limit the segmentation rate to the stream frame rate



The segmentation was always run at 30 FPS. However, if the input stream
has a lower FPS calculating the segmentation again is a waste of
resources, as it might have not changed since the previous input frame.
Moreover, as the output stream also runs at the same FPS as the input
the canvas could be drawn without any effect in the output.

As the input stream, the calculation of the segmentation and the drawing
of a new output frame are not synchronized in some cases this could
introduce some lag between the drawn segmentation and the input video.
However, due to the lack of synchronization that could happen already
(and the fixed 30 FPS only overcomed that on lower FPS inputs by sheer
luck and brute force), and the reduced load is worth that minor
annoyance. This could be solved by synchronizing the input stream and
the segmentation mask, but that comes with its own challenges.

Signed-off-by: default avatarDaniel Calviño Sánchez <danxuliu@gmail.com>
parent 37fd8da1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment