{"course":{"slug":"ai-images","title":"Image Generation, in Practice","url":"https://addaly.com/learn/ai-images","level":"beginner","track":"create"},"lesson":{"slug":"removing-a-thing-properly","title":"Four ways to remove an object, and when each is right","url":"https://addaly.com/learn/ai-images/removing-a-thing-properly","position":47,"of":69,"minutes":8,"answer":"Clone, heal, content-aware fill and inpainting fail in different ways, so the choice depends on whether the area behind the object is a texture, a structure or a scene that has to be invented.","keyIdea":"Clone, heal, content-aware fill and inpainting fail in different ways, so the choice depends on whether the area behind the object is a texture, a structure or a scene that has to be invented."},"body":{"format":"markdown","text":"## The tools, and what each actually does\n\n**Clone stamp** copies pixels from one place to another exactly. You choose the source. Total control, no invention, and it repeats visibly if you are careless. Available in GIMP, Krita and Photopea.\n\n**Healing brush** copies texture from a source but blends the *colour and luminance* of the destination. This is why it works where clone fails: a spot on a gradient healed from a flat area takes the texture of the source and the tone of the target, so it disappears. It fails when you cross a boundary, smearing two regions together, which is why healing near an edge produces the characteristic muddy blur.\n\n**Content-aware fill** (GIMP's Resynthesizer, Photopea's equivalent) analyses the surrounding area and synthesises a patch from it algorithmically. Good at texture: grass, gravel, sky, fabric. Poor at structure, because it has no concept of a straight line and will happily curve a window frame.\n\n**Inpainting** with a diffusion model regenerates the region from the prompt and the context. It is the only one of the four that can *invent* something that was never in the image: a continuation of a wall that is entirely hidden, a piece of floor with a pattern that has to be plausible rather than copied.\n\n## The decision\n\nLook at what is behind the thing you are removing.\n\n- **Uniform texture**: sky, wall, grass, water. Content-aware fill. Two seconds and it is done.\n- **A gradient with no structure**: a studio backdrop, a soft sky. Healing brush, or clone with a soft edge.\n- **Regular structure**: tiles, brickwork, panelling, a railing. Clone stamp, sampling from a matching part of the same structure. This is where the algorithms fail and patience wins.\n- **Complex scene content**: the object was in front of a shelf of things, a crowd, a detailed background. Inpainting.\n- **A large object occupying a third of the frame**: inpainting with a generous mask, then a repair pass on the joint.\n\nMost real removals use two: inpaint the bulk, then clone-stamp the structural edge the model got wrong.\n\n## Inpainting a removal properly\n\nThe instinct is to mask the object tightly and prompt for what should be there. Two adjustments make it work far better.\n\n**Mask beyond the object.** Include its shadow, its reflection, and 20 to 30 pixels of surroundings. An object's shadow is the thing people forget, and a removed object leaving its shadow is the most conspicuous possible failure.\n\n**Prompt for the background alone**, not for absence. `empty wooden table, soft shadow` works. `no cup` does not: negation is unreliable, and naming the cup in any form raises the chance of getting one.\n\nDenoise should be high, 0.8 to 1.0, because you want new content rather than a modification of what is there.\n\n## The ghost\n\nThe characteristic failure of any removal is a ghost: a faint outline, a slight difference in tone, a shape you can see when you look for it. Three causes, three fixes.\n\n**Tonal mismatch**: the patch is slightly lighter or darker. Correct with a curves adjustment confined to the patch, not to the whole image.\n\n**Texture mismatch**: the patch is smoother than its surroundings because grain was lost in regeneration. Add matching noise, or run a low-denoise pass at 0.2 over the area.\n\n**Edge residue**: a rim of the original object's colour survives at the mask boundary. This is the mask being too tight. Mask wider and redo it; feathering alone will not clear a contaminated edge.\n\nCheck by exaggerating: duplicate the layer, apply a strong Curves contrast, and look. Ghosts that are invisible normally are obvious under high contrast, and this thirty-second test catches almost all of them before a client does.\n\n## What removal costs you\n\nAn honest limitation. Removing an object means the information behind it does not exist, and everything you put there is fabricated. On an artistic image that is fine. On an image that documents something real, it is an alteration of a record, and the difference is not technical.\n\nThere is a second, subtler cost. A scene with an object removed often composes worse than it did, because the object was doing something: balancing the frame, filling a corner, giving the eye somewhere to rest. People remove a distraction and find the picture has gone slack.\n\nSo look at the result as a composition, not just as a successful removal. Occasionally the right answer is to replace the object with something else rather than leaving a gap, and occasionally it is to leave it alone."},"check":{"question":"An object is removed from a gravel path but leaves a faint smooth patch visible when the image is examined. What is the cause and remedy?","options":[{"text":"The mask was feathered too heavily, blending the original object's tone into the surrounding gravel across a wide transition band.","correct":false,"tempting":"Heavy feathering produces a soft halo rather than a smooth interior, and the fault described is in the middle of the patch rather than at its edge."},{"text":"The removal was performed with content-aware fill, which cannot synthesise irregular natural texture and should have been an inpainting pass.","correct":false,"tempting":"Content-aware fill is at its best on gravel; irregular natural texture is precisely the case it handles well."},{"text":"Texture was lost in regeneration, so the patch lacks the grain of its surroundings; add matching noise or run a low-denoise pass over it.","correct":true},{"text":"The denoise value was set too high, which regenerated the region without reference to the surrounding texture and produced an unrelated smooth surface.","correct":false,"tempting":"High denoise is correct for a removal and still matches surrounding texture through context; the smoothness comes from the regeneration, not from the value being wrong."}]},"prev":{"slug":"outpainting-the-crop","title":"Extending a frame when the crop changes","url":"https://addaly.com/learn/ai-images/outpainting-the-crop"},"next":{"slug":"real-product-generated-scene","title":"The real product in a generated world","url":"https://addaly.com/learn/ai-images/real-product-generated-scene"},"authorship":"Founder and series editor: Dr Mustafa Mun. Written by AI models to a written standard. Exam keys checked blind by a second model: 3,665 of 3,666 agreed. Academic review invited.","review":{"status":"Draft, open for academic review"},"cite":"Addaly (2026) 'Four ways to remove an object, and when each is right', in Image Generation, in Practice. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/ai-images/removing-a-thing-properly (Accessed: 13 October 2026).","licence":{"name":"CC BY-NC-SA 4.0","url":"https://creativecommons.org/licenses/by-nc-sa/4.0/"},"reader":{"schema":1,"title":"Four ways to remove an object, and when each is right","courseTitle":"Image Generation, in Practice","module":{"index":5,"slug":"repair-and-extend","title":"Repair, extend, assemble"},"answer":null,"keyIdea":"Clone, heal, content-aware fill and inpainting fail in different ways, so the choice depends on whether the area behind the object is a texture, a structure or a scene that has to be invented.","hero":{"kind":"plate","image":null,"alt":null,"caption":null},"blocks":[{"t":"h2","id":"the-tools-and-what-each-actually-does","runs":[{"text":"The tools, and what each actually does"}]},{"t":"p","runs":[{"text":"Clone stamp","b":true},{"text":" copies pixels from one place to another exactly. You choose the source. Total control, no invention, and it repeats visibly if you are careless. Available in GIMP, Krita and Photopea."}]},{"t":"p","runs":[{"text":"Healing brush","b":true},{"text":" copies texture from a source but blends the "},{"text":"colour and luminance","i":true},{"text":" of the destination. This is why it works where clone fails: a spot on a gradient healed from a flat area takes the texture of the source and the tone of the target, so it disappears. It fails when you cross a boundary, smearing two regions together, which is why healing near an edge produces the characteristic muddy blur."}]},{"t":"p","runs":[{"text":"Content-aware fill","b":true},{"text":" (GIMP’s Resynthesizer, Photopea’s equivalent) analyses the surrounding area and synthesises a patch from it algorithmically. Good at texture: grass, gravel, sky, fabric. Poor at structure, because it has no concept of a straight line and will happily curve a window frame."}]},{"t":"p","runs":[{"text":"Inpainting","b":true},{"text":" with a diffusion model regenerates the region from the prompt and the context. It is the only one of the four that can "},{"text":"invent","i":true},{"text":" something that was never in the image: a continuation of a wall that is entirely hidden, a piece of floor with a pattern that has to be plausible rather than copied."}]},{"t":"h2","id":"the-decision","runs":[{"text":"The decision"}]},{"t":"p","runs":[{"text":"Look at what is behind the thing you are removing."}]},{"t":"ul","items":[[{"text":"Uniform texture","b":true},{"text":": sky, wall, grass, water. Content-aware fill. Two seconds and it is done."}],[{"text":"A gradient with no structure","b":true},{"text":": a studio backdrop, a soft sky. Healing brush, or clone with a soft edge."}],[{"text":"Regular structure","b":true},{"text":": tiles, brickwork, panelling, a railing. Clone stamp, sampling from a matching part of the same structure. This is where the algorithms fail and patience wins."}],[{"text":"Complex scene content","b":true},{"text":": the object was in front of a shelf of things, a crowd, a detailed background. Inpainting."}],[{"text":"A large object occupying a third of the frame","b":true},{"text":": inpainting with a generous mask, then a repair pass on the joint."}]]},{"t":"p","runs":[{"text":"Most real removals use two: inpaint the bulk, then clone-stamp the structural edge the model got wrong."}]},{"t":"h2","id":"inpainting-a-removal-properly","runs":[{"text":"Inpainting a removal properly"}]},{"t":"p","runs":[{"text":"The instinct is to mask the object tightly and prompt for what should be there. Two adjustments make it work far better."}]},{"t":"p","runs":[{"text":"Mask beyond the object.","b":true},{"text":" Include its shadow, its reflection, and 20 to 30 pixels of surroundings. An object’s shadow is the thing people forget, and a removed object leaving its shadow is the most conspicuous possible failure."}]},{"t":"p","runs":[{"text":"Prompt for the background alone","b":true},{"text":", not for absence. "},{"text":"empty wooden table, soft shadow","code":true},{"text":" works. "},{"text":"no cup","code":true},{"text":" does not: negation is unreliable, and naming the cup in any form raises the chance of getting one."}]},{"t":"p","runs":[{"text":"Denoise should be high, 0.8 to 1.0, because you want new content rather than a modification of what is there."}]},{"t":"h2","id":"the-ghost","runs":[{"text":"The ghost"}]},{"t":"p","runs":[{"text":"The characteristic failure of any removal is a ghost: a faint outline, a slight difference in tone, a shape you can see when you look for it. Three causes, three fixes."}]},{"t":"p","runs":[{"text":"Tonal mismatch","b":true},{"text":": the patch is slightly lighter or darker. Correct with a curves adjustment confined to the patch, not to the whole image."}]},{"t":"p","runs":[{"text":"Texture mismatch","b":true},{"text":": the patch is smoother than its surroundings because grain was lost in regeneration. Add matching noise, or run a low-denoise pass at 0.2 over the area."}]},{"t":"p","runs":[{"text":"Edge residue","b":true},{"text":": a rim of the original object’s colour survives at the mask boundary. This is the mask being too tight. Mask wider and redo it; feathering alone will not clear a contaminated edge."}]},{"t":"p","runs":[{"text":"Check by exaggerating: duplicate the layer, apply a strong Curves contrast, and look. Ghosts that are invisible normally are obvious under high contrast, and this thirty-second test catches almost all of them before a client does."}]},{"t":"h2","id":"what-removal-costs-you","runs":[{"text":"What removal costs you"}]},{"t":"p","runs":[{"text":"An honest limitation. Removing an object means the information behind it does not exist, and everything you put there is fabricated. On an artistic image that is fine. On an image that documents something real, it is an alteration of a record, and the difference is not technical."}]},{"t":"p","runs":[{"text":"There is a second, subtler cost. A scene with an object removed often composes worse than it did, because the object was doing something: balancing the frame, filling a corner, giving the eye somewhere to rest. People remove a distraction and find the picture has gone slack."}]},{"t":"p","runs":[{"text":"So look at the result as a composition, not just as a successful removal. Occasionally the right answer is to replace the object with something else rather than leaving a gap, and occasionally it is to leave it alone."}]}],"check":{"question":[{"text":"An object is removed from a gravel path but leaves a faint smooth patch visible when the image is examined. What is the cause and remedy?"}],"options":[{"text":[{"text":"The mask was feathered too heavily, blending the original object’s tone into the surrounding gravel across a wide transition band."}],"correct":false,"tempting":[{"text":"Heavy feathering produces a soft halo rather than a smooth interior, and the fault described is in the middle of the patch rather than at its edge."}]},{"text":[{"text":"The removal was performed with content-aware fill, which cannot synthesise irregular natural texture and should have been an inpainting pass."}],"correct":false,"tempting":[{"text":"Content-aware fill is at its best on gravel; irregular natural texture is precisely the case it handles well."}]},{"text":[{"text":"Texture was lost in regeneration, so the patch lacks the grain of its surroundings; add matching noise or run a low-denoise pass over it."}],"correct":true,"tempting":null},{"text":[{"text":"The denoise value was set too high, which regenerated the region without reference to the surrounding texture and produced an unrelated smooth surface."}],"correct":false,"tempting":[{"text":"High denoise is correct for a removal and still matches surrounding texture through context; the smoothness comes from the regeneration, not from the value being wrong."}]}],"order":[0,1,2,3],"why":null},"prev":{"slug":"outpainting-the-crop","title":"Extending a frame when the crop changes","minutes":8},"next":{"slug":"real-product-generated-scene","title":"The real product in a generated world","minutes":9}}}