Skip to content

Commit

Permalink
Headers: Fix doc comments
Browse files Browse the repository at this point in the history
KalmanTracker: Convert comment to doc comment
  • Loading branch information
ferdnyc committed Mar 7, 2021
1 parent c08dc9c commit 8278496
Show file tree
Hide file tree
Showing 49 changed files with 99 additions and 105 deletions.
2 changes: 1 addition & 1 deletion src/CVObjectDetection.h
Expand Up @@ -122,7 +122,7 @@ namespace openshot
// Add frame object detection data into protobuf message.
void AddFrameDataToProto(pb_objdetect::Frame* pbFrameData, CVDetectionData& dData);

/// Get and Set JSON methods
// Get and Set JSON methods
void SetJson(const std::string value); ///< Load JSON string into this object
void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object

Expand Down
14 changes: 7 additions & 7 deletions src/CVStabilization.h
Expand Up @@ -101,37 +101,37 @@ class CVStabilization {
/// Will handle a Thread safely comutication between ClipProcessingJobs and the processing effect classes
ProcessingController *processingController;

// Track current frame features and find the relative transformation
/// Track current frame features and find the relative transformation
bool TrackFrameFeatures(cv::Mat frame, size_t frameNum);

std::vector<CamTrajectory> ComputeFramesTrajectory();
std::map<size_t,CamTrajectory> SmoothTrajectory(std::vector <CamTrajectory> &trajectory);

// Generate new transformations parameters for each frame to follow the smoothed trajectory
/// Generate new transformations parameters for each frame to follow the smoothed trajectory
std::map<size_t,TransformParam> GenNewCamPosition(std::map <size_t,CamTrajectory> &smoothed_trajectory);

public:

std::map <size_t,CamTrajectory> trajectoryData; // Save camera trajectory data
std::map <size_t,TransformParam> transformationData; // Save transormation data

// Set default smoothing window value to compute stabilization
/// Set default smoothing window value to compute stabilization
CVStabilization(std::string processInfoJson, ProcessingController &processingController);

// Process clip and store necessary stabilization data
/// Process clip and store necessary stabilization data
void stabilizeClip(openshot::Clip& video, size_t _start=0, size_t _end=0, bool process_interval=false);

/// Protobuf Save and Load methods
// Save stabilization data to protobuf file
/// Save stabilization data to protobuf file
bool SaveStabilizedData();
// Add frame stabilization data into protobuf message
/// Add frame stabilization data into protobuf message
void AddFrameDataToProto(pb_stabilize::Frame* pbFrameData, CamTrajectory& trajData, TransformParam& transData, size_t frame_number);

// Return requested struct info for a given frame
TransformParam GetTransformParamData(size_t frameId);
CamTrajectory GetCamTrajectoryTrackedData(size_t frameId);

/// Get and Set JSON methods
// Get and Set JSON methods
void SetJson(const std::string value); ///< Load JSON string into this object
void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object

Expand Down
17 changes: 9 additions & 8 deletions src/CVTracker.h
Expand Up @@ -116,23 +116,24 @@ namespace openshot
// Constructor
CVTracker(std::string processInfoJson, ProcessingController &processingController);

// Set desirable tracker method
/// Set desirable tracker method
cv::Ptr<cv::Tracker> selectTracker(std::string trackerType);

// Track object in the hole clip or in a given interval
// If start, end and process_interval are passed as argument, clip will be processed in [start,end)
/// Track object in the hole clip or in a given interval
///
/// If start, end and process_interval are passed as argument, clip will be processed in [start,end)
void trackClip(openshot::Clip& video, size_t _start=0, size_t _end=0, bool process_interval=false);

// Get tracked data for a given frame
/// Get tracked data for a given frame
FrameData GetTrackedData(size_t frameId);

/// Protobuf Save and Load methods
// Save protobuf file
// Protobuf Save and Load methods
/// Save protobuf file
bool SaveTrackedData();
// Add frame tracked data into protobuf message.
/// Add frame tracked data into protobuf message.
void AddFrameDataToProto(pb_tracker::Frame* pbFrameData, FrameData& fData);

/// Get and Set JSON methods
// Get and Set JSON methods
void SetJson(const std::string value); ///< Load JSON string into this object
void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object

Expand Down
2 changes: 1 addition & 1 deletion src/CacheBase.h
Expand Up @@ -107,7 +107,7 @@ namespace openshot {
/// @param channels The number of audio channels in the frame
void SetMaxBytesFromInfo(int64_t number_of_frames, int width, int height, int sample_rate, int channels);

/// Get and Set JSON methods
// Get and Set JSON methods
virtual std::string Json() = 0; ///< Generate JSON string of this object
virtual void SetJson(const std::string value) = 0; ///< Load JSON string into this object
virtual Json::Value JsonValue() = 0; ///< Generate Json::Value for this object
Expand Down
2 changes: 1 addition & 1 deletion src/CacheDisk.h
Expand Up @@ -124,7 +124,7 @@ namespace openshot {
/// @param end_frame_number The ending frame number of the cached frame
void Remove(int64_t start_frame_number, int64_t end_frame_number);

/// Get and Set JSON methods
// Get and Set JSON methods
std::string Json(); ///< Generate JSON string of this object
void SetJson(const std::string value); ///< Load JSON string into this object
Json::Value JsonValue(); ///< Generate Json::Value for this object
Expand Down
2 changes: 1 addition & 1 deletion src/CacheMemory.h
Expand Up @@ -108,7 +108,7 @@ namespace openshot {
/// @param end_frame_number The ending frame number of the cached frame
void Remove(int64_t start_frame_number, int64_t end_frame_number);

/// Get and Set JSON methods
// Get and Set JSON methods
std::string Json(); ///< Generate JSON string of this object
void SetJson(const std::string value); ///< Load JSON string into this object
Json::Value JsonValue(); ///< Generate Json::Value for this object
Expand Down
2 changes: 1 addition & 1 deletion src/ChunkReader.h
Expand Up @@ -150,7 +150,7 @@ namespace openshot
/// Return the type name of the class
std::string Name() override { return "ChunkReader"; };

/// Get and Set JSON methods
// Get and Set JSON methods
std::string Json() const override; ///< Generate JSON string of this object
void SetJson(const std::string value) override; ///< Load JSON string into this object
Json::Value JsonValue() const override; ///< Generate Json::Value for this object
Expand Down
18 changes: 9 additions & 9 deletions src/Clip.h
Expand Up @@ -37,8 +37,8 @@
#include <opencv2/opencv.hpp>
#include <opencv2/core.hpp>
#undef uint64
#undef int64
#undef int64

#endif

#include <memory>
Expand Down Expand Up @@ -120,8 +120,8 @@ namespace openshot {

private:
bool waveform; ///< Should a waveform be used instead of the clip's image
std::list<openshot::EffectBase*> effects; ///<List of clips on this timeline
bool is_open; ///> Is Reader opened
std::list<openshot::EffectBase*> effects; ///< List of clips on this timeline
bool is_open; ///< Is Reader opened

// Audio resampler (if time mapping)
openshot::AudioResampler *resampler;
Expand Down Expand Up @@ -243,11 +243,11 @@ namespace openshot {
/// Get the current reader
openshot::ReaderBase* Reader();

/// Override End() method
// Override End() method
float End() const; ///< Get end position (in seconds) of clip (trim end of video), which can be affected by the time curve.
void End(float value) { end = value; } ///< Set end position (in seconds) of clip (trim end of video)

/// Get and Set JSON methods
// Get and Set JSON methods
std::string Json() const override; ///< Generate JSON string of this object
void SetJson(const std::string value) override; ///< Load JSON string into this object
Json::Value JsonValue() const override; ///< Generate Json::Value for this object
Expand All @@ -261,7 +261,7 @@ namespace openshot {
/// @param effect Remove an effect from the clip.
void RemoveEffect(openshot::EffectBase* effect);

/// Waveform property
// Waveform property
bool Waveform() { return waveform; } ///< Get the waveform property of this clip
void Waveform(bool value) { waveform = value; } ///< Set the waveform property of this clip

Expand Down Expand Up @@ -296,11 +296,11 @@ namespace openshot {
openshot::Keyframe perspective_c4_x; ///< Curves representing X for coordinate 4
openshot::Keyframe perspective_c4_y; ///< Curves representing Y for coordinate 4

/// Audio channel filter and mappings
// Audio channel filter and mappings
openshot::Keyframe channel_filter; ///< A number representing an audio channel to filter (clears all other channels)
openshot::Keyframe channel_mapping; ///< A number representing an audio channel to output (only works when filtering a channel)

/// Override has_video and has_audio properties of clip (and their readers)
// Override has_video and has_audio properties of clip (and their readers)
openshot::Keyframe has_audio; ///< An optional override to determine if this clip has audio (-1=undefined, 0=no, 1=yes)
openshot::Keyframe has_video; ///< An optional override to determine if this clip has video (-1=undefined, 0=no, 1=yes)
};
Expand Down
6 changes: 3 additions & 3 deletions src/ClipBase.h
Expand Up @@ -103,7 +103,7 @@ namespace openshot {
/// @param frame_number The frame number (starting at 1) of the clip or effect on the timeline.
virtual std::shared_ptr<openshot::Frame> GetFrame(std::shared_ptr<openshot::Frame> frame, int64_t frame_number) = 0;

/// Get basic properties
// Get basic properties
std::string Id() const { return id; } ///< Get the Id of this clip object
float Position() const { return position; } ///< Get position on timeline (in seconds)
int Layer() const { return layer; } ///< Get layer of clip on timeline (lower number is covered by higher numbers)
Expand All @@ -112,15 +112,15 @@ namespace openshot {
float Duration() const { return end - start; } ///< Get the length of this clip (in seconds)
openshot::TimelineBase* ParentTimeline() { return timeline; } ///< Get the associated Timeline pointer (if any)

/// Set basic properties
// Set basic properties
void Id(std::string value) { id = value; } ///> Set the Id of this clip object
void Position(float value) { position = value; } ///< Set position on timeline (in seconds)
void Layer(int value) { layer = value; } ///< Set layer of clip on timeline (lower number is covered by higher numbers)
void Start(float value) { start = value; } ///< Set start position (in seconds) of clip (trim start of video)
void End(float value) { end = value; } ///< Set end position (in seconds) of clip (trim end of video)
void ParentTimeline(openshot::TimelineBase* new_timeline) { timeline = new_timeline; } ///< Set associated Timeline pointer

/// Get and Set JSON methods
// Get and Set JSON methods
virtual std::string Json() const = 0; ///< Generate JSON string of this object
virtual void SetJson(const std::string value) = 0; ///< Load JSON string into this object
virtual Json::Value JsonValue() const = 0; ///< Generate Json::Value for this object
Expand Down
2 changes: 1 addition & 1 deletion src/Color.h
Expand Up @@ -68,7 +68,7 @@ namespace openshot {
/// Get the distance between 2 RGB pairs. (0=identical colors, 10=very close colors, 760=very different colors)
static long GetDistance(long R1, long G1, long B1, long R2, long G2, long B2);

/// Get and Set JSON methods
// Get and Set JSON methods
std::string Json() const; ///< Generate JSON string of this object
Json::Value JsonValue() const; ///< Generate Json::Value for this object
void SetJson(const std::string value); ///< Load JSON string into this object
Expand Down
2 changes: 1 addition & 1 deletion src/Coordinate.h
Expand Up @@ -68,7 +68,7 @@ namespace openshot {
/// @param co A std::pair<double, double> tuple containing (X, Y)
Coordinate(const std::pair<double, double>& co);

/// Get and Set JSON methods
// Get and Set JSON methods
std::string Json() const; ///< Generate JSON string of this object
Json::Value JsonValue() const; ///< Generate Json::Value for this object
void SetJson(const std::string value); ///< Load JSON string into this object
Expand Down
1 change: 0 additions & 1 deletion src/CrashHandler.h
Expand Up @@ -63,7 +63,6 @@ namespace openshot {
CrashHandler(CrashHandler const&) = delete; // Don't allow the user to copy this instance

/// Default assignment operator
//CrashHandler & operator=(CrashHandler const&){}; // Don't allow the user to assign this instance
CrashHandler & operator=(CrashHandler const&) = delete; // Don't allow the user to assign this instance

/// Private variable to keep track of singleton instance
Expand Down
2 changes: 1 addition & 1 deletion src/DecklinkReader.h
Expand Up @@ -116,7 +116,7 @@ namespace openshot
/// Return the type name of the class
std::string Name() { return "DecklinkReader"; };

/// Get and Set JSON methods
// Get and Set JSON methods
std::string Json() const override; ///< Generate JSON string of this object
void SetJson(const std::string value); ///< Load JSON string into this object
Json::Value JsonValue() const; ///< Generate Json::Value for this object
Expand Down
2 changes: 1 addition & 1 deletion src/DummyReader.h
Expand Up @@ -142,7 +142,7 @@ namespace openshot
/// Return the type name of the class
std::string Name() override { return "DummyReader"; };

/// Get and Set JSON methods
// Get and Set JSON methods
std::string Json() const override; ///< Generate JSON string of this object
void SetJson(const std::string value) override; ///< Load JSON string into this object
Json::Value JsonValue() const override; ///< Generate Json::Value for this object
Expand Down
2 changes: 1 addition & 1 deletion src/EffectBase.h
Expand Up @@ -92,7 +92,7 @@ namespace openshot
/// Set parent clip object of this effect
void ParentClip(openshot::ClipBase* new_clip);

/// Get and Set JSON methods
// Get and Set JSON methods
virtual std::string Json() const = 0; ///< Generate JSON string of this object
virtual void SetJson(const std::string value) = 0; ///< Load JSON string into this object
virtual Json::Value JsonValue() const = 0; ///< Generate Json::Value for this object
Expand Down
4 changes: 2 additions & 2 deletions src/EffectInfo.h
Expand Up @@ -47,10 +47,10 @@ namespace openshot
class EffectInfo
{
public:
// Create an instance of an effect (factory style)
/// Create an instance of an effect (factory style)
EffectBase* CreateEffect(std::string effect_type);

/// JSON methods
// JSON methods
static std::string Json(); ///< Generate JSON string of this object
static Json::Value JsonValue(); ///< Generate Json::Value for this object

Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions.h
Expand Up @@ -41,7 +41,7 @@ namespace openshot {
* A std::exception-derived exception class with custom message.
* All OpenShot exception classes inherit from this class.
*/
class ExceptionBase : public std::exception //: public exception
class ExceptionBase : public std::exception
{
protected:
std::string m_message;
Expand Down
2 changes: 1 addition & 1 deletion src/FFmpegReader.h
Expand Up @@ -265,7 +265,7 @@ namespace openshot {
/// Return the type name of the class
std::string Name() override { return "FFmpegReader"; };

/// Get and Set JSON methods
// Get and Set JSON methods
std::string Json() const override; ///< Generate JSON string of this object
void SetJson(const std::string value) override; ///< Load JSON string into this object
Json::Value JsonValue() const override; ///< Generate Json::Value for this object
Expand Down
2 changes: 1 addition & 1 deletion src/FrameMapper.h
Expand Up @@ -199,7 +199,7 @@ namespace openshot
/// Return the type name of the class
std::string Name() override { return "FrameMapper"; };

/// Get and Set JSON methods
// Get and Set JSON methods
std::string Json() const override; ///< Generate JSON string of this object
void SetJson(const std::string value) override; ///< Load JSON string into this object
Json::Value JsonValue() const override; ///< Generate Json::Value for this object
Expand Down
2 changes: 1 addition & 1 deletion src/ImageReader.h
Expand Up @@ -107,7 +107,7 @@ namespace openshot
/// Return the type name of the class
std::string Name() override { return "ImageReader"; };

/// Get and Set JSON methods
// Get and Set JSON methods
std::string Json() const override; ///< Generate JSON string of this object
void SetJson(const std::string value) override; ///< Load JSON string into this object
Json::Value JsonValue() const override; ///< Generate Json::Value for this object
Expand Down
2 changes: 1 addition & 1 deletion src/KeyFrame.h
Expand Up @@ -126,7 +126,7 @@ namespace openshot {
/// Get the direction of the curve at a specific index (increasing or decreasing)
bool IsIncreasing(int index) const;

/// Get and Set JSON methods
// Get and Set JSON methods
std::string Json() const; ///< Generate JSON string of this object
Json::Value JsonValue() const; ///< Generate Json::Value for this object
void SetJson(const std::string value); ///< Load JSON string into this object
Expand Down
2 changes: 1 addition & 1 deletion src/Point.h
Expand Up @@ -118,7 +118,7 @@ namespace openshot
/// Set the right handle to a percent of the primary coordinate (0 to 1)
void Initialize_RightHandle(float x, float y);

/// Get and Set JSON methods
// Get and Set JSON methods
std::string Json() const; ///< Generate JSON string of this object
Json::Value JsonValue() const; ///< Generate Json::Value for this object
void SetJson(const std::string value); ///< Load JSON string into this object
Expand Down
2 changes: 1 addition & 1 deletion src/Profiles.h
Expand Up @@ -88,7 +88,7 @@ namespace openshot
/// @param path The folder path / location of a profile file
Profile(std::string path);

/// Get and Set JSON methods
// Get and Set JSON methods
std::string Json() const; ///< Generate JSON string of this object
Json::Value JsonValue() const; ///< Generate Json::Value for this object
void SetJson(const std::string value); ///< Load JSON string into this object
Expand Down
2 changes: 1 addition & 1 deletion src/QtHtmlReader.h
Expand Up @@ -132,7 +132,7 @@ namespace openshot
/// Return the type name of the class
std::string Name() override { return "QtHtmlReader"; };

/// Get and Set JSON methods
// Get and Set JSON methods
std::string Json() const override; ///< Generate JSON string of this object
void SetJson(const std::string value) override; ///< Load JSON string into this object
Json::Value JsonValue() const override; ///< Generate Json::Value for this object
Expand Down
2 changes: 1 addition & 1 deletion src/QtImageReader.h
Expand Up @@ -114,7 +114,7 @@ namespace openshot
/// Return the type name of the class
std::string Name() override { return "QtImageReader"; };

/// Get and Set JSON methods
// Get and Set JSON methods
std::string Json() const override; ///< Generate JSON string of this object
void SetJson(const std::string value) override; ///< Load JSON string into this object
Json::Value JsonValue() const override; ///< Generate Json::Value for this object
Expand Down
2 changes: 1 addition & 1 deletion src/QtTextReader.h
Expand Up @@ -143,7 +143,7 @@ namespace openshot
/// Return the type name of the class
std::string Name() override { return "QtTextReader"; };

/// Get and Set JSON methods
// Get and Set JSON methods
std::string Json() const override; ///< Generate JSON string of this object
void SetJson(const std::string value) override; ///< Load JSON string into this object
Json::Value JsonValue() const override; ///< Generate Json::Value for this object
Expand Down
2 changes: 1 addition & 1 deletion src/ReaderBase.h
Expand Up @@ -139,7 +139,7 @@ namespace openshot
/// Return the type name of the class
virtual std::string Name() = 0;

/// Get and Set JSON methods
// Get and Set JSON methods
virtual std::string Json() const = 0; ///< Generate JSON string of this object
virtual void SetJson(const std::string value) = 0; ///< Load JSON string into this object
virtual Json::Value JsonValue() const = 0; ///< Generate Json::Value for this object
Expand Down
2 changes: 1 addition & 1 deletion src/TextReader.h
Expand Up @@ -141,7 +141,7 @@ namespace openshot
/// Return the type name of the class
std::string Name() override { return "TextReader"; };

/// Get and Set JSON methods
// Get and Set JSON methods
std::string Json() const override; ///< Generate JSON string of this object
void SetJson(const std::string value) override; ///< Load JSON string into this object
Json::Value JsonValue() const override; ///< Generate Json::Value for this object
Expand Down

0 comments on commit 8278496

Please sign in to comment.