13#ifndef OPENSHOT_SPHERICAL_PROJECTION_EFFECT_H
14#define OPENSHOT_SPHERICAL_PROJECTION_EFFECT_H
34 void init_effect_details();
86 std::shared_ptr<Frame>
GetFrame(int64_t frame_number)
override {
87 return GetFrame(std::make_shared<Frame>(), frame_number);
91 std::shared_ptr<Frame>
GetFrame(std::shared_ptr<Frame> frame,
92 int64_t frame_number)
override;
95 std::string
Json()
const override;
96 void SetJson(std::string value)
override;
99 std::string
PropertiesJSON(int64_t requested_frame)
const override;
102 void project_input(
double dx,
double dy,
double dz,
double in_fov_r,
int W,
103 int H,
double &uf,
double &vf)
const;
105 mutable std::vector<float> uv_map;
106 mutable int cached_width = 0;
107 mutable int cached_height = 0;
108 mutable double cached_yaw = 0.0, cached_pitch = 0.0, cached_roll = 0.0;
109 mutable double cached_in_fov = 0.0, cached_out_fov = 0.0;
110 mutable int cached_input_model = -1;
111 mutable int cached_projection_mode = -1;
112 mutable int cached_invert = -1;
Header file for EffectBase class.
Header file for Frame 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.
int projection_mode
0=Sphere, 1=Hemisphere, 2=Fisheye
Keyframe in_fov
Source lens coverage / FOV (degrees).
void SetJson(std::string value) override
Load JSON string into this object.
void SetJsonValue(Json::Value root) override
Load Json::Value into this object.
Keyframe yaw
Yaw around up-axis (degrees).
Keyframe fov
Output field-of-view (degrees).
Json::Value JsonValue() const override
Generate Json::Value for this object.
int invert
0=Normal, 1=Invert (back lens / +180°)
@ MODE_FISHEYE_ORTHOGRAPHIC
@ MODE_FISHEYE_STEREOGRAPHIC
@ MODE_FISHEYE_EQUIDISTANT
@ INPUT_FEQ_STEREOGRAPHIC
std::shared_ptr< Frame > GetFrame(int64_t frame_number) override
ClipBase override: create a fresh Frame then call the main GetFrame.
Keyframe roll
Roll around forward-axis (degrees).
SphericalProjection()
Blank ctor (for JSON deserialization).
Keyframe pitch
Pitch around right-axis (degrees).
std::shared_ptr< Frame > GetFrame(std::shared_ptr< Frame > frame, int64_t frame_number) override
EffectBase override: reproject the QImage.
int input_model
0=Equirect, 1=Fisheye-Equidistant
std::string Json() const override
Generate JSON string of this object.
std::string PropertiesJSON(int64_t requested_frame) const override
int interpolation
0=Nearest, 1=Bilinear, 2=Bicubic, 3=Auto
This namespace is the default namespace for all code in the openshot library.