Jump to content

Archive:Kdenlive/Manual/Effects/Distort/Defish: Difference between revisions

From KDE Wiki Sandbox
Marko (talk | contribs)
Yurchor (talk | contribs)
No edit summary
Line 1: Line 1:
== Defish ==
==== Defish ====


This effect can transform footage shot with a fisheye lens, to look like it was shot with a rectilinear lens, and vice versa. It can also be used to straighten the video that was shot with one of these wideangle converters, which are only slightly curvy, or with a semi-fisheye camera, like the GoPro hero.
This effect can transform footage shot with a fisheye lens, to look like it was shot with a rectilinear lens, and vice versa. It can also be used to straighten the video that was shot with one of these wideangle converters, which are only slightly curvy, or with a semi-fisheye camera, like the GoPro hero.
Line 6: Line 6:


"Amount"
"Amount"
Controls the amount of (de)distortion applied to the video. It
Controls the amount of (de)distortion applied to the video. It controls the ratio of fisheye focal length to image half diagonal, but
controls the ratio of fisheye focal length to image half diagonal, but
in an nonlinear inverse way, to make the control more "comfortable". It can be adjusted beyond "reasonable" values (which differ between the mapping function types), to produce some looney effects. When exploring this range, and the image disappears, check the scaling, could be that the image became too big or too small to see. For some unreasonable values the image might indeed disappear, when there are math overflows or imaginary results... (types 1 and 2 are more prone to image vanishing). Anyway, when working in the "special effect" range, it is alway worth to try manual scaling. If the video contains zooming through a curvy wideangle adaptor, the needed amount will vary. In this case use keyframing.
in an nonlinear inverse way, to make the control more "comfortable".
It can be adjusted beyond "reasonable" values (which differ between
the mapping function types), to produce some looney effects. When
exploring this range, and the image disappears, check the scaling,
could be that the image became too big or too small to see. For some
unreasonable values the image might indeed disappear, when there are
math overflows or imaginary results... (types 1 and 2 are more prone
to image vanishing). Anyway, when working in the "special effect"
range, it is alway worth to try manual scaling.
If the video contains zooming through a curvy wideangle adaptor, the needed amount will vary. In this case use keyframing.


"DeFish"
"DeFish"
If checked, the transform direction is from fisheye to rectiliear,
 
when not checked, it is rectilinear to fisheye.
If checked, the transform direction is from fisheye to rectiliear, when not checked, it is rectilinear to fisheye.


"Type"
"Type"
Selects the fisheye angular mapping function used, among four
Selects the fisheye angular mapping function used, among four possibilities:
possibilities:
 
* equidistant
* equidistant
* ortographic
* ortographic
* equiarea
* equiarea
* stereographic
* stereographic
Wikipedia has a nice article about these.
Wikipedia has a nice article about these.


Line 38: Line 29:
* scale to fit
* scale to fit
* manual scale
* manual scale
"Fill" means that no empty borders will be left, but some of the
 
input image will be cropped. "Fit" means that no part of the input
"Fill" means that no empty borders will be left, but some of the input image will be cropped. "Fit" means that no part of the input
image will be cropped, but there will be blank areas at the borders.
image will be cropped, but there will be blank areas at the borders.


"Manual Scale"
"Manual Scale"
When "Scaling" is set to manual scale, this control directly
 
affects the image scale, from 1/100 to 100X size. Only has effect when
When "Scaling" is set to manual scale, this control directly affects the image scale, from 1/100 to 100X size. Only has effect when
"Scaling" is set to manual!
"Scaling" is set to manual!


"Interpolator"
"Interpolator"
Selects among seven different interpolators. This allows one to make
Selects among seven different interpolators. This allows one to make a quality/speed tradeoff. The interpolators are ordered from fast, low quality to (very) slow high quality. The spline interpolating polynomials are from Helmut Dersch. For realtime use, option 0 is the fastest, in fact it is equal to no interpolation. In most cases bilinear should be good enough, and on a decent machine should still run in real time. Beyond bicubic, the quality gain is marginal for a single resampling. Lanczos takes an eternity!
a quality/speed tradeoff. The interpolators are ordered from fast, low quality to (very) slow high quality. The spline interpolating
 
polynomials are from Helmut Dersch. For realtime use, option 0 is the
fastest, in fact it is equal to no interpolation. In most cases
bilinear should be good enough, and on a decent machine should still
run in real time. Beyond bicubic, the quality gain is marginal for a
single resampling. Lanczos takes an eternity!
* Nearest neighbor
* Nearest neighbor
* Bilinear
* Bilinear
Line 64: Line 50:


"Aspect Type"
"Aspect Type"
Selects among four pixel aspect ratio presets, and manual:
Selects among four pixel aspect ratio presets, and manual: To get the math right, Defish0r needs to know the pixel aspect
To get the math right, Defish0r needs to know the pixel aspect
ratio.
ratio.
* Square pixels
* Square pixels
* PAL DV 1.067
* PAL DV 1.067
Line 74: Line 60:


"Manual aspect"
"Manual aspect"
When "Aspect Type" is set to option manual variable, this control directly
 
affects the pixel aspect ratio, from 0.5 to 2. Only has effect when
When "Aspect Type" is set to option manual variable, this control directly affects the pixel aspect ratio, from 0.5 to 2. Only has effect when "Aspect Type" is set to manual!
"Aspect Type" is set to manual!




