Skip to content

Commit b25d31b

Browse files
committed
* update config manual white balance doc
1 parent 3435873 commit b25d31b

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

docs/doc/en/vision/camera.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,18 @@ cam.gain(100)
157157
```
158158

159159
### Setting the white balance
160+
Currently, only manual white balance via gain adjustment is supported. Use set_wb_gain() to pass in an array of four values corresponding to the gain for `R`, `Gr`, `Gb`, and `B` channels, with each value ranging from [0.0, 1.0].
161+
162+
The recommended default manual white balance gains are:
163+
For MaixCam: [0.134, 0.0625, 0.0625, 0.1239]
164+
For MaixCam2: [0.0682, 0, 0, 0.04897]
165+
To fine-tune image appearance, it is usually sufficient to adjust only the `R` and `B` channels, while keeping `Gr` and `Gb` unchanged.
160166

161167
```python
162168
cam = camera.Camera()
163-
cam.awb_mode(1) # 0,turn on white balance;1,turn off white balance
169+
cam.awb_mode(1) # 0 to enable auto white balance, 1 to enable manual white balance
170+
cam.set_wb_gain([0.134, 0.0625, 0.0625, 0.1239]) # Set gains for R, Gr, Gb, B channels
171+
164172
```
165173

166174
### Setting brightness, contrast and saturation

docs/doc/zh/vision/camera.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,14 @@ cam.gain(100)
171171
```
172172

173173
### 设置白平衡
174+
目前只支持通过设置增益来手动设置白平衡, 通过set_wb_gain()传入一个长度为4的数组,分别对应`R`,`Gr`,`Gb`,`B`的增益值, 范围为[0.0, 1.0]
175+
建议maixcam默认手动白平衡增益为`[0.134, 0.0625, 0.0625, 0.1239]`, maixcam2默认手动白平衡增益为`[0.0682, 0, 0, 0.04897]`
176+
如果需要调整画面效果, 通常只需要调整`R`通道和`B`通道, `Gr``Gb`通道可以保持不变
174177

175178
```python
176179
cam = camera.Camera()
177-
cam.awb_mode(1) # 0,开启白平衡;1,关闭白平衡
180+
cam.awb_mode(1) # 0,开启自动白平衡, 1,开启手动白平衡;
181+
cam.set_wb_gain([0.134, 0.0625, 0.0625, 0.1239]) # 设置r, gr, gb, b四个通道的增益
178182
```
179183

180184
### 设置亮度、对比度和饱和度

0 commit comments

Comments
 (0)