SkillAgentSearch skills...

PyPatchMatch

a Cython wrapper of inpainting technique based on PatchMatch

Install / Use

/learn @maktu6/PyPatchMatch
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

PyPatchMatch

PyPatchMatch is a Cython wrapper of inpainting technique based on PatchMatch for restoring the miss area in an image.
The porject mainly based on a C implementation of PatchMatch and a cython wrapper of np.array <-> cv::Mat.

Prerequisites

Build

  • check OpenCV have been built as the tutorial (Note the version should be v2.2.0)
  • check SYS_PREFIX in setup.py is the correct path of OpenCV libraries

To build, run sh build.sh.

Use

PyPatchMatch_inpaint(input, mask, radius)

Args:

  • input: the original RGB image (a HxWx3 numpy.array)
  • mask: the miss mask of image, the value in miss area is 1 (a HxW numpy.array)
  • radius: patch radius

Return:

  • the result RGB image (a HxWx3 numpy.array)

demo.ipynb is an example of inpainting images via PyPatchMatch.

Reference

View on GitHub
GitHub Stars9
CategoryDevelopment
Updated1y ago
Forks3

Languages

Python

Security Score

75/100

Audited on Sep 2, 2024

No findings