Criminisi's Image Inpainting Algorithm (Don't use this)
C++ Python
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

mahv (محو)

Criminisi's Image Inpainting Algorithm


  • c++
  • opencv 2.4.9
  • cmake >= 2.8

Running the code

cd build
cmake ..

The GUI for selecting target region

What is the target region?

Target region is the part of the image that one needs to remove. The target region will get filled such that the human eye will not notice the removal.


The user must be able to select any region of the image with clicks of mouse. The region that the user selects will be a polygon resulted from clicks of the mouse.

At first the user is in no_selection mode.

The user starts with a click. When the first click is done, the user is in selection mode. In this mode more and more points are added to the set of points that make the polygon, or by using u keystroke (as undo) the last point gets removed from the polygon. Pressing u can result in going back to no_selection mode if the set of points gets empty.

Exiting the selection mode can happen in two ways: 1. When the user uses right click, which results in finishing the polygon and going to done mode. Or When the user clicks esc keystroke (as cancel) that results to going back to no_selection mode.

GUI Flowchart