Altami Software - software for image analysis
Altami Software
Software for image analysis

Inpaint image by mask filter


Used instruments: the Interval figure, the Draw delimiter measurements filter, Threshold filter, Inpaint image by mask filter.

Objects of research: photo with the volvox filter by 4 times increasing (Volvox.jpg).

Task: to draw the image in the noise areas, restoring them according to surrounding image.

NOTE. Tutorial does not contain the information on all the possibilities of the application. Here the optimal way of solving the task set is offered.

Step 1. Launch of the application

Launch the Altami Studio application. For launching the application use the Altami Studio shortcut at the workbench or the menu item Start→Programs→Altami Ltd→Altami Studio 3.0. Besides, the application can be launched from a folder into which it was installed (usually it is C:\Program Files\Altami Ltd\Altami Studio 3.0\).

Step 2. Opening files

In Altami Studio application open the file with the image, in order to do that use the menu item File→Open and mark the file Volvox.jpg. It is in Tutorials\Pictures folder which is in the main folder of the application. Click the Open button.

The following image shall appear in the application window:

Picture 1. Opened document in Altami Studio application

Step 3. Opening the Filters panel

Call the Filters panel with the help of the Filters→Filters menu.

Picture 2. Opening the Filters panel

Step 4. Creating noise at the image

In order to show noise at the image, use the Interval instrument. In order to place the interval, click the pictogram Add interval to the active document, and indicate by clicking with the left button of the mouse the beginning and end of the interval.

Picture 3. Creating the Interval figure

After the interval is created, mark it and click the right button of the mouse. The context menu shall appear. Select the Delimiter point.

Picture 4. Transformation of the Interval figure into Delimiter

Then add to the document filter Draw delimiter measurements, using the menu Filters→Work with measurements→Draw delimiter measurements.

Picture 5. Adding the filter Draw delimiter measurements

Select the filter Draw delimiter measurements at the Filters panel and indicate in the filter parameters the value of the penWidth parameter as 25 (picture 6).

Picture 6. Adjustment of the filter Draw delimiter measurements

Click with the right button of the mouse at the image and at the appeared context menu select the point Show measurements (picture 7).

Picture 7. Turning off the Show measurements

The showed Delimiter figure will be the noise at the image for us.

Step 5. Building the noise map

Now with the Threshold transformation it is necessary to find this noise at the image. Add to the document Threshold filter, having used the menu Filters→Gray transformations→Threshold.

Picture 8. Adding the Threshold filter

Select in the Filters panel Threshold filter and indicate in the filter parameters the value of the threshValue parameter as 0.00. Also select threshBinaryInv.

Picture 9. Setting of the Threshold filter

Thus, the noise map is found and formed.

Step 6. Adding the filter Inpaint image by mask to the document

With the help of the menu select Filters→Work with the background→Inpaint image by mask.

Picture 10. Adding the filter Inpaint image by mask

By selecting the filter Inpaint image by mask in the Filters panel in its lower part there appears a window with the settings of this filter.

Picture 11. Filter Inpaint Image by mask: saveImage

Here you can switch on and switch off the filter, having put and having deleted respectively a tick in a check box near the enabled parameter.

Leave the value of the inpaintRadius parameter as 3 by default.

Step 7. Work with Inpaint image by mask filter

Select at the Filters panel the Inpaint image by mask filter. By default in filter parameters there are ticks near enabled and saveImage parameters . That means, that in this case the filter is switched on and reminds the supplied at the input noise map (picture 11).

Switch off the image saving by having put away the tick from the saveImage parameter and switch on the showImage parameter (picture 12).

Picture 12. Inpaint image by mask filter: showImage

By this action we have checked that the noise map is really remembered.

At the Filters panel select the filter Threshold. Turn it off having put away the tick near the enabled parameter.

Picture 13. Turning off the Threshold filter

In the Filters panel select the Inpaint image by mask filter. Turn off showing of the noise map kept in the image filter, having put away the tick near the showImage.

Picture 14. The action of Inpaint image by mask filter

Read more on the subject:

Laplace filter
Threshold filter
Threshold of color image filter
Adjust histogram
Configured find contours
Inpaint black pixels in image filter
Adaptive threshold filter
Setting the white balance in Altami Studio and Altami VideoKit


Altami software products work under the most popular modern operating system such as Windows, Linux и Macintosh.

Need to develop?

If our products do not solve your problems, we are ready to develop "from scratch" or modify existing applications.

USB 3.0

Tired of the slow camera work? Keep up with progress! The camera on USB 3.0! operates at a speed of up to 180 fps.