![Offline Offline](./styles/GimpChat/imageset/en/icon_user_offline.gif) |
GimpChat Member |
![User avatar](./download/file.php?avatar=196_1721646829.png) |
Joined: May 16, 2010 Posts: 14730 Location: USA
|
Iain wrote: Here is a quick filter that uses garagecoder's filter but adds some more bits to get better edges. It requires two layers, the top layer is filled with either red,green,or blue. red for parts to remove, green for parts to keep and blue for edges to be calculated by the filter. [ Image ] #@gimp objectmask: objectmask, objectmask #@gimp : edge max = float (255,0,255) #@gimp : edge min = float (0,0,255) #@gimp : erode = int(3,3,19) objectmask: -remove_opacity[1] -split[0] c --l[1,2,-1] -add[0,1] #create inpaint mask -inpaint[1] [0] # inpaint -keep[1] -endl
-sub[-1] [-2] -abs[-1] # difference between the inpainted image and the original
-l[0,1,2,3,-1] # use gcd_splitobj on the difference image -reverse[2,3] -fill[2] 0 -negative[3] -append[0,1,2,3] c --gcd_splitobj[0,1] 50,3,3,0,0,0,0 -endl
-l[1,2]
-l[0] # create greyscale mask -split c -max -endl
-split_opacity[1] -erode[-1] $3 # adjust gcd calculated mask -apply_curve[0] 0,-1,0,$2,0,$1,255,256,255 # apply curve to difference image to adjust transparency -add[0] [2] # add gcd mask and difference image -c 0,255 -endl
-keep[1,5] -reverse -append cIain i borrowed your image. Hope you don't mind. May i ask which values in the filter you used to get those excellent results? Even using your red, green, and blue mask i could not get the extraction area correct. ![Smile :)](./images/smilies/icon_smile.gif) ![Image](http://www.gimpchat.com/files/196_object-mask_RD.png) I also couldn't get very good results with my own mask. ![Image](http://www.gimpchat.com/files/196_object-mask2_RD.png) Definitely getting very close with this filter though! Thanks!
_________________
![Image](http://gimpchat.com/files/196_Gimp_Asphalt_GC_Sig.png) Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."
|
|