Loading...
Searching...
No Matches
CVStabilization Class Reference

This class stabilizes a video frame using optical flow. More...

`#include <CVStabilization.h>`

## Public Member Functions

bool | _LoadStabilizedData ()
void | AddFrameDataToProto (pb_stabilize::Frame *pbFrameData, CamTrajectory &trajData, TransformParam &transData, size_t frame_number)
| Add frame stabilization data into protobuf message.
| CVStabilization (std::string processInfoJson, ProcessingController &processingController)
| Set default smoothing window value to compute stabilization.
CamTrajectory | GetCamTrajectoryTrackedData (size_t frameId)
TransformParam | GetTransformParamData (size_t frameId)
bool | SaveStabilizedData ()
void | SetJson (const std::string value)
| Load JSON string into this object.
void | SetJsonValue (const Json::Value root)
| Load Json::Value into this object.
void | stabilizeClip (openshot::Clip &video, size_t _start=0, size_t _end=0, bool process_interval=false)
| Process clip and store necessary stabilization data.

## Public Attributes

std::map< size_t, CamTrajectory > | trajectoryData
std::map< size_t, TransformParam > | transformationData

## Detailed Description

This class stabilizes a video frame using optical flow.

The relative motion between two consecutive frames is computed to obtain the global camera trajectory. The camera trajectory is then smoothed to reduce jittering.

Definition at line 75 of file CVStabilization.h.

## Constructor & Destructor Documentation

## CVStabilization()

CVStabilization::CVStabilization | ( | std::string | processInfoJson,
|  | ProcessingController & | processingController
| ) |  |

Set default smoothing window value to compute stabilization.

Definition at line 29 of file CVStabilization.cpp.

## Member Function Documentation

## _LoadStabilizedData()

bool CVStabilization::_LoadStabilizedData | ( |  | ) |

Definition at line 374 of file CVStabilization.cpp.

## AddFrameDataToProto()

void CVStabilization::AddFrameDataToProto | ( | pb_stabilize::Frame * | pbFrameData,
|  | CamTrajectory & | trajData,
|  | TransformParam & | transData,
|  | size_t | frame_number
| ) |  |

Add frame stabilization data into protobuf message.

Definition at line 298 of file CVStabilization.cpp.

Referenced by SaveStabilizedData().

## GetCamTrajectoryTrackedData()

CamTrajectory CVStabilization::GetCamTrajectoryTrackedData | ( | size_t | frameId | ) |

Definition at line 326 of file CVStabilization.cpp.

## GetTransformParamData()

TransformParam CVStabilization::GetTransformParamData | ( | size_t | frameId | ) |

Definition at line 314 of file CVStabilization.cpp.

## SaveStabilizedData()

bool CVStabilization::SaveStabilizedData | ( |  | ) |

Protobuf Save and Load methods Save stabilization data to protobuf file

Definition at line 268 of file CVStabilization.cpp.

## SetJson()

void CVStabilization::SetJson | ( | const std::string | value | ) |

Load JSON string into this object.

Definition at line 339 of file CVStabilization.cpp.

Referenced by CVStabilization().

## SetJsonValue()

void CVStabilization::SetJsonValue | ( | const Json::Value | root | ) |

Load Json::Value into this object.

Definition at line 356 of file CVStabilization.cpp.

Referenced by SetJson().

## stabilizeClip()

void CVStabilization::stabilizeClip | ( | openshot::Clip & | video,
|  | size_t | _start = `0`,
|  | size_t | _end = `0`,
|  | bool | process_interval = `false`
| ) |  |

Process clip and store necessary stabilization data.

Definition at line 37 of file CVStabilization.cpp.

## Member Data Documentation

## trajectoryData

std::map<size_t,CamTrajectory> CVStabilization::trajectoryData

Definition at line 107 of file CVStabilization.h.

Referenced by _LoadStabilizedData(), GetCamTrajectoryTrackedData(), SaveStabilizedData(), and stabilizeClip().

## transformationData

std::map<size_t,TransformParam> CVStabilization::transformationData

Definition at line 108 of file CVStabilization.h.

Referenced by _LoadStabilizedData(), GetTransformParamData(), SaveStabilizedData(), and stabilizeClip().

The documentation for this class was generated from the following files:

- CVStabilization.h
- CVStabilization.cpp