M
M
Margo Lionova2021-10-17 03:21:05
Automation
Margo Lionova, 2021-10-17 03:21:05

How to automatically crop pictures from a white background and save them?

Given: N-th number of pictures of type A

616b6a4958993623056959.png

Task: automatically convert pictures of type A, which contain two photos on a white background, into separate pictures without a white background. That is, you need to cut out pictures from white covers. To get it like this:

616b6b288edf3930762681.png

The task is rather complicated.
Type A image URL for those who try to solve the problem - https://img.alicdn.com/imgextra/i1/738455795/O1CN0...

I have about 2 thousand such images, so it's impossible to do it manually.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Kirill Nikitin, 2021-10-17
@Proshypomochi

In Photoshop (since it is in the tags of the question) it is solved in 2 stages.
I will describe using the example of Photoshop CC with an English interface.
Stage 1.

  1. Open any picture, even the one that is for example.
  2. Open Windows -> Actions and create a new Action.
  3. Start recording it.
  4. Click File -> Automate -> Crop and Straighten Photos.
  5. Close the original file.
  6. Consistently save two new files through Save As (important!) And close them one by one.
  7. Stop recording Action.

Stage 2.
  1. Open File -> Automate -> Batch
  2. Look for your Action.
  3. Choose where to take pictures from.
  4. Choose where to save them.
  5. Check the Override Action "Save As" command checkbox (other settings are optional).
  6. Press OK.

If everything is done correctly, then no further actions are required from you and you can go make tea while PS shovels your 2 thousand pictures and turns them into 4 thousand.

H
hint000, 2021-10-17
@hint000

The task is quite difficult.
The task is quite simple. For Linux users https://ru.wikipedia.org/wiki/ImageMagick
For Windows users, as well as those who are too lazy to deal with ImageMagick options, you can do by clicking the mouse in irfanView .
about 2 thousand pictures
can be processed in a few minutes (well, pick up the parameters there, back and forth ...). If you make allowances for the fact that you see both ImageMagick and irfanView for the first time, then you can spend half an hour .. an hour. The task is complicated only by the fact that the pictures are slightly different in size and slightly shifted relative to each other. It can be done in three passes: (1) cut out the top pictures, keeping the white margins; (2) cut out the bottom pictures, keeping the white margins; (3) automatic margin cropping.
616b9626af326013977785.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question