Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
27th July 2008, 17:10 | #21 | Link | |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
Quote:
As a workaround, could rotation about an arbitrary center point (x, y) be achieved as follows? : - use the fractional crop feature of the resizers to shift (x, y) in the image to the nearest integral point (x', y'); - apply the rotation about (x', y') - reverse the shift If this approach is valid, it could be done in a script wrapper by the user, or even built into the plugin itself if you think it is useful. |
|
29th July 2008, 03:10 | #22 | Link |
Registered User
Join Date: Jul 2003
Location: India
Posts: 890
|
Yes it works on floats internally. But I use my this rotation helper function in several of my other pieces of software and changing this may render others disfunctional. Thats the reason I had the objection.
On second thoughts I will try to make a different helper for this effectrotation as soon as I get time. As I am using only bilinear interpolation, possibly I will change it to bicubic to improve quality. The speed will suffer. Is this worth all the trouble? Where exactly you need rotation axis at fractional pixel values? The other approaches you suggest are feasible but as they involve one additional interpolation the quality is likely to suffer. |
29th July 2008, 08:25 | #23 | Link |
Resize Abuser
Join Date: Apr 2005
Location: Seattle, WA
Posts: 623
|
I was going along with Gavino, I thought it would have been fairly easy to do. Subpixel (x,y) precision is always nice to have, but if its too much of a pain don't worry about it. I don't have a specific need for it; i could see that if someone used animate, it would be nice to have float precision.
Any chance that you could select the resizer function, have a speed/quality variable? like 0-2, 0 being Nearest Neighbor, 1 bilinear, 2 bicubic.
__________________
Mine: KenBurnsEffect/ZoomBox CutFrames Helped: DissolveAGG ColorBalance LQ Animation Fixer |
30th July 2008, 12:44 | #25 | Link | ||
Registered User
Join Date: Jul 2003
Location: India
Posts: 890
|
Quote:
Quote:
I am curious. How much precision in the rotation axis is really required? 0.5, 0.25? or any arbitrary precision? |
||
30th July 2008, 20:12 | #26 | Link |
AviSynth plugger
Join Date: Nov 2003
Location: Russia
Posts: 2,183
|
i have shift, zoom and rotation engine in my Depan plugin (up to bicubic), but it is slow and uglyest code I ever wrote.
So I made attempt to rewrote it.
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick I usually do not provide a technical support in private messages. |
30th July 2008, 20:41 | #27 | Link |
Resize Abuser
Join Date: Apr 2005
Location: Seattle, WA
Posts: 623
|
What are the chances of one of these rotate code bases going into the avisynth core? I think it's one of the fundamental effects that you can do to an image/video so it wouldn't be out of place if it did go in. I have no idea how that process takes place, but I do believe a rotate function does belong in the core. Following Gimp, positive rotation would be clockwise.
You could have named functions just like resize PointRotate BilinearRotate BicubicRotate ect.. @vcmohan I really don't see a need for anything more then 1/2 pixel, but if if you can have arbitrary precision like in the resize's crop option then that is always a plus; limiting what can be done codewise is not always the best idea. Gimp's UI limits center x/y to int's unless you type it in; it also allows the center to be out of bounds of the image.
__________________
Mine: KenBurnsEffect/ZoomBox CutFrames Helped: DissolveAGG ColorBalance LQ Animation Fixer |
1st December 2008, 11:00 | #31 | Link |
also known as GrassHoppeR
Join Date: Mar 2006
Location: Poland
Posts: 30
|
i work on PAL Widescreen (anamorphic) clips so when i want to rotate i must do something like:
Code:
lanczosresize(1024,576).Rotate(-45).lanczosresize(720,576) http://img224.imageshack.us/img224/1997/par1vg9.jpg without and with PAR correction pozdrawiam Last edited by PeaceAnt; 1st December 2008 at 11:02. |
1st December 2008, 13:32 | #32 | Link |
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
The fast triple shear algorithm assumes square pixels, so this filter cannot be made to directly compensate for PAR.
Mohan's version uses the slower direct 2d interpolation, for that algorithm PAR compensation would be possible. |
19th May 2009, 07:54 | #33 | Link |
Registered User
Join Date: Apr 2009
Location: Norway
Posts: 30
|
Hi, great plug-in. If one rotates an image & expands it, I think the new width & height that will fit the rotated image is given by h2 = round( w*sin(a)+h*cos(a) ) and w2 = round( w*cos(a)+h*sin(a) ), maybe one could just choose false or true to expand the image to this size
|
19th May 2009, 08:09 | #34 | Link |
Registered User
Join Date: Apr 2009
Location: Norway
Posts: 30
|
Sometimes I also get an CAVISynthStream system exception access violation at ... reading from ...
when specifying values for the new width & height. I get this error often ih the new width & height are larger than h2/w2 I mentioned in my last post. Does the new width/height have to be divisible by 2 or 4 or something like that? Ivar |
30th August 2009, 02:50 | #35 | Link |
Registered User
Join Date: Aug 2009
Posts: 10
|
Rotate endangle?
If I use Rotate, it works fine for the entire file, but if I do this:
"Rotate(angle = 10 ,endangle = 180)", it doesn't gradually change the rotation angle. This "Rotate(angle = 10 ,start = 20, end = 100, endangle = 180)", also doesn't gradually rotate the frames. It does rotate the frames starting at 20 and ending at 100 though. So I know it is partially working. Thanks for the help, ...anyone....anyone? |
9th September 2009, 20:19 | #36 | Link |
AviSynth plugger
Join Date: Nov 2003
Location: Russia
Posts: 2,183
|
Terrachild, fixed in new v1.3.3
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick I usually do not provide a technical support in private messages. |
10th September 2009, 17:39 | #37 | Link |
Registered User
Join Date: Mar 2005
Posts: 366
|
I wonder if the Zoom plugin could benefit of this rotation code by somehow replacing the rotation calculations?
__________________
DVD slideshow GUI(Freeware). |
11th September 2009, 08:19 | #38 | Link |
Resize Abuser
Join Date: Apr 2005
Location: Seattle, WA
Posts: 623
|
@tin3tin
I considered incorporating a separate rotate plugin (like Fizick's) for KBE() but decide against it last year. So that almost became a complete replacement for Zoom()
__________________
Mine: KenBurnsEffect/ZoomBox CutFrames Helped: DissolveAGG ColorBalance LQ Animation Fixer |
11th September 2009, 13:36 | #39 | Link |
Registered User
Join Date: Mar 2005
Posts: 366
|
Zoom is offers al lot of posibilities with 20 optional keyframes and such - but the quality and speed could be better - so the question is if this rotation code more or less could be liftet into Zoom?
__________________
DVD slideshow GUI(Freeware). |
11th September 2009, 22:44 | #40 | Link | |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
Quote:
If that's what you mean, note that you can do the same thing with any filter (including Rotate) by using Spline inside ScriptClip. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|