Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Warp / transform image along path
#1
Hi,
I'd like to shift an image to fit a path that I've drawn. There used to be a plugin/script that did this but i can't find it anymore.
I have a few scanned images from paper sections that were a meter or more long and the images are skewed along the length varying amounts somewhat randomly.
Basically I'd draw a path along one border line of the skewed image. I'd then draw horizontal path. The plugin would subtract the space between the 2 paths in line with the vertical direction of the image.
This worked really well and  I have some other cases where I'd like to do this, but as I said I can't find the plugin anymore.

Has anyone ever done something like this or have any ideas? 

Thanks
Matt
Reply
#2
If you mean straighten an image by drawing a path over something that should be exactly horizontal, then maybe ofn-layer-straightener on https://sourceforge.net/projects/gimp-to...s/scripts/

Otherwise, maybe give an example (image, screenshots...)
Reply
#3
(12-20-2017, 11:42 PM)Ofnuts Wrote: If you mean straighten an image by drawing a path over something that should be exactly horizontal, then maybe ofn-layer-straightener on https://sourceforge.net/projects/gimp-to...s/scripts/

Otherwise, maybe give an example (image, screenshots...)

I've checked that out, unfortunately, it only rotates the image to horizontal. I need it to shift the columns of pixels vertically by the distance between 2 paths.
I've sketched this out. Basically throw away the hashed bit to flatten the wiggly line.

[Image: shift_1.jpg?dl=0]
https://www.dropbox.com/s/epq4kpm32f770c...1.jpg?dl=0
Reply
#4
So you have two paths, a straight one and a wavy one, and you delete the image between the two paths (it becomes transparent? filled with color?) and you shift/rotate the image so that the straight path ends up somewhere (but how this is determined isn't clear).
Reply
#5
(12-21-2017, 08:17 AM)Ofnuts Wrote: So you have two paths, a straight one and a wavy one, and you delete the image between the two paths (it becomes transparent?  filled with color?) and you shift/rotate the image so that the straight path ends up somewhere (but how this is determined isn't clear).

It's a straight translation, straight as in vertical, no rotation. A pixel with a location of x1,y1 gets shifted to x1,y2 where y2 is related to the distance between the values of y on the warped edge and the straight reference line. Something like this, if the green & yellow cells are the image and the black are the reference line. The pixels between are overwritten.

https://www.dropbox.com/s/7xeawntv7z3cp5...1.png?dl=0

Thanks for looking at this.

Matt
Reply
#6
Never come across a Gimp script/plugin that uses paths to remove an area.

There is the liquid rescale plugin that might work

the plugin
   

the result
   
Reply
#7
(12-21-2017, 09:34 AM)rich2005 Wrote: Never come across a Gimp script/plugin that uses paths to remove an area.

There is the liquid rescale plugin that might work

the plugin


the result
This looked pretty promising and I spent an hour or so trying to get it to work but it modifies the image in a way that isn't what i need.
The idea behind it is pretty cool though.
Reply


Forum Jump: