Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Batch Background Removal
#8
(04-19-2019, 01:49 PM)ct197475 Wrote:
(04-19-2019, 09:24 AM)Ofnuts Wrote:
(04-19-2019, 07:05 AM)ct197475 Wrote: Thanks a lot Ofnuts for your swift answer proving Gimp is a real alternative; 
yes I believe in automation;-) and I want to be autonomous on this matter if possible;

I have discovered that the "alfa to color" function with Threshold and Opacity set to 50% create a realy good job even in complicated background!

➤ I am missing the code though to batch process it as the Bimp in Gimp does not offer to deal with those functionality.

Would you have such a code that I could adapt to the file where I have 500 pictures to handle ?

https://stackoverflow.com/questions/4443...0#44435560

Thanks Ofnuts for this resource but where can I find the command that creates the action of getting color tonalphaband then setting Opacity and Transparency thresold ?

Sorry my knowledge is poor in gimp and Puthon

Filters>Python-fu>Console, and hit the Browse button. It's all there, use the search bar. The old Color-to-alpha (the one you can use via Python-fu) has no Transparency/Opacity thresholds, but I don't think it matters much in your case. In a script, I would:

* duplicate the layer,
* increase contrast and tweak the brightness so that everything you want to remove is white.
* apply color-color-alpha and remove the white
* alpha-select the result (IIRC, gimp_select_item() the layer)
* add a layer mask to the initial image, using the selection to initialize the mask
* delete the copy
Reply


Messages In This Thread
Batch Background Removal - by ct197475 - 04-18-2019, 11:51 AM
RE: Batch Background Removal - by Ritergeek - 04-18-2019, 01:36 PM
RE: Batch Background Removal - by Ofnuts - 04-18-2019, 08:10 PM
RE: Batch Background Removal - by Ritergeek - 04-19-2019, 12:37 AM
RE: Batch Background Removal - by ct197475 - 04-19-2019, 07:05 AM
RE: Batch Background Removal - by Ofnuts - 04-19-2019, 09:24 AM
RE: Batch Background Removal - by ct197475 - 04-19-2019, 01:49 PM
RE: Batch Background Removal - by Ofnuts - 04-19-2019, 02:12 PM
RE: Batch Background Removal - by ct197475 - 04-22-2019, 01:01 PM
RE: Batch Background Removal - by Terry50 - 04-23-2019, 06:17 AM
RE: Batch Background Removal - by Ofnuts - 04-23-2019, 09:19 AM
RE: Batch Background Removal - by Ofnuts - 04-22-2019, 07:55 PM
RE: Batch Background Removal - by ct197475 - 04-23-2019, 09:10 AM
RE: Batch Background Removal - by Ofnuts - 04-23-2019, 09:46 AM
RE: Batch Background Removal - by ct197475 - 04-23-2019, 09:49 AM

Forum Jump: