OpenShot Library | libopenshot 0.5.0
Loading...
Searching...
No Matches
Sharpen.h
Go to the documentation of this file.
1// Sharpen.h
10// Copyright (c) 2008-2025 OpenShot Studios, LLC
11//
12// SPDX-License-Identifier: LGPL-3.0-or-later
13
14#ifndef OPENSHOT_SHARPEN_EFFECT_H
15#define OPENSHOT_SHARPEN_EFFECT_H
16
17#include "EffectBase.h"
18#include "KeyFrame.h"
19#include "Json.h"
20
21#include <string>
22
23namespace openshot {
24
31class Sharpen : public EffectBase {
32private:
34 void init_effect_details();
35
36public:
39
42
45
47 int mode;
48
51
53 Sharpen();
54
57
67 std::shared_ptr<Frame> GetFrame(std::shared_ptr<Frame> frame, int64_t frame_number) override;
68 std::shared_ptr<Frame> GetFrame(int64_t n) override
69 { return GetFrame(std::make_shared<Frame>(), n); }
70
72 std::string Json() const override;
73 Json::Value JsonValue() const override;
74 void SetJson(const std::string value) override;
75 void SetJsonValue(const Json::Value root) override;
76
79 std::string PropertiesJSON(int64_t requested_frame) const override;
80};
81
82} // namespace openshot
83
84#endif // OPENSHOT_SHARPEN_EFFECT_H
Header file for EffectBase class.
Header file for JSON class.
Header file for the Keyframe class.
This abstract class is the base class, used by all effects in libopenshot.
Definition EffectBase.h:54
A Keyframe is a collection of Point instances, which is used to vary a number or property over time.
Definition KeyFrame.h:53
This class provides a sharpen effect for video frames.
Definition Sharpen.h:31
int mode
Sharpening mode (0 = UnsharpMask, 1 = HighPassBlend)
Definition Sharpen.h:47
std::string Json() const override
Get and Set JSON methods.
Definition Sharpen.cpp:335
Keyframe radius
Radius of the blur used in sharpening (0 to 10 pixels for 1080p)
Definition Sharpen.h:41
std::shared_ptr< Frame > GetFrame(std::shared_ptr< Frame > frame, int64_t frame_number) override
This method is required for all derived classes of EffectBase, and returns a modified openshot::Frame...
Definition Sharpen.cpp:194
Json::Value JsonValue() const override
Generate Json::Value for this object.
Definition Sharpen.cpp:340
Sharpen()
Default constructor.
Definition Sharpen.cpp:24
void SetJson(const std::string value) override
Load JSON string into this object.
Definition Sharpen.cpp:353
std::shared_ptr< Frame > GetFrame(int64_t n) override
This method is required for all derived classes of ClipBase, and returns a new openshot::Frame object...
Definition Sharpen.h:68
int channel
Channel to apply sharpening to (0 = All, 1 = Luma, 2 = Chroma)
Definition Sharpen.h:50
void SetJsonValue(const Json::Value root) override
Load Json::Value into this object.
Definition Sharpen.cpp:359
Keyframe amount
Amount of sharpening to apply (0 to 2)
Definition Sharpen.h:38
std::string PropertiesJSON(int64_t requested_frame) const override
Definition Sharpen.cpp:375
Keyframe threshold
Threshold for applying sharpening (0 to 1)
Definition Sharpen.h:44
This namespace is the default namespace for all code in the openshot library.
Definition Compressor.h:29