OpenShot Library | libopenshot  1.0.0
DenoiseImage.h
Go to the documentation of this file.
1 
9 // Copyright (c) 2008-2026 OpenShot Studios, LLC
10 //
11 // SPDX-License-Identifier: LGPL-3.0-or-later
12 
13 #ifndef OPENSHOT_DENOISE_IMAGE_EFFECT_H
14 #define OPENSHOT_DENOISE_IMAGE_EFFECT_H
15 
16 #include "../AnimatedCurve.h"
17 #include "../EffectBase.h"
18 #include "../Frame.h"
19 #include "../Json.h"
20 #include "../KeyFrame.h"
21 
22 #include <QImage>
23 
24 #include <cstdint>
25 #include <memory>
26 #include <string>
27 
28 namespace openshot
29 {
30  class DenoiseImage : public EffectBase
31  {
32  private:
33  QImage previous_input_;
34  int64_t last_frame_;
35 
36  void init_effect_details();
37  void reset_temporal_history();
38 
39  public:
46 
47  DenoiseImage();
48  DenoiseImage(Keyframe new_strength, Keyframe new_detail, Keyframe new_temporal,
49  Keyframe new_motion_safety, Keyframe new_color_noise);
50 
51  std::shared_ptr<openshot::Frame> GetFrame(int64_t frame_number) override {
52  return GetFrame(std::make_shared<openshot::Frame>(), frame_number);
53  }
54  std::shared_ptr<openshot::Frame> GetFrame(std::shared_ptr<openshot::Frame> frame, int64_t frame_number) override;
55 
56  std::string Json() const override;
57  Json::Value JsonValue() const override;
58  void SetJson(const std::string value) override;
59  void SetJsonValue(const Json::Value root) override;
60  std::string PropertiesJSON(int64_t requested_frame) const override;
61  };
62 
63 }
64 
65 #endif
AnimatedCurve response_curve
Definition: DenoiseImage.h:45
Json::Value JsonValue() const override
Generate Json::Value for this object.
void SetJson(const std::string value) override
Load JSON string into this object.
std::string PropertiesJSON(int64_t requested_frame) const override
std::string Json() const override
Generate JSON string of this object.
void SetJsonValue(const Json::Value root) override
Load Json::Value into this object.
std::shared_ptr< openshot::Frame > GetFrame(int64_t frame_number) override
This method is required for all derived classes of ClipBase, and returns a new openshot::Frame object...
Definition: DenoiseImage.h:51
This abstract class is the base class, used by all effects in libopenshot.
Definition: EffectBase.h:57
A Keyframe is a collection of Point instances, which is used to vary a number or property over time.
Definition: KeyFrame.h:53
This namespace is the default namespace for all code in the openshot library.
Definition: AnimatedCurve.h:24