14#ifndef OPENSHOT_SHARPEN_EFFECT_H
15#define OPENSHOT_SHARPEN_EFFECT_H
39 void init_effect_details();
80 std::shared_ptr<Frame>
GetFrame(std::shared_ptr<Frame> frame,
int64_t frame_number)
override;
82 {
return GetFrame(std::make_shared<Frame>(),
n); }
85 std::string
Json()
const override;
87 void SetJson(
const std::string value)
override;
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.
A Keyframe is a collection of Point instances, which is used to vary a number or property over time.
This class provides a sharpen effect for video frames.
int mode
Sharpening mode (0 = UnsharpMask, 1 = HighPassBlend)
std::string Json() const override
Get and Set JSON methods.
Keyframe radius
Radius of the blur used in sharpening (0 to 10 pixels for 1080p)
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...
Json::Value JsonValue() const override
Generate Json::Value for this object.
int mask_mode
Mask behavior mode for this effect.
Sharpen()
Default constructor.
void ApplyCustomMaskBlend(std::shared_ptr< QImage > original_image, std::shared_ptr< QImage > effected_image, std::shared_ptr< QImage > mask_image, int64_t frame_number) const override
Optional override for effects with custom mask implementation.
void SetJson(const std::string value) override
Load JSON string into this object.
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...
int channel
Channel to apply sharpening to (0 = All, 1 = Luma, 2 = Chroma)
bool UseCustomMaskBlend(int64_t frame_number) const override
Optional override for effects that need custom mask behavior.
void SetJsonValue(const Json::Value root) override
Load Json::Value into this object.
Keyframe amount
Amount of sharpening to apply (0 to 2)
std::string PropertiesJSON(int64_t requested_frame) const override
Keyframe threshold
Threshold for applying sharpening (0 to 1)
This namespace is the default namespace for all code in the openshot library.
@ SHARPEN_MASK_LIMIT_TO_AREA
@ SHARPEN_MASK_VARY_STRENGTH