Re: [Gimp-user] Re: batch rotate scanned images
T F wrote: I was hoping to use someone else's script or plugin that calculates the angle on an image by image basis, and then does the rotation and crop. To detect the rotation angle, try reading this paper: www.leptonica.com/papers/docskew.pdf -- David (of the Batch Processor...) -- David Hodson -- this night wounds time ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Re: batch rotate scanned images
To detect the rotation angle, try reading this paper: www.leptonica.com/papers/docskew.pdf Thanks David. I'm reading it. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] Re: batch rotate scanned images
T F wrote: On 8/14/06, Olivier Ripoll [EMAIL PROTECTED] wrote: T F wrote: i'd like to scan several hundred of my 4x6 prints (photographs) in my trials, the orientations of the tiff files end up being slightly off, randomly, by several degrees. some need to be rotate by +2.3 degrees, others by +3.7, others by -1.2, etc [...] Thanks. I'm an avid user of imagmagick. There is no autorotate feature, nor does David's. What I meant was you first group the files (e.g. in a folder) with +3.7, apply the batch to them etc. I do not see how a software could easily find the angle. If the picture is not an image, but a graphic or a text, the Fourier transform [1] may be a tool for this. If the picture contains some white (triangular/frame) borders due to the rotation angle, there might also be a way, but in any case, automatic detection of the rotation angle would require some maths (maybe through lua and gluas[2], python, or gimp# [3]). But these are just wild guesses. Regards, Olivier [1] http://gfourier.sourceforge.net/ [2] http://pippin.gimp.org/plug-ins/gluas/index.html [3] http://gimp-sharp.sourceforge.net/ ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Re: batch rotate scanned images
T F wrote: i'd like to scan several hundred of my 4x6 prints (photographs) in my trials, the orientations of the tiff files end up being slightly off, randomly, by several degrees. some need to be rotate by +2.3 degrees, others by +3.7, others by -1.2, etc The angle varies from one image (scanned) to the next image. The variation is due to minor misalignments when the original is placed on the platten (by an automatic document feeder). I was hoping to use someone else's script or plugin that calculates the angle on an image by image basis, and then does the rotation and crop. If I need to code it myself, I would start by trying something like the following, probably with imagemagick. 1) for speed, reduce image to about 100px per edge 2) edge detect radius=0, which tends to draw a box around the image 3) quantize to 2 colors 4) save as ascii matrix of 0s and 1s 5) work with rows/columns as arrays 6) determine indicies of first 1s 7) calculate slope of least sq line 8) repeat for bottom, top, left, right sides 9) toss out anomolous slopes, avg the rest ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] Re: batch rotate scanned images
T F wrote: i'd like to scan several hundred of my 4x6 prints (photographs) in my trials, the orientations of the tiff files end up being slightly off, randomly, by several degrees. some need to be rotate by +2.3 degrees, others by +3.7, others by -1.2, etc is there way to use gimp (or other linux software) to automatically correct the orientation? preferably by batch processing thanks in advance mike Usually, for batch processing, the advice is to use imagemagick (or garphicsmagick), which should be already present on your system. http://www.imagemagick.org/script/index.php Imagemagick is a collection of small utilities (display, mogrify, convert, etc.). Since you probably do not want to overwrite the original file, what you want is convert. See the man page here http://www.imagemagick.org/script/convert.php The gimp solution to batch processing is David's Batch Processor: http://members.ozemail.com.au/~hodsond/dbp.html It should work also fine for you. Best regards, Olivier ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Re: batch rotate scanned images
On 8/14/06, Olivier Ripoll [EMAIL PROTECTED] wrote: T F wrote: i'd like to scan several hundred of my 4x6 prints (photographs) in my trials, the orientations of the tiff files end up being slightly off, randomly, by several degrees. some need to be rotate by +2.3 degrees, others by +3.7, others by -1.2, etc is there way to use gimp (or other linux software) to automatically correct the orientation? preferably by batch processing thanks in advance mike Usually, for batch processing, the advice is to use imagemagick (or garphicsmagick), which should be already present on your system. http://www.imagemagick.org/script/index.php Imagemagick is a collection of small utilities (display, mogrify, convert, etc.). Since you probably do not want to overwrite the original file, what you want is convert. See the man page here http://www.imagemagick.org/script/convert.php The gimp solution to batch processing is David's Batch Processor: http://members.ozemail.com.au/~hodsond/dbp.html It should work also fine for you. Thanks. I'm an avid user of imagmagick. There is no autorotate feature, nor does David's. Best, Mike ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user