Skip to content

Commit

Permalink
Fixed missing detection in the first frame
Browse files Browse the repository at this point in the history
  • Loading branch information
BrennoCaldato committed May 19, 2021
1 parent e45b81b commit e2b51da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/CVObjectDetection.cpp
Expand Up @@ -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++)
Expand Down

0 comments on commit e2b51da

Please sign in to comment.