Class: Tracksperanto::Tool::LensDisto
- Includes:
- UVCoordinates
- Defined in:
- lib/tools/lens_disto.rb
Defined Under Namespace
Constant Summary collapse
- STEPS =
256
Class Method Summary collapse
Instance Method Summary collapse
Methods included from UVCoordinates
#absolute_to_uv, #convert_from_uv, #convert_to_uv
Methods inherited from Base
Methods included from Parameters
Methods included from SimpleExport
Methods included from ConstName
Methods included from BlockInit
Methods included from Casts
#cast_to_bool, #cast_to_float, #cast_to_int, #cast_to_string
Constructor Details
This class inherits a constructor from Tracksperanto::Tool::Base
Class Method Details
.action_description ⇒ Object
11 12 13 |
# File 'lib/tools/lens_disto.rb', line 11 def self.action_description "Apply or remove lens distortion with the Syntheyes algorithm" end |
Instance Method Details
#export_point(frame, float_x, float_y, float_residual) ⇒ Object
23 24 25 26 |
# File 'lib/tools/lens_disto.rb', line 23 def export_point(frame, float_x, float_y, float_residual) x, y = remove ? undisto(float_x, float_y) : disto(float_x, float_y) super(frame, x, y, float_residual) end |
#start_export(w, h) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/tools/lens_disto.rb', line 15 def start_export(w, h) @width, @height = w, h @aspect = @width.to_f / @height generate_lut super end |