GithubHelp home page GithubHelp logo

b03901165shih / osmosis_filtering_using_adi_and_os Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 4.53 MB

A Matlab implementation of the osmosis filtering for shadow removal and seamless cloning

License: BSD 3-Clause "New" or "Revised" License

MATLAB 100.00%
alternating-direction-method osmosis osmosis-filtering seamless-cloning shadow-removal matlab operator-splitting

osmosis_filtering_using_adi_and_os's Introduction

Osmosis_Filtering_using_ADI_and_OS

This repository contains a Matlab implementation of the osmosis filtering for shadow removal and seamless cloning

Introduction

The anisotropic osmosis filtering is a drift-diffusion partial differential equation written as:

where d is the vector drift field. For isotropic diffusion, W is set to an identity matrix. A detailed explanation of the model can be found in [1] to [4].

In this project, we implemented a solver for the osmosis model based on the Alternating Direction Implicit (ADI) method and the Operator Splitting (OS) method. The applications include shadow removal and seamless cloning.

Seamless Cloning

solve_imageFusion.m

Set local to true to apply Dirichlet boundary condition outside the ROI; otherwise, the osmosis will be solved globally.

The local and global osmosis filtering models are described in [5].

Results

Input | Result (local) | Result (global):

Shadow Removal

solve_shadowRemoval.m

Set local to true to apply Dirichlet boundary condition outside the ROI; otherwise, the osmosis will be solved globally.

Set anisotrpic_diffusion to true to apply anisotropic diffusion on shadow boundary, which can preserve details inside the boundary.

For anisotropic diffusion, the Peachman-Rachford ADI scheme is not applicable since the problem contains mixed derivative term.

Results

Input:

Result (isotropic+local) | Result (anisotropic+local):

Result (isotropic+global) | Result (anisotropic+global):

References

[1] Weickert, Joachim, et al. "Linear osmosis models for visual computing." International Workshop on Energy Minimization Methods in Computer Vision and Pattern Recognition. Springer, Berlin, Heidelberg, 2013.

[2] Vogel, Oliver, et al. "A fully discrete theory for linear osmosis filtering." International Conference on Scale Space and Variational Methods in Computer Vision. Springer, Berlin, Heidelberg, 2013.

[3] Calatroni, Luca, et al. "Alternating direction implicit (ADI) schemes for a PDE-based image osmosis model." Journal of Physics: Conference Series. Vol. 904. No. 1. 2017.

[4] Parisotto, Simone, et al. "Anisotropic osmosis filtering for shadow removal in images." Inverse Problems 35.5 (2019): 054001.

[5] d'Autume, Marie, Jean-Michel Morel, and Enric Meinhardt-Llopis. "A flexible solution to the osmosis equation for seamless cloning and shadow removal." 2018 25th IEEE International Conference on Image Processing (ICIP). IEEE, 2018.

osmosis_filtering_using_adi_and_os's People

Contributors

b03901165shih avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.