Skip to content

Commit 270f56d

Browse files
committed
* update camera doc
1 parent e668ae3 commit 270f56d

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

docs/doc/en/vision/camera.md

+13
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,19 @@ cam.constrast(50) # set contrast, range [0, 100]
167167
cam.saturation(50) # Set the saturation, range [0, 100].
168168
```
169169

170+
### Reading Raw Images
171+
172+
Note that the output `raw` image is the original `Bayer` image, and the format of the `Bayer` image may vary depending on the camera module.
173+
174+
```python
175+
cam = camera.Camera(raw=true)
176+
raw_img = cam.read_raw()
177+
print(raw_img)
178+
```
179+
180+
If you need to open the `raw` image in third-party software, additional conversion on the PC side is required. You can refer to the example code in [bayer_to_tiff](https://github.com/sipeed/MaixPy/blob/dev/examples/tools/bayer_to_tiff.py).
181+
182+
170183

171184
## Using a USB Camera
172185

docs/doc/zh/vision/camera.md

+11
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,17 @@ cam = camera.Camera()
193193
cam.set_resolution(width=640, height=480)
194194
```
195195

196+
### 读取原始raw图
197+
198+
注意输出的`raw`图是原始的`bayer`图,并且不同摄像头模组输出的`bayer`图格式可能不一样。
199+
200+
```python
201+
cam = camera.Camera(raw=true)
202+
raw_img = cam.read_raw()
203+
print(raw_img)
204+
```
205+
206+
如果需要在第三方软件打开`raw`图,需要额外在PC端进行转换,可以参考[bayer_to_tiff](https://github.com/sipeed/MaixPy/blob/dev/examples/tools/bayer_to_tiff.py)的示例代码
196207

197208
## 使用 USB 摄像头
198209

0 commit comments

Comments
 (0)