Inpaint image by mask filter |

Inpaint image by mask filter

Introduction

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 StartProgramsAltami LtdAltami 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 FileOpen 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:
 
Opened document in Altami Studio application

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.
 
Opening the Filters panel

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.
 
Creating the Interval figure

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.
 
Transformation of the Interval figure into Delimiter
Picture 4. Transformation of the Interval figure into Delimiter

 
Then add to the document filter Draw delimiter measurements, using the menu FiltersWork with measurementsDraw delimiter measurements.
 
Adding the filter 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).
 
Adjustment of the filter Draw delimiter measurements
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).
 
Turning off the Show measurements
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 FiltersGray transformationsThreshold.
 
Adding the Threshold filter

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.
 
Setting of the Threshold filter
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 FiltersWork with the backgroundInpaint image by mask.
 
Adding the filter 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.
 
Filter Inpaint Image by mask: saveImage
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).
 
Inpaint image by mask filter: showImage

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.
 
Turning off the Threshold filter
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.
 
The action of Inpaint image by mask filter
Picture 14. The action of Inpaint image by mask filter