Tim2501 |
Is it possible to 'undo' a transformation with an image-input for e.g. 'rotation'?
My idea was to distort an image, then apply an effect and then un-distort it to make an directional effect more dynamic. I found that if an image is used to distort another image, it's impossible to transform that one back to its original state. Does anyone know something? ![]() |
|
Posted: September 6, 2012 10:57 am | ||
Morgantao
![]() |
In theory, since FF is sample based and not pixel based, I think any transformation you do can be undone, it's just a matter of knowing exactly what the transformation was, and doing the exact opposite of it.
|
|
Posted: September 6, 2012 11:17 am | ||
ThreeDee
![]() |
Not everything is reversible, but many of the simpler transformations -- such as rotation -- are.
|
|
Posted: September 6, 2012 2:41 pm | ||
Morgantao
![]() |
What if you take a perlin noise and apply it as offset for an image, can you then apply the reverse distortion by inverting the noise?
Edit: No... I don't know why, but it just seems to distort it even further. ![]() |
|
Posted: September 6, 2012 3:01 pm | ||
Sphinx.
![]() |
It is possible that several samples are fetched from the same location in the first transformation - so how could a "reverse" transformation revert that? The simple case of this is a lookup transformation without "image input".
However the idea has some merit: transform something... process it and reverse the transform... we've used that trick several times with e.g. spherify - blur - unspherify and also other cases (wave blur etc) |
|
Posted: September 6, 2012 4:31 pm | ||
uberzev
![]() |
||
Posted: September 6, 2012 7:20 pm | ||
Tim2501 |
Well, I've come to the result that it's pretty much impossible to calculate the mask that would "un-transform" an image. Maybe it's possible using scripting though.
Attached are several attempts to un-transform an image using various transformation methods and masks Reverse transformations.ffxml |
|
Posted: September 7, 2012 4:19 am | ||
ThreeDee
![]() |
Yes, it is a bit of an tricky problem for solving procedurally.
When you offset something, the starting point will no longer "know" where it was offset to. You will have to look for the point in all the possible places it could have gone. Which means scripting it. Here is a simple situation with a horizontally offset image: I wrote a script that looks at every pixel in that horizontal row to find the one that is closest to the origin point. This point is then used for the Lookup component to reverse the offset. Now, since you have to search 600 different points to locate a closest match for horizontal offset (for a 600x600 image), you can see that it goes pretty slow. And it isn't all that accurate either, since there is no in-between pixel checking. Anyways, this approach works and can certainly be improved upon. Reverse Offset.ffxml |
|
Posted: September 7, 2012 11:39 am | ||
ThreeDee
![]() |
||
Posted: September 7, 2012 1:51 pm | ||
ThreeDee
![]() |
||
Posted: September 7, 2012 3:45 pm |
Filter Forge has a thriving, vibrant, knowledgeable user community. Feel free to join us and have fun!
33,719 Registered Users
+8 new in 7 days!
153,545 Posts
+5 new last day!
15,348 Topics
+71 new in year!
37 unregistered users.