Skip to content

Commit

Permalink
[Docs] Translate visualization documentation (#1350)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouzaida authored Sep 21, 2021
1 parent fb02e81 commit 4bab292
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion docs_zh_CN/understand_mmcv/visualization.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
## 可视化

欢迎有兴趣的朋友一起翻译 MMCV 文档。如有兴趣,请在 [MMCV issue](https://github.com/open-mmlab/mmcv/issues) 提 issue 确定翻译的文档。
`mmcv` 可以展示图像以及标注(目前只支持标注框)

```python
# 展示图像文件
mmcv.imshow('a.jpg')

# 展示已加载的图像
img = np.random.rand(100, 100, 3)
mmcv.imshow(img)

# 展示带有标注框的图像
img = np.random.rand(100, 100, 3)
bboxes = np.array([[0, 0, 50, 50], [20, 20, 60, 60]])
mmcv.imshow_bboxes(img, bboxes)
```

`mmcv` 也可以展示特殊的图像,例如光流

```python
flow = mmcv.flowread('test.flo')
mmcv.flowshow(flow)
```

0 comments on commit 4bab292

Please sign in to comment.