Lightroom Classic: Batch auto straighten

  • 2
  • Idea
  • Updated 5 months ago
  • (Edited)
The Auto Straighten tool is great, but it'd be amazing if this could be applied to a batch of photos and/or set as a Preset.
Photo of Keil

Keil

  • 1 Post
  • 0 Reply Likes
  • hopeful

Posted 1 year ago

  • 2
Photo of Todd Shaner

Todd Shaner, Champion

  • 1073 Posts
  • 346 Reply Likes
You can use the Transform> Level function for batch straighten. Select the images you want to straighten,  set Auto Sync as shown below, and then click on Level. Don't forget to turn off Auto Sync when done. Keep in mind it's not 100% accurate for every subject type. You may need to manually adjust some images.

Photo of Todd Shaner

Todd Shaner, Champion

  • 1073 Posts
  • 346 Reply Likes
It appears the Straighten and  Level functions produce the same rotation correction. However, Straighten crops the image and Level enlarges the image. Theoretically the Level corrected image will lose  image detail (softening) due to the upscaling interpolation. In fact all of the Transform functions incorporate upscaling to fit the corrected image to the original pixel dimensions.

Example using 5616x3744 Canon 5D MKII CR2 File

(Edited)
Photo of Chad Zellner

Chad Zellner

  • 2 Posts
  • 0 Reply Likes
This applies the level adjustment form the original photo to all the photos, right? Doing this you would have to go to each photo and hit the "update" button.
Photo of John R. Ellis

John R. Ellis, Champion

  • 3724 Posts
  • 975 Reply Likes
"This applies the level adjustment form the original photo to all the photos, right? Doing this you would have to go to each photo and hit the 'update' button"

Rather than Auto Sync, use Photo > Develop Settings > Copy/Paste Settings or Sync Settings.   In the settings window, uncheck Transform > Upright Transforms and Transform > Transform Adjustments, leaving just Transform > Upright Mode checked.

This will copy the mode only to all the photos (Level, in your case). Then it will recalculate the auto-leveling for each photo separately.
Photo of Chad Zellner

Chad Zellner

  • 2 Posts
  • 0 Reply Likes
Ok thanks! I've tried that and it seems to work. I think what was throwing me off is that the 'update' button is still lit up using that method but if I click it to 'off' I see that it did indeed apply the adjustment. Thanks!
Photo of Rodney Van Royden

Rodney Van Royden

  • 3 Posts
  • 1 Reply Like
Thanks, cannot get it to work. Must be doing something wrong but I followed the steps above. It applies an angle adjustment to the photos but the angle is way off horizontal horizons.

thank you
Photo of George Nichols

George Nichols

  • 37 Posts
  • 15 Reply Likes
This is such an inportant feature that I urge Adobe to roll this out in similar manner as they did with the new Auto Tone feature in the December 12, 2017 update (Lightroom Classic 7.1) - and with a hot key option rather than needing multiple mouse clicks to navigate to and use.
Photo of John R. Ellis

John R. Ellis, Champion

  • 3687 Posts
  • 963 Reply Likes
George, it wasn't clear from your post, but do you know that you can apply the Transform > Auto, Level, Vertical, and Full auto settings to a batch?  See this previous post: https://feedback.photoshop.com/photoshop_family/topics/batch-auto-straighten?topic-reply-list[settin...
Photo of George Nichols

George Nichols

  • 37 Posts
  • 15 Reply Likes
John
Thanks. I thought I had tried this before, but I followed now following this and it rotates each file independently. Great! Thank you.... But when I do this I haven't figured out how to get the "Constrain Crop" to apply - whether syncing or applying as a Preset. If I can solve this, I'll be VERY happy. 
Photo of John R. Ellis

John R. Ellis, Champion

  • 3687 Posts
  • 963 Reply Likes
Check Upright Mode and Transform Adjustments but not Upright Transforms:



Upright Mode contains the "mode" -- Off, Auto, Guided, Level, Vertical, or Full.

Upright Transforms contains the automatically calculated adjustments for the selected mode of the photo whose settings you're copying.  Those adjustments get recalculated when you click Update. 

Transform Adjustments contains the manual settings you make with the sliders (Vertical, Horizontal, etc.) and the checkbox Constrain Crop.
Photo of George Nichols

George Nichols

  • 37 Posts
  • 15 Reply Likes
Oh WOW! This is great! Transform Adjustments did the trick. I set-up a Preset and it works both leveling a batch of files and during the import process using "Apply During Import" by selecting the corresponding Preset in the "Develop Settings" dialogue. Why didn't I know about this sooner! This should be more prominently communicated as much as the new Auto Settings feature in Lightroom Classic 7.1. 
Thank you!!
Photo of Todd Shaner

Todd Shaner, Champion

  • 1062 Posts
  • 341 Reply Likes
You can also use Auto Sync to apply any of the Upright Transforms to a batch of image files, except for Guided Upright. The good news is the results are identical to using Sync, but not always the same as applying the Upright Transform to a single image file. This appears to be a bug, which I verified using three raw image files. I selected these three image files because they have extensive and radically different transform issues. You can download them at the below link.

https://www.dropbox.com/sh/2jw2yqlmjq8ogc5/AACLytycakbmyIfYbwWbZUBia?dl=0

Create virtual copies and apply an Upright Transform to IMG_0265.CR2 and Auto Sync it to IMG_0266.CR2 and IMG_0267. Repeat with separate virtual copies using Sync and just 'Upright Mode' and 'Transform Adjustments' checked. Compare the results to the same Upright Transform applied directly to the original file. Below are the results I got on my Windows 7 system using LR Classic CC 7.1. Obviously the rendering we are looking for is what you see in the direct Single Image Upright Transform application.

