How to Remove Unwanted Objects from a Photo
A stranger in the background, a power line across the sky, a sensor dust spot: most photos have something you wish was not there. This guide explains how the removal tools actually rebuild the missing area, which tool suits which job, and how to clean up the telltale repeats and seams that give a retouch away.
How object removal works
When you delete an object, the pixels that were behind it were never photographed. Every removal tool is guessing, and the tools differ only in where they get the replacement pixels and how they blend them in.
Content-Aware Fill in Photoyam uses a technique called PatchMatch texture synthesis. It cuts the surroundings into small squares, 7 by 7 pixels, and for every small square inside the hole it searches for the best-matching square outside it. It fills the hole by copying and averaging those matches, then repeats the search a few times so the pieces agree with each other. It first works on a shrunken copy of the image to get the big shapes right, then refines at larger sizes until it reaches full resolution. That is why it continues grass, brick, water ripples or fabric instead of smearing them.
Two practical details follow from how it works. It only borrows from a zone around the hole, roughly twice the hole’s size in each direction (at least 64 pixels), so the texture you want must exist nearby. And it copies squares at their original size and angle: it cannot shrink a pattern to follow perspective or rotate a line to match a slope.
The Spot Healing Brush is simpler. It fills each dab by pulling the colors around the edge smoothly inward, like stretching a membrane across the hole. That is ideal for small spots on smooth areas such as skin or sky, and poor for anything with texture, which comes out soft.
The Healing Brush copies texture from a source point you choose, then solves for the smoothest blend so the copy takes on the brightness and color at its new edges. The Clone Stamp copies exactly, with no blending at all.
Which tool to use
All of these live in the toolbar. Press J to reach the healing group (Spot Healing Brush, Healing Brush, Patch, Content-Aware Move) and S for the Clone Stamp. Content-Aware Fill is a command: Edit › Content-Aware Fill.
| Tool | Where pixels come from | Best for |
|---|---|---|
| Content-Aware Fill | Automatically matched patches near the selection | Medium objects on textured backgrounds: people on a beach, a bin on grass, a sign on a wall |
| Spot Healing Brush | Smooth blend from the dab’s edges | Dust spots, pimples, small specks on skin or sky |
| Healing Brush | A source point you Alt+click, blended to fit | Blemishes and lines on textured skin or surfaces |
| Clone Stamp | A source point you Alt+click, copied exactly | Edges, straight lines, patterns, and fixing the other tools’ mistakes |
| Patch | An area you drag the selection onto, tone-matched | Larger even areas: a stain on a wall, a patch of worn lawn |
| Content-Aware Move | Moves the selection and fills the gap it leaves | Repositioning a small subject, such as a boat or a bird |
Step by step: remove an object with Content-Aware Fill
- Open the photo and duplicate the layer. Open the image in the editor and press Ctrl+J (Layer › Duplicate Layer). You will work on the copy, so the original stays one click away under the eye icon.
- Select the object generously. Press L for the Lasso and draw loosely around the object, leaving a margin of background all the way round. Include its shadow and any reflection.
- Expand the selection a little. Use Select › Modify › Expand… by 4 to 10 pixels. This catches the faint halo of the object’s color that the Lasso missed.
- Run the fill. Choose Edit › Content-Aware Fill. It runs in the background while a busy indicator shows; larger holes take longer.
- Deselect and inspect. Press Ctrl+D and zoom in to 100%. Look for repeated shapes, cut-off lines and blurry patches, then hide and show the layer to compare.
- Touch up. Fix any remaining flaws with the Healing Brush or Clone Stamp as described below, then export with File › Export As.
Selection tips that decide the result
- Leave a margin. A selection that hugs the object leaves a thin ring of its color, which the fill then treats as good texture and spreads. A few pixels of real background inside the selection is cheap insurance.
- Take the shadow with it. A removed person whose shadow stays on the ground looks stranger than the person did.
- Prefer Expand to Feather. Any pixel that is even slightly selected is completely replaced by the fill. Feathering therefore just makes the hole bigger without softening anything.
- Keep other objects out of the zone. Because the fill borrows from nearby, a second person standing close by can be copied into the hole. Remove the nearest distractions first, or cover them temporarily.
Fixing repeats and seams
Two artifacts give away most retouches. Repeats are recognizable shapes, such as the same pebble or cloud wisp, appearing twice. Seams are lines where two textures meet at a slight mismatch, or where a straight edge is broken.
Healing Brush for repeats
Choose the Healing Brush, Alt+click an area with the right texture but no distinctive features, then paint over the repeat. The texture is copied and blended to fit, so the copied pebble does not become a third twin. Aligned keeps the source moving with your brush; turn it off to sample the same spot for every stroke.
Clone Stamp for lines and edges
A horizon, a railing or the edge of a table must line up exactly, and blending would soften it. Alt+click on the line just beside the damage, then paint along it with a medium-hardness brush. The Clone Source panel can offset, scale or rotate the source if the line runs at an angle, and Show Overlay previews what you are about to paint.
Patch for large even areas
Select the patchy region with the Lasso, switch to Patch, then drag the selection onto a clean area. The texture comes from where you drop it, and the brightness is matched to the original spot.
What these tools cannot do well
- Large holes. The bigger the area, the more the fill has to invent from a limited neighborhood, and the more likely it repeats itself. If an object covers a quarter of the frame, cropping is often the honest fix.
- Faces and bodies. The fill copies texture, not meaning. It will not draw the half of a face hidden behind someone’s shoulder.
- Straight lines and perspective. Tiled floors, window grids and buildings shrink toward the horizon. Patches are copied at one size and angle, so lines bend or break. Rebuild them with the Clone Stamp.
- Objects touching the subject. A lamppost growing out of someone’s head sits right against detail you want to keep. Select tightly on the subject’s side and generously on the background side.
Common mistakes
- Working on the only copy. Duplicate the layer first so you can compare and back out.
- Selecting too tightly. Edge remnants get spread into the fill. Expand the selection.
- Judging at a zoomed-out view. Repeats and seams are invisible at 25%. Check at 100% before exporting.
- Using Spot Healing on texture. It blends smoothly, which reads as a blurry smudge on bark, gravel or fabric. Switch to Content-Aware Fill or the Healing Brush.
- Re-running the same fill hoping for luck. The same selection gives the same result every time. Change the selection instead.
Try it in Photoyam
Content-Aware Fill, healing tools and Clone Stamp in a free editor that runs in your browser. No sign-up, and your photos never leave your device.
FAQ
Content-Aware Fill is grayed out or does nothing. Why?
It stays grayed out until there is an active selection, so draw one around the object first. If it runs but nothing changes, the active layer is not a regular pixel layer: smart objects (including images added with File > Place), text and shapes are skipped. Rasterize the layer with Layer > Rasterize, or select the photo layer.
Running Content-Aware Fill again gives exactly the same result. How do I get a different one?
The fill is deterministic: the same pixels and the same selection always produce the same result. Change the selection instead, for example by expanding it a few pixels or reshaping it, or fill a smaller part at a time.
Is my photo uploaded to remove objects?
No. Content-Aware Fill and the healing tools run in your browser tab on your own device. Nothing is sent to a server.
Can it remove a person from a crowded scene?
Sometimes. It works best when the area behind the person is texture, such as grass, sand, sky or a plain wall. If other people, faces or straight architectural lines sit right behind them, expect to finish with the Clone Stamp, or crop the photo instead.