a weird Photoshop request (is it possible)

Discussion in 'Image Processing' started by Luke, Sep 27, 2014.

  1. Luke

    Luke Super Moderator

    Nov 11, 2011
    Milwaukee, WI USA
    Luke
    I'm bored at work and ran across a CD that is packaged in a cardboard cover. The previous owner spilled something funky and brown all over it. The end result is actually kind of cool.....kinda like someone added a texture layer in Photoshop....LOL. Now I'm wondering if there is a way to reverse engineer this and isolate just the spill. I'm thinking I could use Google image search to locate the original unsullied photo and shoot the soiled one. Is there anysort of filter to overlap the layers and subtract that which is the same on each layer and just show "the difference"? Or am I dreaming of something that does not exist. It's nothing serious, but was just wondering if there was a way to do it. I could then save this "spill" as a layer and use it on any photo I wanted to do.......in a way immortalizing the inactions of the previous owner to clean up his spill quickly.

    Any thoughts?
     
  2. pdh

    pdh SC Legend

    Jan 2, 2011
    yes, you use layers in PS surely? There's a zillion modes (subtract, diffeence and whatnot) and you vary the transparecny of the top layer.
    or something?
     
  3. Luke

    Luke Super Moderator

    Nov 11, 2011
    Milwaukee, WI USA
    Luke
    I think the problem I would run into is getting the images to overlap absolutely perfectly. Maybe I'll have a play around on Monday if I have some spare time between moving heavy boxes of CDs and LPs.
     
  4. pdh

    pdh SC Legend

    Jan 2, 2011
    the person you need to tutor you on this is sitting about three feet away from me.
    Unfortunately this means she is also 3700 miles away from you
     
  5. Luke

    Luke Super Moderator

    Nov 11, 2011
    Milwaukee, WI USA
    Luke
    In the grand scheme of the universe, she's actually a little too close:rofl:

    I'll give it a whirl and see what becomes of it. Some of mankind's greatest achievements have arisen from accidents (though this will not be one of them).
     
  6. bartjeej

    bartjeej SC Hall of Famer

    Nov 12, 2010
    bart
    Some experimentation in the GIMP has taught me you need to use the blend mode "divide" on the top layer containing the non-stained image.
    Incidentally, I found I can manually replicate the Difference blend mode using curves and opacity :smile: but it does bug me that I haven't managed to manually extract your ink stain yet...

    As for getting the images to overlap exactly; either use 100 / 200 / 400% view, or use a panorama maker or something similar to match the images (might require a few extra steps to get it done but it should be good). Or perhaps photoshop has a trick for this as well...
     
    • Like Like x 1
  7. porchard

    porchard SC Veteran

    345
    Feb 24, 2013
    Devon, UK
    When you have loaded both images as layers in the same document, Select both of them (using the Shift key and clicking) and then go to Edit > Auto-align layers, and try the Auto option (for first attempt. Try the Re-position option if the Auto option doesn't do the job properly).

    Once they are aligned, the Difference blend mode should separate the "spill" from the original.

    Good luck!

    Edit: Do bear in mind that I wrote this post having consumed several glasses of an eminently-drinkable Australian red. Therefore, my advice might not be entirely reliable...:wink:
     
  8. Luke

    Luke Super Moderator

    Nov 11, 2011
    Milwaukee, WI USA
    Luke
    Just to make sure it works, I will try to edit after a few glasses of creativity myself ;)
     
    • Like Like x 2
  9. bartjeej

    bartjeej SC Hall of Famer

    Nov 12, 2010
    bart
    I was expecting Difference to be the appropriate blend mode too, but in the GIMP at least, while that removes everything apart from the stain, it does leave an imprint of the original behind the stain (I simulated a semi-transparent stain using some painting with 50% opacity). For whatever reason, using blend mode Divide did get rid of the imprint of the original and leaves just my simulated stain. I don't know if it works exactly the same in PS though; might just be the GIMP being weird :tongue:
     
    • Like Like x 1
  10. porchard

    porchard SC Veteran

    345
    Feb 24, 2013
    Devon, UK
    An excellent idea! Of course, it might not get the results that you want for the image, but I'm pretty sure that it'll increase the enjoyment while trying. I'll lend support from this side of the Pond, by the same technique - if I didn't drink it all last night, that is...
     
  11. porchard

    porchard SC Veteran

    345
    Feb 24, 2013
    Devon, UK
    I don't use the Gimp, but in PS, the Divide mode, the Difference mode, and the Subtract mode all go some way towards the desired result. However, all of these skew the colours to the point where the results might be unacceptable. I've never found a perfect method for this:confused:, but if anyone can come with one, I'd be interested to know.