arlosefj / image-matting-opencv-qt

A simple interactive image matting app by opencv and qt. 使用opencv进行交互式抠图。

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

image-matting-opencv-qt V-1.0

使用opencv进行交互式抠图

This is a simple interactive image matting app written by python opencv and pyqt.

This app applys Grabcut algorithm in opencv for matting images. Grabcut is an improved version of Graphcut algorithm. Check these papers(paper1, paper2) for detail information~~

The gui part is mostly from this great work labelImg. It is a very good example for pygt beginner!

Requirement:

  • Ubuntu 16.04
  • python3
  • pyqt5
  • cv2

Usage:

python app.py

Result:

Performence of app

input:

output:

TODO:

  • Auto resize images in mainwindow according to mouse movement
  • Image item switch
  • Rect edit and auto matting
  • Show only one Rect every selection

About

A simple interactive image matting app by opencv and qt. 使用opencv进行交互式抠图。

License:MIT License


Languages

Language:Python 100.0%