Reform
(Reform: add documentation) |
(few corrections) |
||
Line 4: | Line 4: | ||
|2=Dec 27, 2012 | |2=Dec 27, 2012 | ||
|3=[http://www.avisynth.nl/users/vcmohan/Reform/Reform.zip Reform.zip] | |3=[http://www.avisynth.nl/users/vcmohan/Reform/Reform.zip Reform.zip] | ||
− | |4= | + | |4=Transformation |
|5=[https://www.gnu.org/licenses/gpl-2.0.txt GPLv2] | |5=[https://www.gnu.org/licenses/gpl-2.0.txt GPLv2] | ||
− | |6=[https://forum.doom9.org/showthread.php? | + | |6=[https://forum.doom9.org/showthread.php?p=605102#post605102 Doom9 Forum]}} |
− | + | ||
<br> | <br> | ||
== Description == | == Description == | ||
Line 24: | Line 23: | ||
* See official documentation: http://www.avisynth.nl/users/vcmohan/Reform/Reform.html | * See official documentation: http://www.avisynth.nl/users/vcmohan/Reform/Reform.html | ||
+ | * For AviSynth+ see [[movePlus]], includes high bit depth colorspace support and 64-bit. | ||
<br> | <br> | ||
== Requirements == | == Requirements == | ||
Line 109: | Line 109: | ||
<br> | <br> | ||
----------------------------------------------- | ----------------------------------------------- | ||
− | '''Back to [[External_filters|External Filters]] ←''' | + | '''Back to [[External_filters#Rotation.2FShear.2FSkew.2FPerspective|External Filters]] ←''' |
Latest revision as of 07:32, 9 June 2020
Abstract | |
---|---|
Author | V. C. Mohan |
Version | Dec 27, 2012 |
Download | Reform.zip |
Category | Transformation |
License | GPLv2 |
Discussion | Doom9 Forum |
Contents |
[edit] Description
Reform plugin does a geometric transformation and in certain cases may produce artifacts. Reformer Plugin which does Matrix operations gives better results and if possible switch to that plugin.
This plugin is meant for correcting minor distortions. If used for very large distortions most likely the linearity assumptions and interpolation quality will suffer. Artifacts may appear especially in case of deskew function.
There are 2 functions included in this plugin. These are:
Deskew
: Converts a quadrilateral to a rectangle.
Skew
: Converts a rectangle to a quadrilateral.
Most of the parameters can be linearly varied over the length of the effect, and so it can be used to distort or correct distorted faces or objects progressively. The parameters for both these functions are identical. For reading coordinates correctly the plugin Grid can be used. Interpolation options are Lanczos 6x6, cubic 4x4, linear 2x2 and nearest point It has to be ensured that the quadrilateral is convex
- See official documentation: http://www.avisynth.nl/users/vcmohan/Reform/Reform.html
- For AviSynth+ see movePlus, includes high bit depth colorspace support and 64-bit.
[edit] Requirements
[edit] Syntax and Parameters
- Deskew (clip, clip, string "resize", float "ltopx", float "ltopy", float "lbotx", float "lboty", float "rtopx", float "rtopy", float "rbotx", float "rboty", float "leftx", float "rightx", float "ytop", float "ybot", float "eltopx", float "eltopy", float "elbotx", float "elboty", float "ertopx", float "ertopy", float "erbotx", float "erboty", float "eleftx", float "erightx", float "eytop", float "eybot")
- Skew (clip, clip, string "resize", float "ltopx", float "ltopy", float "lbotx", float "lboty", float "rtopx", float "rtopy", float "rbotx", float "rboty", float "leftx", float "rightx", float "ytop", float "ybot", float "eltopx", float "eltopy", float "elbotx", float "elboty", float "ertopx", float "ertopy", float "erbotx", float "erboty", float "eleftx", float "erightx", float "eytop", float "eybot")
- clip =
- Input clip to be skewed or deskewed.
- clip =
- clip =
- Background clip.
- clip =
- string resize = "lanczos"
- Resize interpolation to use:
"lanczos" | "line" | "point"
- Resize interpolation to use:
- string resize = "lanczos"
- float ltopx = 0
- float ltopy = 0
- Quadrilateral left top x and y coordinates.
- float ltopx = 0
- float lbotx = 0
- float lboty = height-1
- Quadrilateral left bottom x and y coordinates.
- float lbotx = 0
- float rtopx = width-1
- float rtopy = 0
- Quadrilateral right top x and y coordinates.
- float rtopx = width-1
- float rbotx = width-1
- float rboty = height-1
- Quadrilateral right bottom x and y coordinates.
- float rbotx = width-1
- float leftx = 0
- float rightx = width-1
- Rectangle coordinates: leftx and rightx.
- float leftx = 0
- float ytop = 0
- float ybot = height-1
- Rectangle coordinates: top y and bottom y.
- float ytop = 0
- float eltopx = ltopx
- float eltopy = ltopy
- End frame, Quadrilateral left top x and y coordinates.
- float eltopx = ltopx
- float elbotx = lbotx
- float elboty = lboty
- End frame, Quadrilateral left bottom x and y coordinates.
- float elbotx = lbotx
- float ertopx = rtopx
- float ertopy = rtopy
- End frame, Quadrilateral right top x and y coordinates.
- float ertopx = rtopx
- float erbotx = rbotx
- float erboty = rboty
- End frame, Quadrilateral right bottom x and y coordinates.
- float erbotx = rbotx
- float eleftx = leftx
- float erightx = rightx
- End frame Rectanlge coordinates: left x and right x.
- float eleftx = leftx
- float eytop = ytop
- float eybot = ybot
- End frame Rectanlge coordinates: top y and bottom y.
- float eytop = ytop
[edit] Examples
Script example:
ColorBars().ConvertToRGB32() img = avisource("..........") bg = blankclip(img, color = ...) deskew(img, bg,ltopx=44,ltopy=17,lbotx=34,lboty=470,rtopx=612,rtopy=70,rbotx=684,rboty=426) deskew(img, bg,ltopx=44,ltopy=17,lbotx=34,lboty=470,color=$ff00, resize = "point") skew(img, bg,ltopx=44,ltopy=17,lbotx=34,lboty=470,rtopx=612,rtopy=70,rbotx=684,rboty=426) skew(img, bg,ltopx=44,ltopy=17,lbotx=34,lboty=470,color=$ff00, resize = "line")
Back to External Filters ←