diff --git a/docs/doc/en/vision/display.md b/docs/doc/en/vision/display.md index 828c973b..9025d893 100644 --- a/docs/doc/en/vision/display.md +++ b/docs/doc/en/vision/display.md @@ -84,13 +84,17 @@ When running code in MaixVision, images can be displayed on MaixVision for easie When calling the `show` method, the image will be automatically compressed and sent to MaixVision for display. -Of course, if you don't have a screen, or to save memory by not initializing the screen, you can also directly call the `send_to_maixvision` method of the `image.Image` object to send the image to MaixVision for display. +Of course, if you don't have a screen, or to save memory by not initializing the screen, you can also directly call the `send_to_maixvision` method of the `maix.display` object to send the image to MaixVision for display. ```python -from maix import image +from maix import image,display + +from maix import image,display img = image.Image(320, 240) +disp = display.Display() + img.draw_rect(0, 0, img.width(), img.height(), color=image.Color.from_rgb(255, 0, 0), thickness=-1) img.draw_rect(10, 10, 100, 100, color=image.Color.from_rgb(255, 0, 0)) img.draw_string(10, 10, "Hello MaixPy!", color=image.Color.from_rgb(255, 255, 255)) -img.send_to_maixvision() +display.send_to_maixvision(img) ``` diff --git a/docs/doc/zh/vision/display.md b/docs/doc/zh/vision/display.md index dc3d56a1..846f91bf 100644 --- a/docs/doc/zh/vision/display.md +++ b/docs/doc/zh/vision/display.md @@ -88,14 +88,16 @@ disp.set_backlight(50) 在调用`show`方法时,会自动压缩图像并发送到 MaixVision 显示。 -当然,如果你没有屏幕,或者为了节省内存不想初始化屏幕,也可以直接调用`image.Image`对象的`send_to_maixvision`方法发送图像到 MaixVision 显示。 +当然,如果你没有屏幕,或者为了节省内存不想初始化屏幕,也可以直接调用`maix.dispaly`对象的`send_to_maixvision`方法发送图像到 MaixVision 显示。 ```python -from maix import image +from maix import image,display img = image.Image(320, 240) +disp = display.Display() + img.draw_rect(0, 0, img.width(), img.height(), color=image.Color.from_rgb(255, 0, 0), thickness=-1) img.draw_rect(10, 10, 100, 100, color=image.Color.from_rgb(255, 0, 0)) img.draw_string(10, 10, "Hello MaixPy!", color=image.Color.from_rgb(255, 255, 255)) -img.send_to_maixvision() +display.send_to_maixvision(img) ```