Reformer
From Avisynth wiki
(Difference between revisions)
(Created page with " {{FilterCat4|External_filters|Plugins|<!-- category -->TODO|<!-- category -->TODO}} {{Filter3 |1=<!-- author -->[http://www.avisynth.nl/users/vcmohan/ V.C.Mohan] |2=<!-- ver...") |
m (→Requirements: AviSynth 2.6) |
||
Line 17: | Line 17: | ||
<br> | <br> | ||
== Requirements == | == Requirements == | ||
− | * <!-- Avisynth version -->AviSynth 2.5.8 or [http://sourceforge.net/projects/avisynth2 | + | * <!-- Avisynth version -->AviSynth 2.5.8 or [http://sourceforge.net/projects/avisynth2/ 2.6.0] or greater |
* <!-- source video: progressive | * <!-- source video: progressive | ||
* <!-- color formats -->Supported color formats: [[RGB32]], [[RGB24]], [[YUY2]], [[YV12]], <span style="color:red">*</span>[[YV16]], <span style="color:red">*</span>[[YV24]], <span style="color:red">*</span>[[YV411]], <span style="color:red">*</span>[[Y8]] | * <!-- color formats -->Supported color formats: [[RGB32]], [[RGB24]], [[YUY2]], [[YV12]], <span style="color:red">*</span>[[YV16]], <span style="color:red">*</span>[[YV24]], <span style="color:red">*</span>[[YV411]], <span style="color:red">*</span>[[Y8]] | ||
Line 29: | Line 29: | ||
"[eltopx]f[eltopy]f[elbotx]f[elboty]f[ertopx]f[ertopy]f[erbotx]f[erboty]f" | "[eltopx]f[eltopy]f[elbotx]f[elboty]f[ertopx]f[ertopy]f[erbotx]f[erboty]f" | ||
"[eleftx]f[erightx]f[eytop]f[eybot]f" | "[eleftx]f[erightx]f[eytop]f[eybot]f" | ||
+ | |||
== [[Script variables|Syntax and Parameters]] == | == [[Script variables|Syntax and Parameters]] == | ||
:{{Template:FuncDef|<!-- function name -->q2r or r2q(''clip'', ''<!-- par 1 type -->clip'' "<!-- par 1 name -->", ''<!-- par 2 type -->string'' "<!-- par 2 name -->resize", ''<!-- par 3 type -->float'' "<!-- par 3 name -->ltopx ",''<!-- par 4 type -->float'' <!-- par 4 name -->ltopy",''<!-- par 5 type -->float'' <!-- par 5 name -->lbotx",''<!-- par 6 type -->float'' <!-- par 6 name -->lboty",''<!-- par 7 type -->float'' <!-- par 7 name -->rtopx",''<!-- par 8 type -->float'' <!-- par 8 name -->rtopy",''<!-- par 9 type -->float'' <!-- par 9 name -->rbotx"''<!-- par 10 type -->float'' <!-- par 10 name -->rboty",''<!-- par 11 type -->float'' <!-- par 11 name -->leftx",''<!-- par 12 type -->float'' <!-- par 12 name -->rightx",''<!-- par 13 type -->float'' <!-- par 13 name -->ytop",''<!-- par 14 type -->float'' <!-- par 14 name -->ybot")}} | :{{Template:FuncDef|<!-- function name -->q2r or r2q(''clip'', ''<!-- par 1 type -->clip'' "<!-- par 1 name -->", ''<!-- par 2 type -->string'' "<!-- par 2 name -->resize", ''<!-- par 3 type -->float'' "<!-- par 3 name -->ltopx ",''<!-- par 4 type -->float'' <!-- par 4 name -->ltopy",''<!-- par 5 type -->float'' <!-- par 5 name -->lbotx",''<!-- par 6 type -->float'' <!-- par 6 name -->lboty",''<!-- par 7 type -->float'' <!-- par 7 name -->rtopx",''<!-- par 8 type -->float'' <!-- par 8 name -->rtopy",''<!-- par 9 type -->float'' <!-- par 9 name -->rbotx"''<!-- par 10 type -->float'' <!-- par 10 name -->rboty",''<!-- par 11 type -->float'' <!-- par 11 name -->leftx",''<!-- par 12 type -->float'' <!-- par 12 name -->rightx",''<!-- par 13 type -->float'' <!-- par 13 name -->ytop",''<!-- par 14 type -->float'' <!-- par 14 name -->ybot")}} |
Revision as of 14:33, 31 May 2015
Abstract | |
---|---|
Author | V.C.Mohan |
Version | 1.0.0.0.0 |
Download | 2.5.8 versionReformer 2.6.0 alpha5 version URL -->Reformer |
Category | External filters |
License | GPLv2 |
Discussion | Reformer plugin |
Contents |
Description
Function q2r quadrilateral to rectangle and vice versa r2q for perspective correction of image and a full description is at click me.
Requirements
- AviSynth 2.5.8 or 2.6.0 or greater
- Supported color formats: RGB32, RGB24, YUY2, YV12, *YV16, *YV24, *YV411, *Y8
- * Not available in AviSynth 2.5.8.
"cc[resize]s[ltopx]f[ltopy]f[lbotx]f[lboty]f[rtopx]f[rtopy]f[rbotx]f[rboty]f"
"[leftx]f[rightx]f[ytop]f[ybot]f"
"[eltopx]f[eltopy]f[elbotx]f[elboty]f[ertopx]f[ertopy]f[erbotx]f[erboty]f"
"[eleftx]f[erightx]f[eytop]f[eybot]f"
Syntax and Parameters
- q2r or r2q(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")
- clip =
- Input clip.
- clip =
- clip =
- background clip.
- clip =
- resize string = "lanczos"
- type of interpolation to be used for resizing. lanczos, bicubic, bilinear, nearest point .
- resize string = "lanczos"
- ltopx float = 0
- quadrilateral left top x.
- ltopx float = 0
- ltopy float = 0
- quadrilateral left top y .
- ltopy float = 0
- lbotx float = 0
- quadrilateral left bottom x .
- lbotx float = 0
- lboty float = height - 1
- quadrilateral left bottom y .
- lboty float = height - 1
- rtopx float = frame width -1
- quadrilateral right top x .
- rtopx float = frame width -1
- rtopy float = 0
- quadrilateral right top y .
- rtopy float = 0
- rbotx float = width- 1
- quadrilateral right bottom x .
- rbotx float = width- 1
- rboty float = height- 1
- quadrilateral right bottom y .
- rboty float = height- 1
- leftx float = 0
- Rectangle left x
- leftx float = 0
- rightx float = width - 1
- Rectangle right x
- rightx float = width - 1
- ytop float = 0
- Rectangle top y
- rbotx float = width- 1
- Rectangle bottom y .
- ytop float = 0
Examples
## This is some example code to blur an image. imagereader("C:\..........jpg", end = 10) a = avisource("C;\..........avi").converttoYUY2() converttoyv16() # Rectangle to quadrilateral r2q(last,last,leftx = 100,rightx = 400, ytop = 200, ybot = 480,ltopx=200,ltopy=150, rbotx = 500, rboty = 400, resize= "lanczos") # quad to rectangle excercise c= last
- bg = blankclip(last,color = 0)
ScriptClip("""
h = height(bg)-1 w = width(bg)-1
t = 0.061 *(current_frame) t2 = 0.127 *( current_frame) a = 0.501 + 0.5 * sin(t/pi) t1x = (-0.2*cos(t2)) * w t1y = (0.5-0.5*cos(t2)) * h t2x = (1.0+0.2*cos(t2)) * w t2y = (0.5-0.5*cos(t2)) * h t3x = (1.0+0.2*cos(t2)) * w t3y = (0.5+0.5*cos(t2)) * h t4x = (-0.2*cos(t2)) * w t4y = (0.5+0.5*cos(t2)) * h c1x = (0.5+a*cos(t)) * w c1y = (0.5+a*sin(t)) * h c2x = (0.5-a*sin(t)) * w c2y = (0.5+a*cos(t)) * h c3x = (0.5-a*cos(t)) * w c3y = (0.5-a*sin(t)) * h c4x = (0.5+a*sin(t)) * w c4y = (0.5-a*cos(t)) * h
- r2q(c, c,leftx=t1x,rightx=t2x,ytop=t1y,ybot=t3y,ltopx=c1x,ltopy=c1y, rtopx=c2x,rtopy=c2y, rbotx=c3x,rboty=c3y,lbotx=c4x,lboty=c4y, resize = "line")
q2r( bg,leftx=t1x,rightx=t2x,ytop=t1y,ybot=t3y,ltopx=c1x,ltopy=c1y, rtopx=c2x,rtopy=c2y, rbotx=c3x,rboty=c3y,lbotx=c4x,lboty=c4y, resize = "point" )
Back to External Filters ←