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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 14th January 2019, 19:39   #1  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 1,675
warp - geometry correction with control points (also includes new version of quad)


warp v0.1 <- click here, it's a link!

warp is a geometry correction filter which uses control points and a thin plate spline (as used in morphing) to correct or distort a video's geometry. I have no idea if anyone is going to find this useful.

Documentation (such as it is), examples, and source are included. The same DLL also provides a new version of quad which supports more colour spaces (all the "classic" ones, plus 8-bit planar RGB).

x86 and x64 DLLs, both static and dynamically linked, are provided. SSE2 is definitely required, possibly SSE3. Sorry, luddites!

It's so fancy it even has its own demo/tutorial video: https://www.youtube.com/watch?v=SG1eex7HmLM

Recommended companion software: Hugin

Code:
warp (v0.1)
===========
  A collection of geometry correction filters using control points, specified
  either as a list of numbers, a string, or with a Hugin project file
  (see http://hugin.sourceforge.net/)

  (c) David Horman, 2019

Description
===========
  warp takes a list of control points - pairs of image coordinates - and
  warps the input video using a thin plate spline (as used in morphing)
  such that the coordinates of the first point in a pair are moved to the
  position of the second point in the pair, with the rest of the image
  distorted as smoothly as possible.

  Control points are specified either directly as filter parameters, or as a
  whitespace- and/or comma-separated string, or by passing the filename of a
  Hugin project file (.pto). A separate guide to creating a warp-compatible
  Hugin project is included.

  quad is a reimplentation of my old quad filter. It remaps an image based on
  one or two specified quadrilaterals.

  warp_series takes map frames generated by warp and uses them as animation
  keyframes, blending them to provide smooth transitions between warps.

  warp_grid is a helper filter which draws a grid on a video clip.

  Please refer to the individual documentation files for usage and parameters.
__________________
My AviSynth filters / I'm the Doctor

Last edited by wonkey_monkey; 14th January 2019 at 22:35.
wonkey_monkey is offline   Reply With Quote
Old 14th January 2019, 20:10   #2  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,751
Nice, thanks! I will test drive it

I was just going to ask about alignment options in avisynth; something similar to hugin or photoshop autoalign with perspective and warping corrections instead of just global frame translation/rotations
poisondeathray is online now   Reply With Quote
Old 14th January 2019, 21:40   #3  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 6,485
Lovely WonkyWilly,

Maybe point out availability [EDIT: Where to get the plug] via your sig (took me bout 40 -> 60 seconds to figure it out).
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 14th January 2019 at 22:10.
StainlessS is offline   Reply With Quote
Old 14th January 2019, 22:01   #4  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 1,675
Quote:
Originally Posted by StainlessS View Post
Lovely WonkyWilly,

Maybe point out availability via your sig (took me bout 40 -> 60 seconds to figure it out).
Huh? Figure what out?

And my availability is none of your business, cheeky
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 14th January 2019, 22:10   #5  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 6,485
Aha, the link is the enourmous warp v0.1 below the top image, me is a dick
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 14th January 2019 at 22:14.
StainlessS is offline   Reply With Quote
Old 15th January 2019, 16:45   #6  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,751
Works great. Nice video tutorial

When combined with gmic clut method , it's a power color matching technique . The benefit is you can use the BD chroma (or other src image) resolution . It's a bit colourlike on steroids. Results are better than some commercial color matching plugins and workflows. The negatives are the workflow is a bit clunky and requires per scene matching
https://forum.doom9.org/showthread.p...94#post1862294

The haldclut => cube conversion can be done with python script instead of the one suggested in that thread. It's faster/easier , batchable and the crc check is the same.
LUT-Convert-master
https://github.com/mikeboers/LUT-Convert
Since it's python based, it makes me wonder if it could be made adaptable to vapoursynth


Perhaps out of the scope of this plugin discussion -

While manual control point is great for accuracy and fine tuning - I'd like to see some way of auto matching possibilities - are you aware of any ? The hugin bundled ones aren't that great . eg. Are there any FOSS engines that hugin can use externally ? Even if it's a rough control point auto layout matching generation, it would reduce the amount of manual fine tweaking later

I'm wondering if this can somehow be used/incorporated into the autooverlay plugin . It "feels" like a powerful pairing in the making
https://forum.doom9.org/showthread.php?t=175247
poisondeathray is online now   Reply With Quote
Old 15th January 2019, 19:12   #7  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 1,675
Yeah, I was disappointed with Hugin's automatic control point thing as well. Firstly, it works better if the videos are the same resolution - and it's probably not a terrible idea to NNEDI the DVD footage first, before trying to match it to Bluray footage. Secondly, I think all such control point finders (Autopano is another) are optimised for matching photos from the same set, rather than different quality/colour footage like this. And thirdly, I expect it's ultimately an intractable problem anyway, in that you can never guarantee you won't get bad control points.

Hugin also has a fine tune for control points, but I also had problems with that (I mention it at the same start of the video, but in the end I didn't bother expanding on it).

Maybe something can be done with mvtools, using large block sizes and filtering for good/consistent vectors.
__________________
My AviSynth filters / I'm the Doctor

Last edited by wonkey_monkey; 15th January 2019 at 19:15.
wonkey_monkey is offline   Reply With Quote
Old 17th January 2019, 20:13   #8  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 6,485
Welcome to the forum Wonkey, I'm sure that you will find it a non stressful place where you can expend lots of decades.

EDIT: You got Wonkey Monkey . com, be quick else you got squatters to eradicate. [hitmen are expensive, or so I've been told]
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 17th January 2019 at 20:34.
StainlessS is offline   Reply With Quote
Old 20th January 2019, 14:00   #9  |  Link
trondmm
Registered User
 
Join Date: Apr 2010
Posts: 9
Thank you. This is great.

The biggest problem I have at the moment, is that it sometimes fails silently. i.e. Nothing happens, there's no error message, and debug=WARP_DEBUG_ISOMAP returns a completely black image

This happens when the pto-file doesn't exist, but also when the file actually exists. I'm not sure if warp for some reason is unable to open the file, or if there's something in the file that causes warp() to croak.

If I copy the points from the file manually, warp() works as expected.
trondmm is offline   Reply With Quote
Old 20th January 2019, 14:20   #10  |  Link
trondmm
Registered User
 
Join Date: Apr 2010
Posts: 9
Ah. Found it!

If I change the control point lines from
Code:
c n1 N0 x1001 y747 X952 Y784 t0
to

Code:
c n0 N1 x1001 y747 X952 Y784 t0
it works.
trondmm is offline   Reply With Quote
Old 20th January 2019, 18:16   #11  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 1,675
Hmm. I assumed Hugin would always put them in ascending order. For now, just make sure image #0 is in the left pane and image #1 is in the right pane.
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:05.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.