distorted image
Posted: 2009-08-13T05:40:21-07:00
Hi,
I am trying to to make a slightly distorted scanned image to fit a square. I have found the 'distort' command in the help file which looked promizing.
My bit map (tiff-file) is 5905x5902 in size. The corners of the actual picture is
0, 0
0, 5902
5905, 0
5901, 5902
after skewing and cropping the original scanned image.
I now try to transform the image to a 5900x5900 square using the command
c:\>convert Ina0882_24bit.tif -virtual-pixel white -distort Perspective '0,0,0,0,0,5902,0,5900,5905,0,5900,0,5901,5902,5900,5900' Ina0882_24bit_final.tif
Unfortunately I get the following error message which does not say much to me
convert: invalid argument for option Affine : 'require at least 1 CPs' @ distort
.c/GenerateCoefficients/449.
an output image is produced which is some 30% larger than the original, but pixel dimensions are the same and the image corners are at the original coordinates.
I use
Version: ImageMagick 6.5.4-10 2009-08-08 Q16 OpenMP http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
on a Windows XP SP3 box
Anyone can help?
best regards
/bjojon
I am trying to to make a slightly distorted scanned image to fit a square. I have found the 'distort' command in the help file which looked promizing.
My bit map (tiff-file) is 5905x5902 in size. The corners of the actual picture is
0, 0
0, 5902
5905, 0
5901, 5902
after skewing and cropping the original scanned image.
I now try to transform the image to a 5900x5900 square using the command
c:\>convert Ina0882_24bit.tif -virtual-pixel white -distort Perspective '0,0,0,0,0,5902,0,5900,5905,0,5900,0,5901,5902,5900,5900' Ina0882_24bit_final.tif
Unfortunately I get the following error message which does not say much to me
convert: invalid argument for option Affine : 'require at least 1 CPs' @ distort
.c/GenerateCoefficients/449.
an output image is produced which is some 30% larger than the original, but pixel dimensions are the same and the image corners are at the original coordinates.
I use
Version: ImageMagick 6.5.4-10 2009-08-08 Q16 OpenMP http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
on a Windows XP SP3 box
Anyone can help?
best regards
/bjojon