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, what each setting in the Content-Aware Fill window changes, 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 refinements stop the result from looking pasted in. Before any texture is copied, the fill looks for straight edges that run into the hole and come out on the other side, such as a horizon, a railing or the edge of a pavement, and steers the patches so the line carries on through the gap instead of breaking off. Then, as the patches are assembled, their brightness and color are blended toward the border of the hole, so a fill borrowed from a slightly shadier spot does not show up as a darker blotch.
Two practical details follow from how it works. By default it only borrows from a zone around the hole, roughly twice the hole’s size in each direction (at least 64 pixels, and less for very large holes or on phones and tablets with little memory), so the texture you want must exist nearby. And by default it copies squares at their original size and angle. The Content-Aware Fill window can allow rotated, scaled or mirrored copies when a texture curves or shrinks with distance.
The Remove tool is a shortcut to the same engine. You paint over the object instead of selecting it, and when you let go, the painted band (grown by two pixels to catch soft edges and halos) is filled with the default settings.
The Spot Healing Brush works dab by dab. A small dab, under about 12 pixels across, is filled by pulling the colors around its edge smoothly inward, like stretching a membrane across the hole: ideal for dust and pimples on skin or sky. A larger dab runs a small-scale version of the patch search, so a wider brush keeps some texture, though it still has far less context to work with than a full fill.
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. Both need that source point first: Alt+click it as in Photoshop, or press Set source in the options bar and then click the spot. Until you do, the options bar reads Source: not set and the button carries an amber dot, which turns green once a source is picked. The first stroke painted without a source brings up a small hint right where you painted, with its own Set source button. On a phone, tap Set source in the tool’s options bar, then tap the spot to copy from.
Which tool to use
All of the brushes live in the toolbar. Press J to reach the healing group, then press it again to step through Spot Healing Brush, Remove, Healing Brush, Patch and Content-Aware Move; long-press the button to pick one from its list instead. S selects the Clone Stamp. Content-Aware Fill is a command with its own window: Edit › Content-Aware Fill….
| Tool | Where pixels come from | Best for |
|---|---|---|
| Remove tool | Matched patches around the area you painted, default settings | Quick removals with no selection: litter on a lawn, a wire you can trace, a sign on a plain wall |
| Content-Aware Fill | Matched patches near the selection, with a preview and settings you control | Medium objects on textured backgrounds: people on a beach, a bin on grass, anything the Remove tool got wrong |
| Spot Healing Brush | Smooth blend from the dab’s edges; patch search for larger dabs | Dust spots, pimples, small specks on skin or sky |
| Healing Brush | A source point you Alt+click (or pick with Set source), blended to fit | Blemishes and lines on textured skin or surfaces |
| Clone Stamp | A source point you Alt+click (or pick with Set source), copied exactly | Edges, straight lines, patterns, and fixing the other tools’ mistakes |
| Patch | An area you drag the selection onto, blended into the surrounding shading | 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 |
Quickest: paint it away with the Remove tool
For a lot of everyday clutter you do not need a selection at all. Duplicate the photo layer first (Ctrl+J) so you can compare, then:
- Pick the Remove tool. Press J until the options bar reads Paint over what you want to remove, or long-press the healing button and choose Remove.
- Size the brush. Set Size in the options bar a little wider than the thickest part of the object. One or two broad strokes give a cleaner fill than many thin ones.
- Paint over all of it. Drag across the object, its shadow included. The stroke shows as a translucent pink band and nothing changes yet, so keep the button held until every part is covered.
- Let go. The painted area is filled from its surroundings. Bigger areas show a progress overlay with a Cancel button, and each stroke becomes one Remove Tool step in the History panel.
Every release is a separate fill, so a long object such as a cable can be done in sections. If a stroke pulls in the wrong texture, undo it with Ctrl+Z and try a slightly wider stroke, or select the object and use the Content-Aware Fill window, where you can see and steer where the texture comes from. The tool only changes pixel layers, and a layer whose pixels are locked ignores it.
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 › New › Layer via Copy; with nothing selected it copies the whole layer, just like 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.
- Open the Content-Aware Fill window. Choose Edit › Content-Aware Fill…. The Preview shows the selection and its surroundings already filled with the current settings, and redraws a moment after each change.
- Adjust only if the preview needs it, then click OK. The defaults suit most photos. If the preview borrows from the wrong place or shows a visible patch, try the settings below. After OK the full-resolution fill runs in the background with a progress overlay and a Cancel button, and lands as one Content-Aware Fill step in History.
- Deselect and inspect. Press Ctrl+D (Select › Deselect) 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.
Content-Aware Fill settings
The window’s settings change where the fill looks for texture and how freely it may reshape what it copies. Photoyam keeps your last choices until the Pro editor is reloaded, and Reset puts them back to the defaults.
| Setting | Choices | When to change it |
|---|---|---|
| Sampling Area Options | Auto (default), Rectangular | Auto samples a band that follows the shape of your selection. Rectangular samples the whole box around it plus the same margin, which helps when the right texture sits off in a corner. |
| Show Sampling Area | On or off | Tints the sampled pixels green in the preview, so you can check that the texture you want is inside the zone and the thing you are removing is not. |
| Color Adaptation | None, Default, High, Very High | Default blends brightness and color into the edges of the hole. High and Very High also let each copied patch shift its brightness, for gradients such as sky, vignettes or a wall lit from one side. None copies texture without any blending. |
| Rotation Adaptation | None, Low, Medium, High, Full | Lets copied patches turn: up to 12° at Low, 30° at Medium, 90° at High and any angle at Full. Use it for curved patterns such as tree rings, the rim of a round table or ripples spreading out. |
| Scale | On or off | Lets patches be copied up to 25% larger or 20% smaller, for repeating texture that changes size with distance, like pebbles, cobbles or rows of seats. |
| Mirror | On or off | Adds flipped copies to the search, which helps with symmetrical subjects and with texture that only appears on one side of the hole. |
Rotation, Scale and Mirror give the search many more candidates, so the fill takes longer, and on plain texture they can make things worse by pulling in odd angles. Change one setting at a time and watch the preview before clicking OK.
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 (Window › Clone Source) 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 shading of the original spot is kept, so the patch fades into its surroundings without a seam. The options bar sets how:
- Source (the default) fixes the selected spot from where you drag to; Destination works the other way round, copying the selected clean area onto the place you drop it.
- Diffusion (1 to 7, default 5) sets how quickly the patch adapts at its edges: low values for grain and fine detail, high values for smooth areas such as skin or sky.
- Transparent lays the sampled texture over the spot while keeping the spot’s own shading, useful on gradients.
- Use Pattern heals the selection from the chosen pattern instead of from the photo.
- Switching Patch from Normal to Content-Aware gives the Structure and Color controls described for Content-Aware Move below, plus Sample All Layers.
On a large selection the blend can take a moment after you let go; a Working… panel then appears, and its Cancel button or Esc leaves the photo as it was. Spot Healing and the Healing Brush show the same panel after a long stroke.
Content-Aware Move for repositioning
Select the subject loosely, switch to Content-Aware Move (in the J group) and drag the selection to its new place. The gap is filled, and the moved patch is blended into its new surroundings so no hard outline is left; the selection follows the patch. Two options set how: Structure (1 to 7, default 4) decides how strictly the patch keeps its own pixels, with a wider soft edge at low values, and Color (0 to 10, default 0) decides how far its colour adapts to the new spot. Raise Color when you move something onto a lighter or darker area. Extend mode copies the patch instead of moving it.
Vanishing Point for floors, walls and facades
Ordinary cloning copies a patch at one size, which looks wrong on a surface that recedes: tiles near the camera are big, tiles near the horizon are small. Filter › Vanishing Point… (Alt+Ctrl+V) fixes that by letting you describe the surface first, then cloning along it. With the photo layer active:
- Draw a plane. Pick the Create Plane Tool (C inside the window) and click the four corners of a flat area, for instance a rectangle of floor tiles or a stretch of brick wall. A grid appears. If the window says the plane is not valid, move a corner until the outline is a proper four-sided shape.
- Fit it. With the Edit Plane Tool (V), drag corners to sit exactly on the surface lines; dragging an edge handle extends the plane while keeping its perspective. Grid Size only changes how dense the guide grid looks.
- Clone in perspective. Choose the Stamp Tool (S), Alt-click a clean spot inside the plane (or click Set Source), and paint over the object. Copied texture shrinks and skews as it travels toward the vanishing point. Diameter, Hardness and Opacity work as on the normal Clone Stamp.
- Or move a whole patch. The Marquee Tool (M) draws a selection that follows the grid; Alt-drag it, or click Duplicate, to slide a copy of clean tiles over the object. The Transform Tool (T) then moves or scales the copy, and Enter places it. Pasting an image you copied earlier drops it onto the plane the same way, handy for a poster on a wall.
- Click OK. Every edit is replayed at full resolution and added to History as one step. Cancel leaves the layer untouched.
The window works with one plane at a time: drawing a new plane replaces the old one, though edits already made on it stay. Run the filter on a duplicate layer like any other repair.
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.
- Perspective. The fill carries a single straight edge across the hole well, but tiled floors, window grids and buildings shrink toward the horizon, and a grid of converging lines usually bends or breaks even with Scale turned on. Rebuild them with Vanishing Point or 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 and settings give the same result every time. Change the selection, or one setting in the Content-Aware Fill window, instead.
- Tracing only the outline with the Remove tool. Only the pixels you paint are replaced, so an outline leaves the middle of the object behind. Paint over all of it in one stroke.
Try it in Photoyam
The Remove tool, Content-Aware Fill, the healing tools and Clone Stamp in a free editor that runs in your browser.
FAQ
Content-Aware Fill is grayed out or does nothing. Why?
Edit > Content-Aware Fill… stays grayed out until there is an active selection, so draw one around the object first, or paint over it with the Remove tool, which needs none. If a message says it works on pixel layers, the active layer is a smart object (including images added with File > Place), text or a shape. Rasterize it with Layer > Rasterize > Layer (or Smart Object, Type or Shape), 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, selection and settings always produce the same result. Change something instead: switch Sampling Area Options to Rectangular, raise Color Adaptation or allow Rotation Adaptation or Scale in the Content-Aware Fill window, expand or reshape the selection, or fill a smaller part at a time.
What is the difference between the Remove tool and Content-Aware Fill?
They share one fill engine. The Remove tool needs no selection: you paint over the object and it is filled the moment you let go, always with the default settings. Content-Aware Fill works on a selection and opens a window with a live preview, where you can change the sampling area, color adaptation, rotation, scale and mirroring before clicking OK.
Is my photo uploaded to remove objects?
No. The Remove tool, 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.