Skip to content

Commit

Permalink
optimize image constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
Neutree committed Apr 12, 2024
1 parent 9bfa0c3 commit 9a12337
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/maix/include/convert_image.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ namespace maix::image
}
else
{
img = new image::Image(mat.cols, mat.rows, fmt, mat.data);
img = new image::Image(mat.cols, mat.rows, fmt, mat.data, -1, false);
}
return img;
}
Expand Down
9 changes: 9 additions & 0 deletions docs/doc/zh/vision/display.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,15 @@ while not app.need_exit():

> 这里用了一个`while not app.need_exit():` 是方便程序在其它地方调用`app.set_exit_flag()`方法后退出循环。
## 调整背光亮度

在系统的`设置`应用中可以手动调整背光亮度,如果你想在程序中调整背光亮度,可以使用`set_backlight`方法,参数就是亮度百分比,取值范围是 0-100:
```python
disp.set_backlight(50)
```

注意,程序退出回到应用选择界面后会自动恢复到系统设置的背光亮度。


## 显示到 MaixVision

Expand Down
2 changes: 1 addition & 1 deletion examples/communication/serial/comm_uart.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from maix import app, uart
import sys

ports = uart.list_ports()
ports = uart.list_devices()

if len(ports) == 0:
print("no port found")
Expand Down

0 comments on commit 9a12337

Please sign in to comment.