You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Fixed aspect ratio and off-center displacement when attaching a clip to a tracked object
This commit is contained in:
@@ -164,6 +164,8 @@ std::shared_ptr<Frame> ObjectDetection::GetFrame(std::shared_ptr<Frame> frame, i
|
||||
// Get the Tracked Object's child clip
|
||||
Clip* childClip = parentTimeline->GetClip(trackedObject->ChildClipId());
|
||||
if (childClip){
|
||||
std::shared_ptr<Frame> f(new Frame(1, frame->GetWidth(), frame->GetHeight(), "#00000000"));
|
||||
std::shared_ptr<Frame> childClipFrame = childClip->GetFrame(f, frame_number);
|
||||
// Get the image of the child clip for this frame
|
||||
std::shared_ptr<Frame> childClipFrame = childClip->GetFrame(frame_number);
|
||||
childClipImages.push_back(childClipFrame->GetImage());
|
||||
|
||||
@@ -141,7 +141,8 @@ std::shared_ptr<Frame> Tracker::GetFrame(std::shared_ptr<Frame> frame, int64_t f
|
||||
Clip* childClip = parentTimeline->GetClip(trackedData->ChildClipId());
|
||||
if (childClip){
|
||||
// Get the image of the child clip for this frame
|
||||
std::shared_ptr<Frame> childClipFrame = childClip->GetFrame(frame_number);
|
||||
std::shared_ptr<Frame> f(new Frame(1, frame->GetWidth(), frame->GetHeight(), "#00000000"));
|
||||
std::shared_ptr<Frame> childClipFrame = childClip->GetFrame(f, frame_number);
|
||||
childClipImage = childClipFrame->GetImage();
|
||||
|
||||
// Set the Qt rectangle with the bounding-box properties
|
||||
|
||||
Reference in New Issue
Block a user