Note that with some of the Upright Transforms one of the image files (IMG266.CR2, IMG_267.CR2) matched the Single Image application rendering, but not the other. So it appears to be subject dependent.

Please let me know your findings and I'll create a separate report with the results. Thank you.

(Edited)
Photo of John R. Ellis

John R. Ellis, Champion

  • 3734 Posts
  • 976 Reply Likes
"but not always the same as applying the Upright Transform to a single image file."

I wonder if this is caused by LR using lower-resolution negatives from the camera raw cache when you do a batch apply.  Adobe employee Simon Chen says that's what Quick Develop > Auto Tone does, and I've observed an occasional significant difference between Develop and Quick Develop due to this: https://feedback.photoshop.com/photoshop_family/topics/auto-tone-of-a-batch-of-photos-gives-differen...
Photo of Todd Shaner

Todd Shaner, Champion

  • 1073 Posts
  • 346 Reply Likes
John, thanks for replying. This does sound like a possible cause of what I'm seeing with Auto Sync and Sync of Upright to a a batch of image files. Upright calculations are just as compute intensive as the new Auto Tone, so it stands to reason Adobe might be using the smaller camera cache files.

"When you apply Auto to a batch of photos, for performance reasons, Lightroom loads a lower resolution negatives cached in the camera raw cache (like Smart Previews) and computes Auto from that. Since the two input are different, the results could differ slightly."

We're you able to duplicate what I am seeing using the three CR2 files on Dropbox or your own files? Just trying to make sure it isn't an issue with my installation.
Photo of John R. Ellis

John R. Ellis, Champion

  • 3734 Posts
  • 976 Reply Likes
I'm leaving on a trip but will try to duplicate on Mon.
Photo of Todd Shaner

Todd Shaner, Champion

  • 1073 Posts
  • 346 Reply Likes
PROBLEM SOLVED
On a hunch I reset the LR Classic 7.1 Preferences file and lo and behold the Upright Sync function is now behaving normally! The Auto Sync function still behaves the same, but I think that's by design. Interestingly Julieanne Kost has a blog post that incorrectly describes how to use 'Auto Sync' to apply Upright Transform to multiple images with recalculation. That's probably where I was led astray!

DON'T DO THIS!
http://blogs.adobe.com/jkost/2013/04/lightroom-5-beta-upright-sync-behavior.html

DO THIS!
So as you outlined in your reply Sync is what needs to be used if you want the Upright Transform to be recalculated for each image file in the batch process. I apologize for any confusion this has caused anyone here.

LR CC 2015.12 exhibits the same behavior on my system. I reset the LR CC 2015.12 Preferences file and restarted LR, but Upright Transform Sync is still behaving the same.
I deleted the LR CC 2015.12 Preferences file, restarted LR, and Upright Transform Sync is working as expected. Both LR CC 2015.12 and Classic 7.1 behave as described above.
(Edited)
Photo of Rodney Van Royden

Rodney Van Royden

  • 3 Posts
  • 1 Reply Like
Thanks, cannot get it to work. Must be doing something wrong but I followed the steps above. It applies an angle adjustment to the photos but the angle is way off horizontal horizons.

thank you
Photo of Todd Shaner

Todd Shaner, Champion

  • 894 Posts
  • 275 Reply Likes
Did you follow the instructions in John Ellis' post? https://console.getsatisfaction.com/photoshop_family/conversations/batch-auto-straighten?reply_id=18...

Keep in mind all of the "automatic" transform adjustments will fail with certain subjects that contain non-parallel image data. Try applying  "Level" manually to a single image file with the issue and see if it looks the same or different than using batch apply.
Photo of Rodney Van Royden

Rodney Van Royden

  • 3 Posts
  • 1 Reply Like
Thank you. Yes followed steps i think. Works manually using the angle tool but not auto. Very tedious to do for hundreds of photos. Tips appreciated. Thank you
Photo of Johan Elzenga

Johan Elzenga, Champion

  • 1013 Posts
  • 390 Reply Likes
Perhaps you didn't follow the steps correctly. What you need to do is this. Take an image, go to the develop module, Upright tab and press the 'Level' button. Now save a new develop preset with only 'Upright Mode' checked. Apply this preset on import in your import dialog. This should work fine for most images, but from time to time you'll find an image that goes off the chart because of slanted lines. For those images you have to manually undo the upright correction.
Photo of Tai Randall

Tai Randall

  • 2 Posts
  • 0 Reply Likes
This thread is fantastic, and I've gotten a lot of fantastic information in it! I'm experiencing a minor problem - or maybe "inconsistency" is a better term - when using the preset I can't seem to figure out: sometimes the "Constrain Crop" is applied, and others it isn't. This is independent of whether I apply the preset to a single or multiple photos. Also, whichever way it decides to go for a particular photo, it always goes that way for that photo (whether done in batch or individually). Any ideas why this is occurring and what (if anything) can be done about it, other than manually applying Constrain Crop to all of the photos using Auto-Sync afterwards? 

Btw, I'm using LR Classic CC 7.3.1
(Edited)
Photo of Johan Elzenga

Johan Elzenga, Champion

  • 1373 Posts
  • 550 Reply Likes
I believe this is a known bug.
Photo of Tai Randall

Tai Randall

  • 2 Posts
  • 0 Reply Likes
This is great! That means I'm (a) doing everything right, and (b) not crazy! 

Seriously, as long as I know it's a known issue I can be patient! Thanks a lot!