2

What this is for is that, i have a lot of scanned documents with passport size photos in each of them. The photos are aligned randomly. I need to separate them out. What i currently do is make selection using polygonal marquee tool, then use Free Transform to straighten it out and later crop, resize and save the pp photo. I want to define an action that would automatically turn my selection into a properly aligned rectangle and crop the selection. Is there a way to achieve this in a way better than my current way?

  • How would the action know the direction and extent of the Free Transform you are performing? I assume each selection is different. – Scott Jul 2 '14 at 17:30
  • I would give it the 4 corners of a randomly aligned quadilateral and somehow the action should be able to transform the 4 corners into a regular predefined and properly aligned rectangle. Would this even be possible? Yes, every selection is different. – Shashwat Black Jul 2 '14 at 17:47
  • Nope. Not possible in actions. Might be possible in a script. – Scott Jul 2 '14 at 18:07
  • I love the wording of this question. :) – Alan Gilbertson Jul 2 '14 at 19:11
1

If you have Photoshop CS6 or newer, the Perspective Crop tool might be just what you're looking for. Hit C to select the Crop tool, then Shift-C for Perspective Crop.

There's two ways you can use this: Click the four corners of the item as you've been doing with Polygonal Marquee, or drag a rough rectangle around the item and then adjust the corners individually into the quadrilateral shape you desire. Then just hit Enter and Photoshop will re-perspectivize the quadrilateral into a perfect rectangle.

  • I have CS5. But I was thinking of upgrading anyway, so now seems to be the best time. I just did some research on perspective crop and it seems to be exactly what i want. Thank you. – Shashwat Black Jul 4 '14 at 14:45
  • Glad I could help! Don't forget to click the green "Accept answer" checkmark button if my answer was the one you needed. Good luck! – DawnPaladin Jul 5 '14 at 19:55
1

Photoshop has a built-in script that is designed for exactly this purpose. It goes back at least to Photoshop 6, iirc.

From the File menu, choose Automate > Crop and Straighten Photos (that's a clue, right there) and let the program work its magic.

This works for single or multiple images within a single image, and creates new documents for each extracted image.

  • This method doesn't seem to work for me. The selection is not mapped correctly into the cropped image. – Shashwat Black Jul 4 '14 at 14:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.