One of the problems with photographing action figures is the glare created by the lighting due to the glossy finish on most plastic. This is one method of using Gimp to remove the glare with existing plugins and luminosity masking techniques. This method also will aide in preparing images for photogrammetry. I've combined all of these manual steps into a python script which I have linked at the bottom of the page for those who are interested.

Download: python_fu_remove_glare.py
Code:
#!/usr/bin/env python
from gimpfu import *
def python_fu_remove_glare(image, layer):
gimp.progress_init("Creating layers " + image.name + "...")
# call script-fu plugin to create the luminosity channels
pdb.script_fu_sg_luminosity_masks(image, layer)
# create new layers for L and LL masks
newLayerL = layer.copy()
newLayerLL = layer.copy()
newLayerL.name = "L Layer"
newLayerLL.name = "LL Layer"
newLayerL.mode = BURN_MODE
newLayerLL.mode = BURN_MODE
image.add_layer(newLayerL, 0)
image.add_layer(newLayerLL, 1)
# get the list of channels
for x in image.channels:
# add the masks to the layers
if(x.name.startswith(('L-'))):
pdb.gimp_image_set_active_channel(image, x)
maskL = pdb.gimp_layer_create_mask(newLayerL, 6)
pdb.gimp_layer_add_mask(newLayerL, maskL)
if(x.name.startswith(('LL-'))):
pdb.gimp_image_set_active_channel(image, x)
maskLL = pdb.gimp_layer_create_mask(newLayerLL, 6)
pdb.gimp_layer_add_mask(newLayerLL, maskLL)
register(
"python_fu_remove_glare",
"Remove light glare from image",
"Using the luminosity masks, create new layers with L, LL masks, set the mode to burn",
"Jed Vargo",
"Jed Vargo",
"2019",
"<Image>/Filters/Generic/_Remove Glare",
"*",
[],
[],
python_fu_remove_glare)
main()


