Unverified Commit 4bab2924 authored by Zaida Zhou's avatar Zaida Zhou Committed by GitHub
Browse files

[Docs] Translate visualization documentation (#1350)

parent fb02e81a
## 可视化 ## 可视化
欢迎有兴趣的朋友一起翻译 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)
```
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment