Announcement

Collapse
No announcement yet.

Getting rid of background

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Getting rid of background

    Hello,
    It is a common problem in microphotography that the illumination of the microscope field is not completely uniform.
    Question: would it be thinkable to take two photos, #1 of the empty field, #2 with the object and combine them in one psd as layers and substract #1 from #2 to get rid of the background?
    Masking is out of the question due to the contorted character of the object and the unavoidable loss of edge detail in touching up the mask.
    I hope I did not miss the obvious answer to this in Richard's book,wich I confess to be still digesting.

  • #2
    Masking is the way to go...

    ... it's just how you create the mask.

    Try this:
    1. Start with two layers:
    -- the bottom layer is your picture #2, label this 'image'
    -- top layer is picture #1, label this 'bg'
    2. duplicate the image layer and move it to the top, so that the layer stack is:
    image copy
    bg
    image
    3. with the 'image copy' layer selected, change the blend mode to "difference" and merge down (command/ctrl+E)
    4. use the HP tools "Clear Black" and "Commit Transparency" and rename the resulting layer 'mask'

    You'll find that the bg layer has now been replaced by the mask layer. To use the mask layer:
    1. duplicate the image layer and move to the top.
    2. group the 'image copy' layer with the mask layer (command/ctrl+G)
    3. select the image layer and create a new fill layer

    You'll find the background replaced by the fill layer's content.

    Note this'll only work if the background you want to remove is the same in both pictures (so that the 'difference' in the RGB values is '0' and thus renders as black)

    Cheers,
    Paul.
    Last edited by pmarchant; 07-25-2003, 07:17 PM.

    Comment


    • #3
      Hmmm. Somebody's been studying their Hidden tools. Difference mode is indeed a good solution IF the lighting will be identical between shots and IF the object being introduced is not completely opaque in areas.

      Nice solution Paul.

      Comment


      • #4
        Paul,

        Thank you for a quick and very clear answer!
        It works beautifully. one little point though: "Clear black" did'nt work but "Drop Black" did; Ctrl+E did'nt work but Ctrl+G did.
        Any comments ?

        Richard,

        Thanks for dropping in. Both ifs are met
        What part of your book should I have read more attentively?

        Comment


        • #5
          What part of your book should I have read more attentively?
          Well, I don't know that Paul's solution was something you'd get directly from readig the book unless you REALLY DIGESTED the whole thing. That is a combo of CMYK separation and layer masking...very much something he could have come up with based on those techniques, but I don't know that it isn't something else.

          As far as the difference between drop and clear black...it sometimes depends on what you are doing, and I think either of these will work. You want to group with the mask and commit the transparency (so it is actually transparent rather than just invisible). If you aren't sure why you are doing either of these, I'd re-read those sections too.

          I don't know that I said anything there...did it help?

          Comment


          • #6
            [QUOTE]...really digested..
            I suspect that is still going to take some time
            I recently got my hands on a copy of PS 6, so the temptation lurks to make the whole thing an action .

            BUT the process uses your HPE1 tools...so the question becomes: can I just copy (or install..) them in the action directory of PS 6 ?

            OR do I have to fish out the equivalent steps in PS 6 ?

            OR can I access the HPE 1 action script (wich I surmise was written in PS x)and read off the PS steps ?

            OR am I too ambitious ?

            Comment


            • #7
              these are good questions.

              a) Can I copy? i don't know that there is anything you can do with actions in PS6 that you need my Hidden Power for. if so, and you need to use a reference, that is ok (this would say something like Play hidden power "this action" in the action steps). Copying the sequence to a new action is a copyright violation. Re-recording, technically is not. conceptually, I leave that up to you. If it is for only your use...the restrictions are far fewer.

              b) You may simply need to learn to work with tools a little more in-depth to apply some of the background I have included in the tools, but i DO NOT discourage you from taking the tools apart and learning from them. In fact, the book tells you everything the tools do...my goal was to educate the reader, and the more you learn, the better!

              c) am I too ambitious? No. You have the PS6 demo, PLEASE use it to your advantage. All I ask is that you don't do like some already have and run away with my idea claiming it is yours. I can't enforce, and won't. I'd just like to have my ideas help promote my book and free tools...and those that need help will hopefully come and use them. Hopefully everyone benefits. All I want is that I get proper credit for my ideas and effort.

              I hope that answers. if you need to we can set up a call to discuss.

              Comment


              • #8
                Really Digesting

                is going to take time. As i say in the intro...10+ years (now 11) and still learning every day. If you take photography before that there are a lot more years (started when I was 9). Can I fit it all in a 300 page book? Do I expect you'll grab every nuance that is clear to me?

                You'll probably have to read it a few times at least!

                Richard

                Comment


                • #9
                  i don't know that there is anything you can do with actions in PS6 that you need my Hidden Power for
                  Oh, but there is!

                  First it would allow to automate the elimination of the background in large series of micrographs and relieve the strain of watching my "steps"(pun intended)

                  Second, it would let me peek in the innards of actions and learn how they tick so that

                  Third, I could risk my hand at creating some, mail them to you and IF they are working well and IF you find them useful, I would be honoured to see them included in one of your future batches(does this settle the copyright infringement issue?)

                  10+ years (now 11) and still learning
                  How boring are days without !

                  Thank you for your help

                  Comment


                  • #10
                    Glad it worked in the end.

                    The difference between "clear black" and "drop black", is that clear only removes pure black, whereas drop additionally fades out the "almost pure" blacks. I suspect that your two images may have looked the same, but the underlying image data was just slightly different. In which case the difference blending won't yield pure black.

                    I don't know why Ctrl+E didn't work, as that is the keystroke for Layer>Merge Down which merges the currently selected layer with the layer immediately below (as long as both are visible).

                    I've only had Richard's book for about 3 months (and PSE2 for about 4) so I've not digested it all! I find I'm using masking a lot, and the excellent section on saturation masking demonstrates you don't have to use the lasso tool to create masks. Once you understand what the Transparent Blending HP Tools do, making masks gets easier. For example, by using a levels-corrected luminosity separation, a curve, and Transparent Grayscale I was able to create a midtones mask. With different curves I also got masks for shadows and highlights (but now HPT3 provides a quicker way to do these two).

                    It's also worth playing about with the blending modes. I just created black, 50% grey, and white fill layers, a black to white 0deg gradient layer, and a spectrum 90deg gradient layer. Then tried various combinations of the layers to see what (if any) effect the blending modes have.

                    Cheers,
                    Paul.
                    Last edited by pmarchant; 07-26-2003, 10:43 PM.

                    Comment


                    • #11
                      Claude,

                      All I mean is that you don't need my tools to do things in PS6. You can do them without. Certainly you should learn from them in any way you find helpful.

                      I would be glad to see what you've put together when you are done.

                      Comment


                      • #12
                        Paul and Richard,

                        After a first WOW! experience with Paul’s technique, Richard’s comment on the need for both backgrounds to be ABSOLUTELY identical became obvious and my idea to move the microscope stage to an object-free position impractical. The reason is simple: the “dirt” content of the fields is not the same (dirt is a composite of dust, staining remnants and thickness variations of mounting medium).

                        So I set about to circumvent the problem and came up with the following solution:
                        -AutoLevels
                        -Lasso a portion of background
                        -Select>Similar
                        -Edit>Copy
                        -Edit>Paste
                        -Lasso another portion of background
                        -Select>Similar
                        -Edit>Copy
                        -Edit>Paste
                        and repeat the same a few times , merge all new layers and apply Paul’s technique.
                        The few remaining blobs are easy to paint over.

                        See attachment for result.
                        Attached Files

                        Comment


                        • #13
                          So that is all very nice but time consuming and I risked my hand at recording the whole process in PS 6.The action works beautifully on the image used for recording but eats up nearly everything on another(but similar image)!

                          See for yourselves
                          Attached Files

                          Comment


                          • #14
                            I most certainly must have goofed somewhere and need help.

                            Here is the action:
                            Attached Files

                            Comment


                            • #15
                              If you are working on the same image every time this might work, but the problem is you may be trying to automate too much of the series. For example, if you are trying to do as described earlier, you might want to make a manual selection and then automate select similar, delete, and assign this to a keystroke. You really can only make useful actions of things that are ultimately repetetive...meaning not only that you go through the same steps, but that you go through the same steps applied the *same way* to every image. My guess from looking at that image is that these things are not shaped exactly the same way every time. That being the case you cannot automate the selection of shape.

                              Depending on what really needs to be selected and the true difference between the images and exposures, you *may* be able to automate more of this (for example, if all the objects will be darker than the background, if they will all be a particular range of reds, whatever). In looking over the text for the action, it seemed that there were unnecessary steps. If using PS6, you would want to sub out the actual selection (Set Selection
                              To: polygon
                              Points: point list
                              point: 23.977 inches, 18.737 inches
                              point: 23.977 inches, 18.737 inches
                              point: 23.684 inches, 18.61 inches
                              point: 23.644 inches, 18.528 inches
                              point: 23.601 inches, 18.443 inches
                              point: 23.561 inches, 18.361 inches
                              ...636 More
                              With Anti-alias -- which selects exactly the same image area every time based on coordinates) with a Stop, that allows you to do something else (make a manual selection) before continuing (by pressing play). In elements, recording would have to be done so all the parts were separate actions with separate prompts for play.

                              That help? If I had several images to compare, I might come up with something more clear, but I have only the one image with nothing to compare.

                              Comment

                              Related Topics

                              Collapse

                              • lifeisagame
                                Applying a layer mask to an image in elements 4.0
                                by lifeisagame
                                Hi all can anyone explain to me how to apply a layer mask to an image in photoshop elements 4.0 what I'm trying to do is clear up a picture thanks for your help
                                06-26-2006, 08:09 PM
                              • Rich10
                                Selection and painting on layer having a layer mask from Hidden Power Tools?
                                by Rich10
                                I inadvertently first put this message in the software forum. I meant to put it here. Sorry about that.
                                I am making a collage using PE2. I have a background layer (solid color) and then each photo is on its own layer with a layer mask used from the Hidden Power Tools. I was hoping to use the...
                                08-06-2003, 01:45 PM
                              • bobdut
                                Never quite understood layers and how to use them
                                by bobdut
                                I've used Photoshop for years -now version CS2 and lately Photoshop Elements v.6_Somehow I've never really grasped the basics of Layers. I open the Layers Panel, put in one of the photos I want to work with as a background and then try and add another, then the 1st one disappears. I know it's something...
                                03-03-2008, 06:51 AM
                              • Rich10
                                Painting a layer having a Hidden Power's layer mask active in PE2?
                                by Rich10
                                I am making a collage using PE2. I have a background layer (solid color) and then each photo is on its own layer with a layer mask used from the Hidden Power Tools. I was hoping to use the mask to paint with black on each photo to make each of them irregular shaped and remove excess parts of each photo....
                                08-06-2003, 01:35 PM
                              • MrMarco
                                Layer Mask
                                by MrMarco
                                I have just downloaded the Hidden Power tools for PS Elements 2.0.

                                I wanted to learn how to isolate a subject easier than using the background erase tool, which took forever to use! I was told to use the poly lasso and then apply the layer mask to clean up the edges. Well... once I click...
                                06-24-2004, 02:13 PM
                              Working...
                              X