Skip to content

Example of using the Boykov-Kolmogorov Max-Flow/Min-Cut algorithm implementation from The Boost Graph Library for image denoising.

License

Notifications You must be signed in to change notification settings

definability/maxflow_image_denoising

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Max-Flow Image Denoising

Example of using the Boykov-Kolmogorov Max-Flow/Min-Cut algorithm implementation from The Boost Graph Library for image denoising.

To dive in the implementation details, check out my Medium post dedicated to this repository.

Dependencies

The project depends on CMake (at least 3.12), OpenCV 4, and The Boost Graph Library (tested with versions 1.82 and 1.74).

If you use apt, which is the default package manager for Ubuntu, Debian, and many others, use

sudo apt update
sudo apt install -y libopencv-dev libboost-graph-dev

Under Windows 11, the code was tested with OpenCV 4.8.0 and Boost Graph 1.82.0 installed via vcpkg.

Build

The project benefits from CMake. With CMake 3.13 or newer, you can easily build the project using

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build

In earlier versions, the -S parameter is not available. So, if you use CMake 3.12, build the project using

mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build

If you use vcpkg, the things are trickier. Read vcpkg in CMake projects for more details or use an IDE that supports vcpkg.

Use

The application accepts three positional command-line arguments:

maxflow_image_denoising <input image> <output image> <discontinuity penalty>

The paths can be relative or absolute. The discontinuity penalty (smoothness term) must be a non-negative integer.

The program contains the input arguments validation.

License

The project uses MIT license, so you can freely use the source code in pet projects, commercial projects, and home assignments. You can also modify it, distribute it, and sell it. Note that the project is provided "as is", so the author is not responsible for your usage of it.

About

Example of using the Boykov-Kolmogorov Max-Flow/Min-Cut algorithm implementation from The Boost Graph Library for image denoising.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published