Copy link to clipboard
Copied
Hi friends,
I'm looking for a script that detects a subject and crops the image.
Workflow
I get thousands of RAW files with a wide framing. Same camera all over the shooting, same pixel dimensions. Models move and change pose.
I develop on C1 and export PSD files.
Work on the PSD files and export JPEG for the client.
Script
Detect Model's height and crop leaving a few pixels above the head and bellow the feet.
Model should be centered on the image.
Keep aspect ratio 2:3.
Input files
https://www.dropbox.com/sh/gbufidhfqic1f4b/AADlTLSsfwDxTDBL-RcQHAxxa?dl=0
Thanks in advance!
Thanks all for your help!
After reading all the proposals I came out with an action. Please take a look at it and let me know your comments.
The action runs auto-select, expands the selection 35px, creates a filled temp layer, transforms and uses the trim command.
To keep the 3:2 proportion I considered the model's height:
Width = 0.667 × Height
Once the model's height is "mapped" by the autoselect command I just copy the selection, rotate 90° and contract the width to 66.7%.
Then trim transparent pi
Copy link to clipboard
Copied
latest ladies fashion wears in uk wholesale dealer. get latest party wears, shirts, skirts, coats, tops and trousers. New stock available with different variants
Copy link to clipboard
Copied
So maurom15189996 you now have at least two different methods to achieve your stated goal.
Any feedback, comments? Likes? Marking one or more posts as the Correct Answers?
Copy link to clipboard
Copied
Thanks all for your help!
After reading all the proposals I came out with an action. Please take a look at it and let me know your comments.
The action runs auto-select, expands the selection 35px, creates a filled temp layer, transforms and uses the trim command.
To keep the 3:2 proportion I considered the model's height:
Width = 0.667 × Height
Once the model's height is "mapped" by the autoselect command I just copy the selection, rotate 90° and contract the width to 66.7%.
Then trim transparent pixels on top, bottom, left and right.
Download:
Copy link to clipboard
Copied
Great job maurom15189996 I really like it, you have come up with a workable native solution and I too would have marked it as the correct answer!
Copy link to clipboard
Copied
Just a little question :
I do not understand translations purpose (0,5/0,5 and then 0,5).
Copy link to clipboard
Copied
Hi didiermazier ,
I had to ad it in order to compensate for the "half pixels" produced by the round-up of the resulting number.
2:3 = 0.666`
The client is requesting a size of 2000x1333px and this fixed it quickly.
Copy link to clipboard
Copied
Thanks for the info.
Just adding 2 tips that do not enhance a lot your excellent solution but can help anyhow :
Anyway very interesting and inspiring thread, thanks!
Copy link to clipboard
Copied
Thanks for that!!
I optimized the action as adviced and updated to the link posted above.
Copy link to clipboard
Copied
didiermazier Photoshop actions sometimes seem to record this unnecessary 0.5 translation even when it is not explicitly called for. Go figure!
My version of the refined action is linked below as the one from maurom15189996 was not updated?
I removed the first tool selection step as it is not necessary (I also removed the 0.5px values).
Copy link to clipboard
Copied
Hi! I've come acrosss your action while looking for a solution to some what (or in my dream life fully) automate center cropping for portraits. This generally takes me an additoional 1-2 hours per school for school photos. I've loaded the action and tried it out, and it works fabulously as written. However for my needs I need it to be portrait, vs full body. I'm hoping for some guidance in adjusting the action, I'm still quite new at photoshop and can't figure how to change the shrunken person layers to acheive this.. Anyone want to spoil me and help?
Copy link to clipboard
Copied
I would suggest that you create a new topic, with a link back to this topic as a reference.
It would help if you could post 2-3 different images before/after to illustrate what you are trying to achieve.
As these are school portraits, please redact/pixelate etc. the faces for privacy, but don't affect the hair or other areas of the image that may be needed for select subject or other possible selection methods.
If these are high resolution, then perhaps make them half size, if they are resized too small then there may be too few pixels to accurately work with.
Copy link to clipboard
Copied
The solution from this topic is very similar to user expectations, so no need to create new topic. Of course let him say something more to see how close it is to that he wants. Probably the script / action must be extended of the part it cuts 2 / 3 of bottom part and additionally narrows the sides.
Copy link to clipboard
Copied
Rotating is a brillant idea!
Copy link to clipboard
Copied
hey mods, there are multiple spam bots in this thread...