Known Participant
August 29, 2023
Answered
Crop and straighten script photoshop 2023
- August 29, 2023
- 4 replies
- 5873 views
this is original page
But i want to learn this techinque to be able to make it myself
Image resoultion is 300
Please , I want script that modified to produce a jpg image not psd
I have updated the code in the post above, try it.
MAXIMUM_RADIUS specifies the radius with which the Filters -> Other -> Maximum filter is applied. The goal I'm aiming for is to clear the image of garbage and frames.
Source frame:

frame after Maximum filter with radius 22

Next, on this cleaned image, the script executes the command Select -> Select Subject:

Then the script tries to align the image, for this it increases the selection box by the number of GLOBAL_OFFSET pixels in each direction. After that, the image is transformed by the Crop and Straighten filter:

Then I re-execute the Select -> Select Subject command and increase the selection by HEAD_OFFSET pixels up to provide free space above the head and finally crop the image within these boundaries:

That is, you can change these three constants yourself to achieve optimal results (however, it is difficult to guarantee that in 100% of cases the script will perform its task correctly).
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.