A Python implementation of Cartoon+Texture decomposition algorithm proposed in [Baudes+11].
- Python > 3.5
- OpenCV
- matplotlib (example)
git clone https://github.com/tochikuji/Cartoon-Texture-Decomposition
cd Cartoon-Texture-Decomposition
pip install .
import cv2
from cartex import CartoonTextureDecomposition
img = cv2.imread("./lenna.png", 0)
decomposer = CartoonTextureDecomposition()
cartoon, texture = decomposer.decompose(img)
Then we get the decomposition result as following (sigma=2):
Apache 2.0
Refer to LICENSE
Aiga SUZUKI [email protected]