openmv中的sensor.set_contrast函数
时间: 2024-03-07 22:54:15 浏览: 21
sensor.set_contrast()函数是OpenMV中用于设置图像对比度的函数。它接受一个整数参数,表示对比度的值,范围从-3到3,默认值为0。当对比度值为正数时,图像中的亮部和暗部之间的差异增加,图像变得更加鲜明。当对比度值为负数时,图像中的亮部和暗部之间的差异减小,图像变得更加柔和。使用该函数可以调整图像的对比度,从而更好地适应不同的应用场景。
相关问题
openmv中的sensor.set_contrast
`sensor.set_contrast()` 是 OpenMV 相机中的函数,用于设置摄像头的对比度参数。它的使用方式如下:
```python
sensor.set_contrast(value)
```
其中,`value` 是一个整数,表示对比度的值。常用范围是 0~3,0 表示最低对比度,3 表示最高对比度。默认值为 0。
例如,你可以使用以下代码将对比度设置为最高:
```python
import sensor
sensor.set_contrast(3)
```
需要注意的是,`sensor.set_contrast()` 函数必须在 `sensor.reset()` 函数之后调用。
openmv中国sensor.set_contrast
`sensor.set_contrast()` 是 OpenMV 相机中的函数,用于设置摄像头的对比度参数。它的使用方式如下:
```python
sensor.set_contrast(value)
```
其中,`value` 是一个整数,表示对比度的值。常用范围是 0~3,0 表示最低对比度,3 表示最高对比度。默认值为 0。
例如,你可以使用以下代码将对比度设置为最高:
```python
import sensor
sensor.set_contrast(3)
```
需要注意的是,`sensor.set_contrast()` 函数必须在 `sensor.reset()` 函数之后调用。
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)