https://github.com/linchuming/wordcloudimage
Word Cloud based on image object and Chinese by Python
https://github.com/linchuming/wordcloudimage
Last synced: 2 months ago
JSON representation
Word Cloud based on image object and Chinese by Python
- Host: GitHub
- URL: https://github.com/linchuming/wordcloudimage
- Owner: linchuming
- License: mit
- Created: 2017-01-02T14:59:30.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-05-27T05:56:02.000Z (about 8 years ago)
- Last Synced: 2025-04-02T11:11:16.244Z (2 months ago)
- Language: Python
- Homepage:
- Size: 9.71 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 基于图片物体轮廓的中文词云生成
### 准备
- anaconda2
- cv2 (`conda install -c menpo opencv=2.4.11`)
- wordcloud (`pip install wordcloud`)
- jieba (`pip install jieba`)### 使用例子
- example.py (直接生成)
> 原图 & 结果图 
- example2.py (选定目标位置)
> 过程图 & 结果图 
- example3.py (基于手工标记,左键绿色标记前景,右键红色标记背景)
> 过程图 & 结果图 
### 一些说明
- 主要使用了wordcloud库与jieba库的中文分析,图像轮廓采用了grabCut算法,因此支持不同的方法来分割
- 采用了cv2库做界面交互
- 很惭愧,只做了点微小的工作