Line 83: Line 68:
1. Tweaking the parameters for best defish
1. Tweaking the parameters for best defish


Take a shot of something like a brick wall or bathroom tiles, that has
Take a shot of something like a brick wall or bathroom tiles, that has a lot of horizontal and vertical straight lines. Be careful to keep the optical axis as perpendicular as possible to the wall (=keep a maximally symmetrical image in the viewfinder). Use this
a lot of horizontal and vertical straight lines. Be careful to keep
the optical axis as perpendicular as possible to the wall (=keep a maximally symmetrical image in the viewfinder). Use this
image to tweak the parameters, primarily amount, type and aspect.
image to tweak the parameters, primarily amount, type and aspect.


Line 91: Line 74:
2. Some examples of Defish0r abuse
2. Some examples of Defish0r abuse


These were tried with PAL DV.  These examples work best, when there is
These were tried with PAL DV.  These examples work best, when there is some interesting action near the center of the image.
some interesting action near the center of the image.


For a kind of roundish kaleidoscope, try this:
For a kind of roundish kaleidoscope, try this:
Amount=775,
Amount=775,
Defish = OFF,
Defish = OFF,
Line 102: Line 85:


Another crazy distortion:
Another crazy distortion:
Amount = 921,
Amount = 921,
Defish = OFF,
Defish = OFF,
Line 109: Line 93:


For an effect, reminiscent of some scenes from the "2001 Spcae Odyssey" try this:
For an effect, reminiscent of some scenes from the "2001 Spcae Odyssey" try this:
Amount = 900,
Amount = 900,
Defish = ON,
Defish = ON,
Type = stereographic,
Type = stereographic,
Scaling = fill
Scaling = fill

Revision as of 16:02, 24 February 2013

Defish

This effect can transform footage shot with a fisheye lens, to look like it was shot with a rectilinear lens, and vice versa. It can also be used to straighten the video that was shot with one of these wideangle converters, which are only slightly curvy, or with a semi-fisheye camera, like the GoPro hero.

PARAMETERS:

"Amount" Controls the amount of (de)distortion applied to the video. It controls the ratio of fisheye focal length to image half diagonal, but in an nonlinear inverse way, to make the control more "comfortable". It can be adjusted beyond "reasonable" values (which differ between the mapping function types), to produce some looney effects. When exploring this range, and the image disappears, check the scaling, could be that the image became too big or too small to see. For some unreasonable values the image might indeed disappear, when there are math overflows or imaginary results... (types 1 and 2 are more prone to image vanishing). Anyway, when working in the "special effect" range, it is alway worth to try manual scaling. If the video contains zooming through a curvy wideangle adaptor, the needed amount will vary. In this case use keyframing.

"DeFish"

If checked, the transform direction is from fisheye to rectiliear, when not checked, it is rectilinear to fisheye.

"Type" Selects the fisheye angular mapping function used, among four possibilities:

  • equidistant
  • ortographic
  • equiarea
  • stereographic

Wikipedia has a nice article about these.

"Scaling" Select among three auto scaling options and manual scale:

  • scale to fill
  • keep center scale
  • scale to fit
  • manual scale

"Fill" means that no empty borders will be left, but some of the input image will be cropped. "Fit" means that no part of the input image will be cropped, but there will be blank areas at the borders.

"Manual Scale"

When "Scaling" is set to manual scale, this control directly affects the image scale, from 1/100 to 100X size. Only has effect when "Scaling" is set to manual!

"Interpolator" Selects among seven different interpolators. This allows one to make a quality/speed tradeoff. The interpolators are ordered from fast, low quality to (very) slow high quality. The spline interpolating polynomials are from Helmut Dersch. For realtime use, option 0 is the fastest, in fact it is equal to no interpolation. In most cases bilinear should be good enough, and on a decent machine should still run in real time. Beyond bicubic, the quality gain is marginal for a single resampling. Lanczos takes an eternity!

  • Nearest neighbor
  • Bilinear
  • Bicubic smooth
  • Bicubic sharp
  • Spline 4x4
  • Spline 6x6
  • Lanczos 16x16

"Aspect Type" Selects among four pixel aspect ratio presets, and manual: To get the math right, Defish0r needs to know the pixel aspect ratio.

  • Square pixels
  • PAL DV 1.067
  • NTSC DV 0.889
  • HDV 1.333
  • manual variable

"Manual aspect"

When "Aspect Type" is set to option manual variable, this control directly affects the pixel aspect ratio, from 0.5 to 2. Only has effect when "Aspect Type" is set to manual!


SOME APPLICATION NOTES

1. Tweaking the parameters for best defish

Take a shot of something like a brick wall or bathroom tiles, that has a lot of horizontal and vertical straight lines. Be careful to keep the optical axis as perpendicular as possible to the wall (=keep a maximally symmetrical image in the viewfinder). Use this image to tweak the parameters, primarily amount, type and aspect.


2. Some examples of Defish0r abuse

These were tried with PAL DV. These examples work best, when there is some interesting action near the center of the image.

For a kind of roundish kaleidoscope, try this:

Amount=775, Defish = OFF, Type = equidistant, Scaling = manual scale, Manual Scale = 300...400

Another crazy distortion:

Amount = 921, Defish = OFF, Type = stereographic, Scaling = manual scale, Manual Scale = 191

For an effect, reminiscent of some scenes from the "2001 Spcae Odyssey" try this:

Amount = 900, Defish = ON, Type = stereographic, Scaling = fill