From e2b51da44227366b9f7460f31d5105b1d440a1d9 Mon Sep 17 00:00:00 2001 From: Brenno Date: Wed, 19 May 2021 11:45:09 -0300 Subject: [PATCH] Fixed missing detection in the first frame --- src/CVObjectDetection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CVObjectDetection.cpp b/src/CVObjectDetection.cpp index bab072770..ac0ca1014 100644 --- a/src/CVObjectDetection.cpp +++ b/src/CVObjectDetection.cpp @@ -81,8 +81,8 @@ void CVObjectDetection::detectObjectsClip(openshot::Clip &video, size_t _start, size_t frame_number; if(!process_interval || end <= 1 || end-start == 0){ // Get total number of frames in video - start = (int)(video.Start() * video.Reader()->info.fps.ToFloat()) + 1; - end = (int)(video.End() * video.Reader()->info.fps.ToFloat()) + 1; + start = (int)(video.Start() * video.Reader()->info.fps.ToFloat()); + end = (int)(video.End() * video.Reader()->info.fps.ToFloat()); } for (frame_number = start; frame_number <= end; frame_number++)