Skip to main content
Participating Frequently
May 21, 2018
Question

White line when isolating object

  • May 21, 2018
  • 5 replies
  • 4631 views

Hello,

I often have to isolate objects on images that have a white (or other color) background. I isolate the object by masking it with the Quick select tool. However, there is often a white line left around the object. I end up having to manually erase this within the mask. I've tried softening the mask (makes it worse) and shifting the edge of the mask inward (helps, but doesn't get rid of the line entirely). Does anyone have any suggestions on how to mask an object without creating this line? I'm getting really tired of manually erasing them.

Thanks in advance for any ideas.

This topic has been closed for replies.

5 replies

Trevor.Dennis
Community Expert
Community Expert
May 21, 2018

If this is happening consistently, then something is wrong.  Does Select & Mask have Remember Settings checked?  If yes, turn that off, but look to see if you have some positive Shift Edge set.   I am not sure if you can reset Select Mask, so if that is not doable, I'd go right ahead and reset Preferences.  Like I said, you shouldn't be seeing a fringe with every selection.

If all the settings are OK, then you have various automatic fix options.

Select & Mask > Shift Edge

Select & Mask > Decontaminate Color

Layer > Matting > Defringe

Layer > Matting > Remove white (or black) fringe

Set the S&M output to New Layer with Layer Mask to give you the tools to fix the selection. 

Another option is to Ctrl click the mask to load it as  selection > Modify > Contract the selection (1 pixel?) > Invert the selection, and paint out the fringe in the layer mask with black.

Do you know you can access the old Refine Edge dialog by Shift clicking Select & Mask in the Select menu.  (You need the layer mask selected for this)

KimMcDAuthor
Participating Frequently
May 21, 2018

Thanks everyone for the help. I tried all these suggestions, even resetting my preferences. The line is still there. Here is a screen shot of my mask settings. Strangely, you can't see the white line against the red mask background. But it's still there. When I layer it over anything, it's very apparent. Playing with the contrast, feathering, smooth and shift edge buttons doesn't do it. I also tried the defringe method that a couple of people mentioned. No go. Anyway, thanks for trying to help. I guess I'm stuck erasing white lines.

Norman Sanders
Legend
May 21, 2018

Shift edge will contract or expand the selection and adding contrast may also help.

***

Kim, there is another option that may help. With the object you have selected appearing on a transparent layer, choose Layer > Matting (down at the bottom) and choose Defringe or one of the other options.

Norman Sanders
Legend
May 21, 2018

If you have an earlier version of Photoshop and Select and Mask is not available, consider this.

If quick-selecting the object produces the undesirable edge, Quick Select the non-object area and Select > Inverse the Selection and see whether that produces a better result.

Norman Sanders
Legend
May 21, 2018

If, after using Quick Selection tool, you chose Select and Mask in the Options bar, you will have the option to Contract the selection and make other fine-tuning adjustments. 

KimMcDAuthor
Participating Frequently
May 21, 2018

Hi Norman,

I'm not sure what you mean by " Contract the selection." Can you explain? I see all the options like edge detection, smooth, feather, etc, but not that one. Thanks,

Mike_Gondek10189183
Community Expert
Community Expert
May 21, 2018

Would have to see a screenshot of what your result looks like. You may need to shift the mask inwards more than 1 pixel, or you may need to do this only in certain areas, hard to say without seeing.

KimMcDAuthor
Participating Frequently
May 21, 2018

Hi Mike. Thanks for the suggestion. Here is a screenshot. The green background is just a fill layer behind the mask that lets me see the white line more easily. I would delete it before finalizing the image. The original of this image was a white background. Also, I have tried to shift the edge of the mask inward by more than 10 pixels. It doesn't help.