[gdal-dev] Deskewing geo-referenced scanned prints

Zoltan Szecsei zoltans at geograph.co.za
Fri Apr 9 08:33:16 EDT 2010


Hi,
I'm using viewing software that cannot rotate images on the fly (see 
non-zero rotation parameters in TFW below.)

I have almost 2000 scans in GeoTIFF that I hence need to deskew and also 
want to crop.
I've been looking at gdalwarp, but can't see an obvious way to 
bash-script deskewing, so please can someone give me a pointer where to 
start/research.

Thanks in advance,
Zoltan

Each image represents a quarter degree square and I can use the image 
name to calculate the Lat Long values of the 4 corners.
3424bb is:
TL:  34.00S 24.75E
TR:  34.00S 25.00E
BR:  34.25S 25.00E
BL:  34.25S 24.75E
I want to crop the image on these quarter degree boundaries, and deskew it.
The attached jpeg is a much-reduced sample, so you can get the idea of 
what they look like.

I have the following information at hand:


#################################################################################
ls -la:
  geograph geograph  5231378 2006-09-13 17:28 3424BB_1999_ED3_GEO.TIF

#################################################################################
Pixel positions of the 4 quarter degree square corners are at:
TL 1090.489746 1226.423828
TR 6546.639160 1220.069458
BR 6546.430176 7770.449219
BL 1106.605347 7776.899902

#################################################################################
cat 3424BB_1999_ED3_GEO.tfw
            0.0000459558
           -0.0000000502
           -0.0000000963
           -0.0000381753
           24.6998662805
          -33.9529134036

#################################################################################
gdalinfo 3424BB_1999_ED3_GEO.TIF
Driver: GTiff/GeoTIFF
Files: 3424BB_1999_ED3_GEO.TIF
Size is 7796, 10629
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.2572235629972,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
GeoTransform =
  24.6998433507502, 4.595577857784442e-05, -9.634765806162092e-08
  -33.95289429083027, -5.021067810400542e-08, -3.817529052330018e-05
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_XRESOLUTION=300
  TIFFTAG_YRESOLUTION=300
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
Image Structure Metadata:
  COMPRESSION=LZW
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (  24.6998434, -33.9528943) ( 24d41'59.44"E, 33d57'10.42"S)
Lower Left  (  24.6988193, -34.3586595) ( 24d41'55.75"E, 34d21'31.17"S)
Upper Right (  25.0581146, -33.9532857) ( 25d 3'29.21"E, 33d57'11.83"S)
Lower Right (  25.0570905, -34.3590509) ( 25d 3'25.53"E, 34d21'32.58"S)
Center      (  24.8784669, -34.1559726) ( 24d52'42.48"E, 34d 9'21.50"S)
Band 1 Block=7796x1 Type=Byte, ColorInterp=Palette
  Color Table (RGB with 256 entries)
    0: 106,180,131,255
etc etc











-- 

===========================================
Zoltan Szecsei
Geograph (Pty) Ltd.
P.O. Box 7, Muizenberg 7950, South Africa.

65 Main Road, Muizenberg 7945
Western Cape, South Africa.  

34° 6'16.35"S 18°28'5.62"E 

Tel: +27-21-7884897  Mobile: +27-83-6004028
Fax: +27-86-6115323     www.geograph.co.za
===========================================

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 3424bb.jpg
Type: image/jpeg
Size: 55635 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/gdal-dev/attachments/20100409/7df6a6a4/3424bb-0001.jpg


More information about the gdal-dev mailing list