[Gimp-user] Squaring up an Image - Perspective Transform Changes Sizes

2004-01-22 Thread Steve Strobel
I am trying to square up an image.  It is a scanned map which shows section lines 
representing a one mile square.  Because of the map projection, the section lines on 
the map aren't quite square (opposite sides aren't even quite parallel).  I am trying 
to square up the image so I can overlay it with some survey data.  Using the 
shearing and rotation transform tools, I can get it close, but I haven't found a good 
way to correct for opposite sides not being parallel.

I tried using the perspective transform to adjust the corners of the image so the 
section lines would be horizontal and vertical.  At first, that appeared to work, but 
it has an unintended side-effect.  When I adjust a corner vertically, it also affects 
the horizontal placement of objects in the image (see 
http://link-comm.com/temp/perspective.gif for a screen shot using the transform tool 
- note that everything got squished to the left).  I understand that is correct for 
a perspective transform, but it isn't what I need for the map.  

Is there another transform or tool in the Gimp that will allow me to stretch the 
corners of an image?  Specifically, I am looking for a tool that will let me move one 
of the corners vertically, adjusting the objects on the map vertically to compensate, 
while leaving their horizontal locations alone.  Thanks for any advice.

Steve

P.S.  This may be a similar problem to the one faced by those that are stitching 
small image tiles together to create larger panoramic images.  I am not familiar 
with how that is done.  Thanks again.
---
Steve Strobel   WWW: http://www.link-comm.com
Link Communications, Inc.   Phone: (406) 245-5002 ext 102
MailTo:[EMAIL PROTECTED]  Fax: (406) 245-4889

___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user


Re: [Gimp-user] Squaring up an Image - Perspective Transform Changes Sizes

2004-01-22 Thread pcg
On Thu, Jan 22, 2004 at 12:43:18PM -0700, Steve Strobel [EMAIL PROTECTED] wrote:
 I tried using the perspective transform to adjust the corners of the image so the 
 section lines would be horizontal and vertical.

That's actually correctly doing what the perspective transform is doing
(try to imagine a plane with rectangles on it, in an angle towards you).

From what you are writing, I'd say he shearing transform is *exactly*
what you need, so what kind of problems are you facing when using a shear
transform?

-- 
  -==- |
  ==-- _   |
  ---==---(_)__  __   __   Marc Lehmann  +--
  --==---/ / _ \/ // /\ \/ /   [EMAIL PROTECTED]  |e|
  -=/_/_//_/\_,_/ /_/\_\   XX11-RIPE --+
The choice of a GNU generation   |
 |
___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user


Re: [Gimp-user] Squaring up an Image - Perspective Transform Changes Sizes

2004-01-22 Thread Gene Heskett
On Thursday 22 January 2004 16:18, [EMAIL PROTECTED] ( Marc) (A.) 
(Lehmann ) wrote:
On Thu, Jan 22, 2004 at 12:43:18PM -0700, Steve Strobel 
[EMAIL PROTECTED] wrote:
 I tried using the perspective transform to adjust the corners of
 the image so the section lines would be horizontal and vertical.

That's actually correctly doing what the perspective transform is
 doing (try to imagine a plane with rectangles on it, in an angle
 towards you).

From what you are writing, I'd say he shearing transform is
 *exactly* what you need, so what kind of problems are you facing
 when using a shear transform?

You may also be trying to undo the spherical component of the mapping.  
USGS maps, and most maps in general are on a spherical plane usually, 
sometimes on a modification of the mercator projection.  This may be 
something that the gimp coders could add, a 'de-sphericalizer'.  Make 
the user put in the 1/xx ratio as shown on the map and use that 
to calculate what to do.

-- 
Cheers, Gene
There are four boxes to be used in defense of liberty: soap,
ballot, jury, and ammo. Please use in that order.
-Ed Howdershelt (Author)
99.22% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com attornies please note, additions to this message
by Gene Heskett are:
Copyright 2004 by Maurice Eugene Heskett, all rights reserved.
___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user


Re: [Gimp-user] Squaring up an Image - Perspective Transform Changes Sizes

2004-01-22 Thread Steve Strobel
Thanks for the quick reply.  The shearing transform works great for what it does, but 
it can't help when the opposite sides aren't parallel;  it always moves them together. 
 Imagine drawing a square with straight lines but with none of the corners quite 90 
degrees.  Rotate it until the top is level, then use the shear transform to make the 
right edge vertical.  Now you have one corner (the lower-left) that isn't quite 
correct.  What I need is a way to drag that lower-left corner into place.  

Now consider the case where that lower-left corner is in the correct horizontal 
position but too low.  As I move it down into place, everything else in the image 
needs to move up too (less so as you get closer to the right and top edges).  But 
nothing should need to move to the right or left;  those positions should be OK.  When 
I move the lower left corner upward with the perspective tool,  however, it not only 
changes the vertical positions, but squishes everything to the left horizontally as 
well (see http://link-comm.com/temp/perspective.gif).

I believe that what I need is a 2-D linear transform something like shearing or 
scaling that changes the amount of correction linearly as it moves from one edge of 
the image to the other, rather than a 3-D transform like the perspective tool.  In 
other words, I am not looking at a square map from an angle (in which case the 
perspective tool would be perfect), but trying to change a map made with one 
projection to another projection.  

I don't think that the way the perspective transform works can possibly be the right 
way to change between the map projections.  Consider this:  take each section of the 
map, run them through the transform tool to make them square, then put them back 
together.  If the perspective tool takes the stuff in the center of each section and 
squishes it to the left, your scale would ramp in sawtooth fashion (one tooth per 
section) as you crossed the newly assembled map.

Steve


At 10:18 PM 1/22/2004 +0100, you wrote:
On Thu, Jan 22, 2004 at 12:43:18PM -0700, Steve Strobel [EMAIL PROTECTED] wrote:
 I tried using the perspective transform to adjust the corners of the image so the 
 section lines would be horizontal and vertical.

That's actually correctly doing what the perspective transform is doing
(try to imagine a plane with rectangles on it, in an angle towards you).

 From what you are writing, I'd say he shearing transform is *exactly*
what you need, so what kind of problems are you facing when using a shear
transform?

-- 
  -==- |
  ==-- _   |
  ---==---(_)__  __   __   Marc Lehmann  +--
  --==---/ / _ \/ // /\ \/ /   [EMAIL PROTECTED]  |e|
  -=/_/_//_/\_,_/ /_/\_\   XX11-RIPE --+
The choice of a GNU generation   |
 | 

---
Steve Strobel   WWW: http://www.link-comm.com
Link Communications, Inc.   Phone: (406) 245-5002 ext 102
MailTo:[EMAIL PROTECTED]  Fax: (406) 245-4889

___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user