0

I have a bottle that looks like this

enter image description here

The image has a few issues. There is reflection, a green border at the bottom, and you can see the bottom of the lightbox. We have quite a few images like this. Some of the images I've been able to use imagemagick brightness and crop but it doesn't work on anything like this.

All these images are different sizes so we can't choose a crop dimension to bulk crop them.

I'm wondering if there is a way I'm not thinking about to crop programmatically, or if there is a good service where we can get actual people do do the cropping. Thanks!

  • It depends on how many you have to do and how often. Are we talking a few hundred that a freelance photographer or graphic designer (or possibly mechanical turk) could knock out in a day or are we talking thousands that would need a day to get a quick & dirty custom app up and running? – James Snell Jul 26 '15 at 16:50
1

Quick solution using G'MIC (command line tool)

Save the following to a text file, called 'white.gmic' or any other name:

make_white:
  TOLERANCE=60                            #adjust as needed
  {w},{h},1,3,0                           #create mask image
  -rectangle[1] 0,0,100%,70%,1,255        #set the mask to exclude the upper 70% from flood fill
  --add[0] [1]                            #combine image+mask
  -remove[0]                              #original image is no longer needed
  -flood[1] 50%,90%,0,$TOLERANCE,0,1,255  #flood fill the bottom background
  -rectangle[1] 0,95%,100%,100%,1,255     #paint over the green glass edge
  -sub[1] [0]                             #undo mask, recover the original image
  -remove[0]                              #remove mask

Then, use G'MIC to process your photos:

gmic white.gmic bottle.jpg -make_white -output bottle_processed.jpg

Or for multiple images (this specific example is meant for linux and similar os, the G'MIC itself and the scripts you make for G'MIC are multiplatform and should work everywhere)

for filename in *.jpg; do gmic white.gmic $filename -make_white -output other_folder/$filename; done

The result:

bottle image processed by G'MIC

G'MIC can be also used inside Gimp, the user defined actions like 'make_white' here, will appear in the Gimp's G'MIC plugin (but I never tried this, and for batch processing, command line is probably more convenient anyway)

0

The cropping is a bit trickier, but you can probably get rid of the reflection using one of the blending modes in Photoshop - I'm guessing maybe "screen"? If it works, you can save this as an action and apply it as a batch.

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.