Automatic rotation
Moderators: XnTriq, helmut, xnview
-
- Posts: 152
- Joined: Thu Feb 23, 2006 3:18 am
- Location: San Luis Obispo, California
Automatic rotation
Any time one scans pictures, a very big problem is alignment/rotation. It is very difficult to get the photos in the scanner to be perfectly aligned, therefore it is necessary to use XnView's "Rotate" capabilities to adjust the image by one or two degrees, or perhaps less. If one does a lot of scanning of photos using a flatbed scanner, getting the photos properly aligned is the biggest time-requirement of the entire process. Or at least it is for me.
My idea/suggestion is to figure out a way to automatically align images. You already have "deskew" for b&w images, but (a) it doesn't work all that well, in my experience, and (b) it's not available for color images. Automatically aligning images must be quite difficult, since I don't recall having ever seen such a feature in any imaging software.
Perhaps it could be accomplished with a function that tells the user "draw a box around one complete edge of the photo", or something, to help XnView figure out what should be the alignment reference. Or perhaps even a single mouse-click to identify an edge.
If such a feature could be built, it would make very big time savings for people who scan photos.
My idea/suggestion is to figure out a way to automatically align images. You already have "deskew" for b&w images, but (a) it doesn't work all that well, in my experience, and (b) it's not available for color images. Automatically aligning images must be quite difficult, since I don't recall having ever seen such a feature in any imaging software.
Perhaps it could be accomplished with a function that tells the user "draw a box around one complete edge of the photo", or something, to help XnView figure out what should be the alignment reference. Or perhaps even a single mouse-click to identify an edge.
If such a feature could be built, it would make very big time savings for people who scan photos.
-
- XnThusiast
- Posts: 4608
- Joined: Sun Jul 25, 2004 9:08 pm
Re: Automatic rotatation
I don't know any image viewer with dual pane file manager either, but I don't think because it's too difficult to create, authors just don't think it would be useful... Too OT, sorry.Automatically aligning images must be quite difficult, since I don't recall having ever seen such a feature in any imaging software.
I like this idea - even fully-automatically detect and rotate even multiple images!! I don't think it's impossible, because background color is white - and if images are photographs then they have clear edges. So if this would be possible, I have additional feature request then:
- Automatically save all images (photographs) as multiple image files.
I like any intelligent / automatic features which help user and save time.
Dreamer
-
- Moderator & Librarian
- Posts: 6374
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
-
- Posts: 152
- Joined: Thu Feb 23, 2006 3:18 am
- Location: San Luis Obispo, California
Re: Automatic rotatation
Thank you, XnTriq, good reading.
However, we still don't have a solution, as far as I can tell.
It is possible to do a pretty good job of straightening an image--but it is slow, inefficient, and approximate. Better would be a one-click "straighten" function that finds an edge, automatically aligns it to 90 or 180 degrees, "autocrops," and is done. If this process requires help from the user ("draw a line"), then okay. But having to rotate the image by tenths of a degree--one more, one more, one more--is not so good.
If it is possible to detect an edge, then the image can be automatically straightened. If it is not possible to detect an edge on this image, then a message says "This image cannot be automatically straightened. Use Rotate function."
However, we still don't have a solution, as far as I can tell.
It is possible to do a pretty good job of straightening an image--but it is slow, inefficient, and approximate. Better would be a one-click "straighten" function that finds an edge, automatically aligns it to 90 or 180 degrees, "autocrops," and is done. If this process requires help from the user ("draw a line"), then okay. But having to rotate the image by tenths of a degree--one more, one more, one more--is not so good.
If it is possible to detect an edge, then the image can be automatically straightened. If it is not possible to detect an edge on this image, then a message says "This image cannot be automatically straightened. Use Rotate function."
-
- Moderator & Librarian
- Posts: 6374
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
Re: Automatic rotatation
Hello Ty
These cross-references are intended to illustrate the popularity of such a feature and to emphasize the importance of your request.Ty wrote:However, we still don't have a solution, as far as I can tell.
-
- Posts: 152
- Joined: Thu Feb 23, 2006 3:18 am
- Location: San Luis Obispo, California
Re: Automatic rotatation
Thanks, XnTriq. I wasn't quite sure what your earlier message was suggesting, but it makes sense now.
-
- Posts: 192
- Joined: Thu May 11, 2006 1:46 pm
- Location: The Netherlands
Re: Automatic rotatation
Apparently Photoshop CS4 already has such e feature, so it can't be that difficult:I like this idea - even fully-automatically detect and rotate even multiple images!! I don't think it's impossible, because background color is white - and if images are photographs then they have clear edges. So if this would be possible, I have additional feature request then:
- Automatically save all images (photographs) as multiple image files.
"Crop and Straighten command"
"Scan multiple images at once and let Photoshop automatically straighten and save each image as an individual file."
I have no experience with this feature, maybe someone can tell us how well this works ?
René
-
- Posts: 152
- Joined: Thu Feb 23, 2006 3:18 am
- Location: San Luis Obispo, California
Re: Automatic rotation
Rene--
I just heard of the feature you describe from a friend with a Mac, and he wasn't sure of the software--something that came with the computer when he bought it. But it does exactly as you say: allows you to scan multiple images (like photos on a page) with one scan, which would normally make one image, and then the software identifies and separates the master image into 2/3/4/5/6/etc smaller images. A few months ago I saw some HP scanning software that also did this--although it did a very bad job of it. But the concept is very good, and I think would be a welcome addition to XnView--certainly for anybody who scans multiple images per sheet.
I just heard of the feature you describe from a friend with a Mac, and he wasn't sure of the software--something that came with the computer when he bought it. But it does exactly as you say: allows you to scan multiple images (like photos on a page) with one scan, which would normally make one image, and then the software identifies and separates the master image into 2/3/4/5/6/etc smaller images. A few months ago I saw some HP scanning software that also did this--although it did a very bad job of it. But the concept is very good, and I think would be a welcome addition to XnView--certainly for anybody who scans multiple images per sheet.
-
- Posts: 192
- Joined: Thu May 11, 2006 1:46 pm
- Location: The Netherlands
Re: Automatic rotation
I still have no experience with this feature from CS4,
If it works like promised it would also be a nice feature for XnView,
although I am already satisfied with an "automatic rotate" feature for only one (scanned) image.
René
If it works like promised it would also be a nice feature for XnView,
although I am already satisfied with an "automatic rotate" feature for only one (scanned) image.
René
-
- Moderator & Librarian
- Posts: 6374
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
Re: Automatic rotation
If the program was pre-installed, it's most probably Apple iPhoto.Ty wrote:I just heard of the feature you describe from a friend with a Mac, and he wasn't sure of the software--something that came with the computer when he bought it.
- iClarified: How to Straighten Images in iPhoto 08
- InformIT: Improving Photos in iPhoto » Straightening Photos
- MacMost Video Podcast: Rotate, Straighten and Crop in iPhoto ‘08
-
- Posts: 152
- Joined: Thu Feb 23, 2006 3:18 am
- Location: San Luis Obispo, California
Re: Automatic rotation
XnTriq, you may be right about the tool, but the straightening I was referring to is automatic. The method that XnView uses for manually straightening photos is fine (though Google's and Apple's is perhaps a little easier). But what I'm hoping Pierre will want to add is some AUTOMATIC straightening function: you identify the photo you want straightened and say "go", XnView does the rest. Of course, having a batch mode of the same thing would also be excellent. The point is that manually straightening images is very time-consuming, and we THINK that it can be done automatically (i.e., there are other programs that do it). So if the maestro would consider adding "auto-straighten" (or something) to the "rotation" menu, we would all be very grateful.
-
- Moderator & Librarian
- Posts: 6374
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
Re: Automatic rotation
OK, now I see what you and René are talking about.Ty wrote:The point is that manually straightening images is very time-consuming, and we THINK that it can be done automatically (i.e., there are other programs that do it).
- Adobe Product Support: Photoshop CS4 » Crop and Straighten photos
- Metacafe: One Click Cropping Scanned Images(photoshop)
- ThemBid.com: Do You Still Scan Photos With A Flatbed Scanner?
I was hoping to find some code samples for automatic de-skewing, but all the open source stuff seems to work with line art or greyscale images only.
- Wikipedia: Hough transform
- CodeProject: How to deskew an image
- Jens Gulden: unpaper » Deskewing (Auto-Straightening)
- Inlite Research: ClearImage Repair
- Recogniform: Deskew Library
- ExactCODE: ExactScan » Automatic crop and de-skew
- A-PDF.com: A-PDF Deskew
-
- Posts: 6
- Joined: Thu Sep 10, 2009 1:28 pm
Re: Automatic rotation
Gimp has a deskew plugin. It works automatically and very well. For the samples I tried, it works better than Photoshops automatic deskew:
File->Automate-Crop and Straighten
http://www.cubewano.org/gimp-deskew-plugin/
The Gimp deskew plugin author describes the source as using the "Radon" algorithm from the pagetools project (link on the author's site).
I've been using Gimp from the command line for deskew and then calling nconvert for the rest of my processing. It would be great to have deskew included in XnView and NConvert.
File->Automate-Crop and Straighten
http://www.cubewano.org/gimp-deskew-plugin/
The Gimp deskew plugin author describes the source as using the "Radon" algorithm from the pagetools project (link on the author's site).
I've been using Gimp from the command line for deskew and then calling nconvert for the rest of my processing. It would be great to have deskew included in XnView and NConvert.
-
- Posts: 6
- Joined: Thu Sep 10, 2009 1:28 pm
Re: Automatic rotation
ImageMagick also has an automatic deskew feature. I think this program is open source:
http://www.imagemagick.org/script/comma ... php#deskew
I've used this and it works.
http://www.imagemagick.org/script/comma ... php#deskew
I've used this and it works.
-
- Author of XnView
- Posts: 44583
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: Automatic rotation
Ok, i'll checkquantum wrote:ImageMagick also has an automatic deskew feature. I think this program is open source:
http://www.imagemagick.org/script/comma ... php#deskew
I've used this and it works.
Pierre.