Skip to content

Content-aware Fill

Back to MIB | User interface | Menu | Image


Description

inpaintCoherent example

Reconstruct selected areas of the dataset using information from neighboring regions, modifying the image and corresponding Selection, Mask, and Model layers.

Demonstration

inpaintCoherent

inpaintCoherent example

Restores specific regions of the dataset using coherence transport-based inpainting, leveraging patterns from surrounding areas to fill gaps seamlessly. This method is available for MATLAB R2019a and newer.

Select regions to inpaint using the Mask or Selection layers in the Segmentation panel.

Configure the following parameters:

  • Method use the dropdown to select inpaintCoherent
  • Mask select the layer that has marked areas that should be content aware filled
  • Mode specify whether the content aware fill should be applied for the current slice or the whole dataset
  • Radius set the radius of the circular neighborhood (in pixels) centered on each pixel to be inpainted, controlling the scope of surrounding data used.
  • Smoothing Factor define the Gaussian filter scale for estimating coherence direction, adjusting the smoothness of the inpainting result.

Click the Apply button to reconstruct the selected areas across the dataset or specific slices, preserving continuity with neighboring regions.

Reference

inpaintExemplar

inpaintExemplar example

Fills regions in the dataset using exemplar-based inpainting, copying patches from nearby areas to reconstruct missing or selected parts. This method is available for MATLAB R2019b and newer.

Specify regions to inpaint using the Mask or Selection layers in the Segmentation panel.

Configure the following parameters:

  • Method use the dropdown to select inpaintCoherent
  • Mask select the layer that has marked areas that should be content aware filled
  • Mode specify whether the content aware fill should be applied for the current slice or the whole dataset
  • PatchSize enter the size of image patches (e.g., 9 for a 9x9 patch or 9,9 for custom dimensions) used for matching and filling.
  • FillOrder select the priority function for the order in which patches are filled, such as structure-driven or edge-first approaches.

Click the Apply button to fill the selected areas, blending patches to maintain visual consistency across the dataset.

Reference


Back to MIB | User interface | Menu | Image