When you want ask a question where you would like to get some replies that may be of use. You should provide information the allows users to know what your dealing with. Without any example images I do not believe you will get much help
I am sorry, I can not understand your first sentence.
My question is essentially in the subject - I need to disable "straighten" part of the Photoshop process "Crop and Straighten Photos".
Everything else is elaboration on the topic.
I add example images.
1. INPUT IMAGE
2. GOOD RESULT (manual crop)
3. BAD RESULT (Crop and Straighten Photos-function)
I believe the crop and straighten is a plugin, and I don't think it can be modified to what you want it to do.
1 person found this helpful
Yes you are using the wrong tool. No simple application would be able to straighten that image. What you seem to be trying to do is trim to an Object bounds. If the background is a quite consistent color and the object's edges have a high contrast to the color. You may be able to automate that process with a Photoshop script perhaps an action may be able too but likely it would requite scripting. I want to stress May. It depends on being able to select all pixels outside the object It will not matter if pixels inside the object are also selected as lone are the object edges are not selected.
If you create a new top layer that contains the documents composite. If it just a background layer duplicate so the top layer is a normal pixels layer. Your Process would then select the background in that work layer. You could try different methods to see which methods works best with your background types. Select all convert the selection to a path and stroke the path with the quick selection tool. Use the magic Wand, Use color range. You want to select all the pixels outside the object fully selected and none of the object outer edge pixels at all. If you can make that selection you will be able to crop your image. You would delete the selected pixels in the work layer you created. You would then get the work layer new bounds and crop the document to the layers bounds or a little larger to leave a little background,
Thank You for your thoughts. That is exactly that I am afraid of that the only way to program. I have tried to solve this by automation, but still for last 13 years the best result has been manual work.
So far my research indicates the same, but even though I have been using Photoshop since its beginning I do not use many of its features and I thought that perhaps there is a silver bullet - in Photoshop configuration, some key to hold down, some hidden property or parameter in the scripting.
But thank you.
Perhaps the original plugin writer hears me and offers a plugin with crop only.
It is funny that the crop part works almost perfectly, but I find no replicas of it in Photoshop or other software I mentioned abovet that would work even closely so well in given circumstances.
1 person found this helpful
It the background are like you showed an Action was able to do the one you posted. It first cropped out the ruler acre recorded an action. I the ran the action on your image without the ruler and with the ruler. The action worked on both images. The tricky part is using delete twice. This seems to be required in actions and scripts to get clear to work. It take two.
Thank you. I will take this solution and try to enhance it. I need to get it scripted or automated as I need to process thousands of images each month.
If the color was solid then you could use Image>Trim and then set the trim based on the 'Top Left Pixel Color' or the 'Bottom Right Pixel Color' but your background is not a solid color so this is not an option.
If you did not have the extra element (ruler), then you could create your own automation. You would have to play around with the action to see how well it does then I assume there will still be some you need to get by hand. (This action was created for your image minus the ruler):
- Record the action.
- Select the color of the background (Choose the top right of the image where there was only background.) I had to up the default tolerance from 32 to 34 to get your lighter area on the top left. I could have selected from the top right of the image if I had set the sample size to 5x5.
- Inverse the selection
- Crop based on selection.
- Stop recording.
- You can run this through the bridge (Tools>Photoshop>Batch) or create a droplet of the action. (File>Automate>Create Droplet)
Not sure this will help you unless most of your images do not have the extra elements in the photo. (If the element is in the same area, you could crop that out first using the action.)
If the action works one your other images you could use menu File>Automate>Batch and batch all your image with the action.
That action doe nor work on my machine in CC 2017 there is a program problem stroking a path with the quick selection tool. I use CC 2014
Thank you for your thoughts.
I tried something similar, but I failed in defining the background "fuzzyness" - whatever I set the tolerance, it pretty much only worked with very light grain. Again - for some reason the C&S tool manages all images, so I wonder what is the magic behind the crop.
I have ruler on all the images as I need to keep original measures intact even though for catalogue I need just the coins. Background varies, yes, due to photo quality and photographer skills. Some coins can not be shot with too much light or I lose important details.
I could cut the ruler away with a separate batch but the sizes of coins and ruler vary.
Right now I get 40-50% done with a script that runs the photos through the crop and straighten (I store only first image as the rest are obsolete images) and then manually do the rest of images.
But there has to be a way.
Here is the Action I recorded that worked on your coin image. It uses the quick selection tool stroke around the canvas border. It may not work if you are using CC 2017. When I try Stroking a Path with the Quick selection tool on my Windows 10 preview build and CC 2017 Photoshop displays there was a Programs Problem and the actions stops. The Action works well in CC 2014 the version I use.