From 37275cdd3131ec4071bd4d44538824b42c4a091c Mon Sep 17 00:00:00 2001 From: Neucrack Date: Mon, 29 Apr 2024 15:19:32 +0800 Subject: [PATCH] update en doc --- maixpy/api/api.json | 532 ++++++++++- maixpy/api/index.html | 5 +- maixpy/api/maix/app.html | 5 +- maixpy/api/maix/camera.html | 36 +- maixpy/api/maix/comm.html | 5 +- maixpy/api/maix/display.html | 36 +- maixpy/api/maix/err.html | 5 +- maixpy/api/maix/example.html | 5 +- maixpy/api/maix/fs.html | 5 +- maixpy/api/maix/i18n.html | 5 +- maixpy/api/maix/image.html | 5 +- maixpy/api/maix/network.html | 24 +- maixpy/api/maix/network/wifi.html | 885 ++++++++++++++++++ maixpy/api/maix/nn.html | 13 +- maixpy/api/maix/nn/F.html | 5 +- maixpy/api/maix/peripheral.html | 5 +- maixpy/api/maix/peripheral/adc.html | 5 +- maixpy/api/maix/peripheral/gpio.html | 5 +- maixpy/api/maix/peripheral/i2c.html | 5 +- maixpy/api/maix/peripheral/key.html | 5 +- maixpy/api/maix/peripheral/pwm.html | 5 +- maixpy/api/maix/peripheral/spi.html | 5 +- maixpy/api/maix/peripheral/timer.html | 5 +- maixpy/api/maix/peripheral/uart.html | 5 +- maixpy/api/maix/peripheral/wdt.html | 5 +- maixpy/api/maix/protocol.html | 5 +- maixpy/api/maix/rtsp.html | 183 +++- maixpy/api/maix/sys.html | 5 +- maixpy/api/maix/tensor.html | 5 +- maixpy/api/maix/thread.html | 5 +- maixpy/api/maix/time.html | 5 +- maixpy/api/maix/touchscreen.html | 5 +- maixpy/api/maix/util.html | 5 +- maixpy/api/maix/video.html | 24 +- maixpy/api/sidebar.yaml | 4 + maixpy/doc/en/audio/recognize.html | 316 +++++++ maixpy/doc/en/basic/app.html | 342 +++++++ maixpy/doc/en/basic/app_usage.html | 316 +++++++ maixpy/doc/en/basic/linux_basic.html | 361 +++++++ maixpy/doc/en/basic/maixpy_upgrade.html | 326 +++++++ maixpy/doc/en/basic/maixvision.html | 364 +++++++ maixpy/doc/en/basic/os.html | 333 +++++++ maixpy/doc/en/basic/python.html | 353 +++++++ maixpy/doc/en/basic/python_pkgs.html | 331 +++++++ maixpy/doc/en/faq.html | 351 +++++++ maixpy/doc/en/index.html | 273 +++++- maixpy/doc/en/modules/acc.html | 316 +++++++ maixpy/doc/en/modules/thermal_cam.html | 316 +++++++ maixpy/doc/en/modules/tof.html | 316 +++++++ maixpy/doc/en/no_translate.html | 94 +- maixpy/doc/en/peripheral/gpio.html | 316 +++++++ maixpy/doc/en/peripheral/i2c.html | 316 +++++++ maixpy/doc/en/peripheral/pwm.html | 316 +++++++ maixpy/doc/en/peripheral/spi.html | 316 +++++++ maixpy/doc/en/peripheral/uart.html | 316 +++++++ maixpy/doc/en/peripheral/wdt.html | 316 +++++++ maixpy/doc/en/pro/compile_os.html | 311 ++++++ maixpy/doc/en/sidebar.yaml | 206 ++-- maixpy/doc/en/source_code/add_c_module.html | 321 +++++++ maixpy/doc/en/source_code/build.html | 365 ++++++++ maixpy/doc/en/source_code/contribute.html | 347 +++++++ maixpy/doc/en/source_code/faq.html | 327 +++++++ maixpy/doc/en/source_code/maixcdk.html | 318 +++++++ maixpy/doc/en/video/jpeg_streaming.html | 377 ++++++++ maixpy/doc/en/vision/ai.html | 356 +++++++ maixpy/doc/en/vision/apriltag.html | 470 ++++++++++ .../doc/en/vision/assets/custmize_model1.png | Bin 0 -> 140637 bytes .../doc/en/vision/assets/custmize_model10.png | Bin 0 -> 253080 bytes .../doc/en/vision/assets/custmize_model11.png | Bin 0 -> 115031 bytes .../doc/en/vision/assets/custmize_model2.png | Bin 0 -> 345863 bytes .../doc/en/vision/assets/custmize_model3.png | Bin 0 -> 105265 bytes .../doc/en/vision/assets/custmize_model4.png | Bin 0 -> 255846 bytes .../doc/en/vision/assets/custmize_model5.png | Bin 0 -> 548005 bytes .../doc/en/vision/assets/custmize_model6.png | Bin 0 -> 551397 bytes .../doc/en/vision/assets/custmize_model7.png | Bin 0 -> 321580 bytes .../doc/en/vision/assets/custmize_model8.png | Bin 0 -> 50097 bytes .../doc/en/vision/assets/custmize_model9.png | Bin 0 -> 227521 bytes maixpy/doc/en/vision/body_key_points.html | 330 +++++++ maixpy/doc/en/vision/camera.html | 385 ++++++++ maixpy/doc/en/vision/classify.html | 339 +++++++ maixpy/doc/en/vision/custmize_model.html | 753 +++++++++++++++ maixpy/doc/en/vision/display.html | 424 +++++++++ maixpy/doc/en/vision/face_recognition.html | 354 +++++++ maixpy/doc/en/vision/find_blobs.html | 510 ++++++++++ maixpy/doc/en/vision/image_ops.html | 584 ++++++++++++ maixpy/doc/en/vision/maixhub_train.html | 372 ++++++++ maixpy/doc/en/vision/object_track.html | 316 +++++++ maixpy/doc/en/vision/qrcode.html | 434 +++++++++ .../doc/en/vision/self_learn_classifier.html | 356 +++++++ maixpy/doc/en/vision/self_learn_detector.html | 317 +++++++ maixpy/doc/en/vision/yolov5.html | 340 +++++++ maixpy/doc/zh/audio/recognize.html | 2 +- maixpy/doc/zh/basic/app.html | 2 +- maixpy/doc/zh/basic/app_usage.html | 2 +- maixpy/doc/zh/basic/linux_basic.html | 2 +- maixpy/doc/zh/basic/maixpy_upgrade.html | 2 +- maixpy/doc/zh/basic/maixvision.html | 2 +- maixpy/doc/zh/basic/os.html | 2 +- maixpy/doc/zh/basic/python.html | 2 +- maixpy/doc/zh/basic/python_pkgs.html | 2 +- maixpy/doc/zh/faq.html | 2 +- maixpy/doc/zh/index.html | 9 +- maixpy/doc/zh/modules/acc.html | 2 +- maixpy/doc/zh/modules/thermal_cam.html | 2 +- maixpy/doc/zh/modules/tof.html | 2 +- maixpy/doc/zh/peripheral/gpio.html | 2 +- maixpy/doc/zh/peripheral/i2c.html | 2 +- maixpy/doc/zh/peripheral/pwm.html | 2 +- maixpy/doc/zh/peripheral/spi.html | 2 +- maixpy/doc/zh/peripheral/uart.html | 2 +- maixpy/doc/zh/peripheral/wdt.html | 2 +- maixpy/doc/zh/pro/compile_os.html | 2 +- maixpy/doc/zh/sidebar.yaml | 2 +- maixpy/doc/zh/source_code/add_c_module.html | 2 +- maixpy/doc/zh/source_code/build.html | 46 +- maixpy/doc/zh/source_code/contribute.html | 2 +- maixpy/doc/zh/source_code/faq.html | 20 +- maixpy/doc/zh/source_code/maixcdk.html | 2 +- maixpy/doc/zh/video/jpeg_streaming.html | 2 +- maixpy/doc/zh/vision/ai.html | 2 +- maixpy/doc/zh/vision/apriltag.html | 2 +- maixpy/doc/zh/vision/body_key_points.html | 2 +- maixpy/doc/zh/vision/camera.html | 2 +- maixpy/doc/zh/vision/classify.html | 2 +- maixpy/doc/zh/vision/custmize_model.html | 14 +- maixpy/doc/zh/vision/display.html | 2 +- maixpy/doc/zh/vision/face_recognition.html | 2 +- maixpy/doc/zh/vision/find_blobs.html | 2 +- maixpy/doc/zh/vision/image_ops.html | 2 +- maixpy/doc/zh/vision/maixhub_train.html | 4 +- maixpy/doc/zh/vision/object_track.html | 2 +- maixpy/doc/zh/vision/qrcode.html | 2 +- .../doc/zh/vision/self_learn_classifier.html | 2 +- maixpy/doc/zh/vision/self_learn_detector.html | 2 +- maixpy/doc/zh/vision/yolov5.html | 2 +- maixpy/sitemap.xml | 488 +++++++--- maixpy/static/search_index/index_0.json | 2 +- maixpy/static/search_index/index_1.json | 2 +- maixpy/static/search_index/index_2.json | 2 +- 139 files changed, 17940 insertions(+), 408 deletions(-) create mode 100644 maixpy/api/maix/network/wifi.html create mode 100644 maixpy/doc/en/audio/recognize.html create mode 100644 maixpy/doc/en/basic/app.html create mode 100644 maixpy/doc/en/basic/app_usage.html create mode 100644 maixpy/doc/en/basic/linux_basic.html create mode 100644 maixpy/doc/en/basic/maixpy_upgrade.html create mode 100644 maixpy/doc/en/basic/maixvision.html create mode 100644 maixpy/doc/en/basic/os.html create mode 100644 maixpy/doc/en/basic/python.html create mode 100644 maixpy/doc/en/basic/python_pkgs.html create mode 100644 maixpy/doc/en/faq.html create mode 100644 maixpy/doc/en/modules/acc.html create mode 100644 maixpy/doc/en/modules/thermal_cam.html create mode 100644 maixpy/doc/en/modules/tof.html create mode 100644 maixpy/doc/en/peripheral/gpio.html create mode 100644 maixpy/doc/en/peripheral/i2c.html create mode 100644 maixpy/doc/en/peripheral/pwm.html create mode 100644 maixpy/doc/en/peripheral/spi.html create mode 100644 maixpy/doc/en/peripheral/uart.html create mode 100644 maixpy/doc/en/peripheral/wdt.html create mode 100644 maixpy/doc/en/pro/compile_os.html create mode 100644 maixpy/doc/en/source_code/add_c_module.html create mode 100644 maixpy/doc/en/source_code/build.html create mode 100644 maixpy/doc/en/source_code/contribute.html create mode 100644 maixpy/doc/en/source_code/faq.html create mode 100644 maixpy/doc/en/source_code/maixcdk.html create mode 100644 maixpy/doc/en/video/jpeg_streaming.html create mode 100644 maixpy/doc/en/vision/ai.html create mode 100644 maixpy/doc/en/vision/apriltag.html create mode 100644 maixpy/doc/en/vision/assets/custmize_model1.png create mode 100644 maixpy/doc/en/vision/assets/custmize_model10.png create mode 100644 maixpy/doc/en/vision/assets/custmize_model11.png create mode 100644 maixpy/doc/en/vision/assets/custmize_model2.png create mode 100644 maixpy/doc/en/vision/assets/custmize_model3.png create mode 100644 maixpy/doc/en/vision/assets/custmize_model4.png create mode 100644 maixpy/doc/en/vision/assets/custmize_model5.png create mode 100644 maixpy/doc/en/vision/assets/custmize_model6.png create mode 100644 maixpy/doc/en/vision/assets/custmize_model7.png create mode 100644 maixpy/doc/en/vision/assets/custmize_model8.png create mode 100644 maixpy/doc/en/vision/assets/custmize_model9.png create mode 100644 maixpy/doc/en/vision/body_key_points.html create mode 100644 maixpy/doc/en/vision/camera.html create mode 100644 maixpy/doc/en/vision/classify.html create mode 100644 maixpy/doc/en/vision/custmize_model.html create mode 100644 maixpy/doc/en/vision/display.html create mode 100644 maixpy/doc/en/vision/face_recognition.html create mode 100644 maixpy/doc/en/vision/find_blobs.html create mode 100644 maixpy/doc/en/vision/image_ops.html create mode 100644 maixpy/doc/en/vision/maixhub_train.html create mode 100644 maixpy/doc/en/vision/object_track.html create mode 100644 maixpy/doc/en/vision/qrcode.html create mode 100644 maixpy/doc/en/vision/self_learn_classifier.html create mode 100644 maixpy/doc/en/vision/self_learn_detector.html create mode 100644 maixpy/doc/en/vision/yolov5.html diff --git a/maixpy/api/api.json b/maixpy/api/api.json index e3fa5a11..18ab695d 100644 --- a/maixpy/api/api.json +++ b/maixpy/api/api.json @@ -9712,6 +9712,20 @@ "def": "err::Err show_colorbar(bool enable)", "py_def": "def show_colorbar(self, enable: bool) -> maix.err.Err" }, + "get_channel": { + "type": "func", + "name": "get_channel", + "doc": { + "brief": "Get channel of camera", + "return": "channel number", + "maixpy": "maix.camera.Camera.get_channel", + "py_doc": "Get channel of camera\n\nReturns: channel number\n" + }, + "args": [], + "ret_type": "int", + "static": false, + "def": "int get_channel()" + }, "set_resolution": { "type": "func", "name": "set_resolution", @@ -10183,6 +10197,20 @@ "def": "void set_backlight(float value)", "py_def": "def set_backlight(self, value: float) -> None" }, + "get_backlight": { + "type": "func", + "name": "get_backlight", + "doc": { + "brief": "Get display backlight", + "return": "value backlight value, float type, range is [0, 100]", + "maixpy": "maix.display.Display.get_backlight", + "py_doc": "Get display backlight\n\nReturns: value backlight value, float type, range is [0, 100]\n" + }, + "args": [], + "ret_type": "float", + "static": false, + "def": "float get_backlight()" + }, "set_hmirror": { "type": "func", "name": "set_hmirror", @@ -14045,6 +14073,319 @@ "brief": "maix.network module" }, "members": { + "wifi": { + "type": "module", + "doc": { + "brief": "maix.network.wifi module" + }, + "members": { + "AP_Info": { + "type": "class", + "name": "AP_Info", + "doc": { + "brief": "WiFi AP info", + "maixpy": "maix.network.wifi.AP_Info", + "py_doc": "WiFi AP info" + }, + "members": { + "ssid": { + "type": "var", + "name": "ssid", + "doc": { + "brief": "WiFi AP info SSID", + "maixpy": "maix.network.wifi.AP_Info.ssid", + "py_doc": "WiFi AP info SSID" + }, + "value": null, + "static": false, + "readonly": false, + "def": "std::vector ssid" + }, + "bssid": { + "type": "var", + "name": "bssid", + "doc": { + "brief": "WiFi AP info BSSID", + "maixpy": "maix.network.wifi.AP_Info.bssid", + "py_doc": "WiFi AP info BSSID" + }, + "value": null, + "static": false, + "readonly": false, + "def": "std::string bssid" + }, + "security": { + "type": "var", + "name": "security", + "doc": { + "brief": "WiFi AP info security", + "maixpy": "maix.network.wifi.AP_Info.security", + "py_doc": "WiFi AP info security" + }, + "value": null, + "static": false, + "readonly": false, + "def": "std::string security" + }, + "channel": { + "type": "var", + "name": "channel", + "doc": { + "brief": "WiFi AP info channel", + "maixpy": "maix.network.wifi.AP_Info.channel", + "py_doc": "WiFi AP info channel" + }, + "value": null, + "static": false, + "readonly": false, + "def": "int channel" + }, + "frequency": { + "type": "var", + "name": "frequency", + "doc": { + "brief": "WiFi AP info frequency", + "maixpy": "maix.network.wifi.AP_Info.frequency", + "py_doc": "WiFi AP info frequency" + }, + "value": null, + "static": false, + "readonly": false, + "def": "int frequency" + }, + "rssi": { + "type": "var", + "name": "rssi", + "doc": { + "brief": "WiFi AP info rssi", + "maixpy": "maix.network.wifi.AP_Info.rssi", + "py_doc": "WiFi AP info rssi" + }, + "value": null, + "static": false, + "readonly": false, + "def": "int rssi" + }, + "ssid_str": { + "type": "func", + "name": "ssid_str", + "doc": { + "brief": "WiFi AP info ssid_str", + "maixpy": "maix.network.wifi.AP_Info.ssid_str", + "py_doc": "WiFi AP info ssid_str" + }, + "args": [], + "ret_type": "std::string", + "static": false, + "def": "std::string ssid_str()" + } + }, + "def": "class AP_Info" + }, + "list_devices": { + "type": "func", + "name": "list_devices", + "doc": { + "brief": "List WiFi interfaces", + "return": "WiFi interface list, string type", + "maixpy": "maix.network.wifi.list_devices", + "py_doc": "List WiFi interfaces\n\nReturns: WiFi interface list, string type\n" + }, + "args": [], + "ret_type": "std::vector", + "static": false, + "def": "std::vector list_devices()" + }, + "Wifi": { + "type": "class", + "name": "Wifi", + "doc": { + "brief": "Wifi class", + "maixpy": "maix.network.wifi.Wifi", + "py_doc": "Wifi class" + }, + "members": { + "__init__": { + "type": "func", + "name": "Wifi", + "doc": { + "brief": "Wifi class", + "param": { + "iface": "wifi interface name, default is wlan0" + }, + "maixpy": "maix.network.wifi.Wifi.__init__", + "maixcdk": "maix.network.wifi.Wifi.Wifi", + "py_doc": "Wifi class\n\nArgs:\n - iface: wifi interface name, default is wlan0\n" + }, + "args": [ + [ + "std::string", + "iface", + "\"wlan0\"" + ] + ], + "ret_type": null, + "static": false, + "def": "Wifi(std::string iface = \"wlan0\")" + }, + "get_ip": { + "type": "func", + "name": "get_ip", + "doc": { + "brief": "Get current WiFi ip", + "return": "ip, string type, if network not connected, will return empty string.", + "maixpy": "maix.network.wifi.Wifi.get_ip", + "py_doc": "Get current WiFi ip\n\nReturns: ip, string type, if network not connected, will return empty string.\n" + }, + "args": [], + "ret_type": "std::string", + "static": false, + "def": "std::string get_ip()" + }, + "get_mac": { + "type": "func", + "name": "get_mac", + "doc": { + "brief": "Get current WiFi MAC address", + "return": "ip, string type.", + "maixpy": "maix.network.wifi.Wifi.get_mac", + "py_doc": "Get current WiFi MAC address\n\nReturns: ip, string type.\n" + }, + "args": [], + "ret_type": "std::string", + "static": false, + "def": "std::string get_mac()" + }, + "get_gateway": { + "type": "func", + "name": "get_gateway", + "doc": { + "brief": "Get current WiFi ip", + "return": "ip, string type, if network not connected, will return empty string.", + "maixpy": "maix.network.wifi.Wifi.get_gateway", + "py_doc": "Get current WiFi ip\n\nReturns: ip, string type, if network not connected, will return empty string.\n" + }, + "args": [], + "ret_type": "std::string", + "static": false, + "def": "std::string get_gateway()" + }, + "start_scan": { + "type": "func", + "name": "start_scan", + "doc": { + "brief": "WiFi start scan AP info around in background.", + "return": "If success, return err.Err.ERR_NONE, else means failed.", + "maixpy": "maix.network.wifi.Wifi.start_scan", + "py_doc": "WiFi start scan AP info around in background.\n\nReturns: If success, return err.Err.ERR_NONE, else means failed.\n" + }, + "args": [], + "ret_type": "err::Err", + "static": false, + "def": "err::Err start_scan()" + }, + "get_scan_result": { + "type": "func", + "name": "get_scan_result", + "doc": { + "brief": "Get WiFi scan AP info.", + "return": "wifi.AP_Info list.", + "maixpy": "maix.network.wifi.Wifi.get_scan_result", + "py_doc": "Get WiFi scan AP info.\n\nReturns: wifi.AP_Info list.\n" + }, + "args": [], + "ret_type": "std::vector", + "static": false, + "def": "std::vector get_scan_result()" + }, + "stop_scan": { + "type": "func", + "name": "stop_scan", + "doc": { + "brief": "Stop WiFi scan AP info.", + "maixpy": "maix.network.wifi.Wifi.stop_scan", + "py_doc": "Stop WiFi scan AP info." + }, + "args": [], + "ret_type": "void", + "static": false, + "def": "void stop_scan()" + }, + "connect": { + "type": "func", + "name": "connect", + "doc": { + "brief": "Connect to WiFi AP.", + "param": { + "ssid": "SSID of AP", + "password": "password of AP, if no password, leave it empty.", + "wait": "wait for got IP or failed or timeout.", + "timeout": "connect timeout internal, unit second." + }, + "return": "If success, return err.Err.ERR_NONE, else means failed.", + "maixpy": "maix.network.wifi.Wifi.connect", + "py_doc": "Connect to WiFi AP.\n\nArgs:\n - ssid: SSID of AP\n - password: password of AP, if no password, leave it empty.\n - wait: wait for got IP or failed or timeout.\n - timeout: connect timeout internal, unit second.\n\n\nReturns: If success, return err.Err.ERR_NONE, else means failed.\n" + }, + "args": [ + [ + "const std::string &", + "ssid", + null + ], + [ + "const std::string &", + "password", + null + ], + [ + "bool", + "wait", + "true" + ], + [ + "int", + "timeout", + "60" + ] + ], + "ret_type": "err::Err", + "static": false, + "def": "err::Err connect(const std::string &ssid, const std::string &password, bool wait = true, int timeout = 60)" + }, + "disconnect": { + "type": "func", + "name": "disconnect", + "doc": { + "brief": "Disconnect from WiFi AP.", + "return": "If success, return err.Err.ERR_NONE, else means failed.", + "maixpy": "maix.network.wifi.Wifi.disconnect", + "py_doc": "Disconnect from WiFi AP.\n\nReturns: If success, return err.Err.ERR_NONE, else means failed.\n" + }, + "args": [], + "ret_type": "err::Err", + "static": false, + "def": "err::Err disconnect()" + }, + "is_connected": { + "type": "func", + "name": "is_connected", + "doc": { + "brief": "See if WiFi is connected to AP.", + "return": "If connected return true, else false.", + "maixpy": "maix.network.wifi.Wifi.is_connected", + "py_doc": "See if WiFi is connected to AP.\n\nReturns: If connected return true, else false.\n" + }, + "args": [], + "ret_type": "bool", + "static": false, + "def": "bool is_connected()" + } + }, + "def": "class Wifi" + } + }, + "auto_add": true + }, "have_network": { "type": "func", "name": "have_network", @@ -14869,11 +15210,12 @@ "img": "input image", "mean": "mean value, a list type, e.g. [0.485, 0.456, 0.406], default is empty list means not normalize.", "scale": "scale value, a list type, e.g. [1/0.229, 1/0.224, 1/0.225], default is empty list means not normalize.", - "fit": "fit mode, if the image size of input not equal to model's input, it will auto resize use this fit method,\ndefault is image.Fit.FIT_FILL for easy coordinate calculation, but for more accurate result, use image.Fit.FIT_CONTAIN is better." + "fit": "fit mode, if the image size of input not equal to model's input, it will auto resize use this fit method,\ndefault is image.Fit.FIT_FILL for easy coordinate calculation, but for more accurate result, use image.Fit.FIT_CONTAIN is better.", + "copy_result": "If set true, will copy result to a new variable; else will use a internal memory, you can only use it until to the next forward.\nDefault true to avoid problems, you can set it to false manually to make speed faster." }, "return": "output tensor. In C++, you should manually delete tensors in return value and return value.", "maixpy": "maix.nn.NN.forward_image", - "py_doc": "forward model, param is image\n\nArgs:\n - img: input image\n - mean: mean value, a list type, e.g. [0.485, 0.456, 0.406], default is empty list means not normalize.\n - scale: scale value, a list type, e.g. [1/0.229, 1/0.224, 1/0.225], default is empty list means not normalize.\n - fit: fit mode, if the image size of input not equal to model's input, it will auto resize use this fit method,\ndefault is image.Fit.FIT_FILL for easy coordinate calculation, but for more accurate result, use image.Fit.FIT_CONTAIN is better.\n\n\nReturns: output tensor. In C++, you should manually delete tensors in return value and return value.\n" + "py_doc": "forward model, param is image\n\nArgs:\n - img: input image\n - mean: mean value, a list type, e.g. [0.485, 0.456, 0.406], default is empty list means not normalize.\n - scale: scale value, a list type, e.g. [1/0.229, 1/0.224, 1/0.225], default is empty list means not normalize.\n - fit: fit mode, if the image size of input not equal to model's input, it will auto resize use this fit method,\ndefault is image.Fit.FIT_FILL for easy coordinate calculation, but for more accurate result, use image.Fit.FIT_CONTAIN is better.\n - copy_result: If set true, will copy result to a new variable; else will use a internal memory, you can only use it until to the next forward.\nDefault true to avoid problems, you can set it to false manually to make speed faster.\n\n\nReturns: output tensor. In C++, you should manually delete tensors in return value and return value.\n" }, "args": [ [ @@ -14895,11 +15237,16 @@ "image::Fit", "fit", "image::Fit::FIT_FILL" + ], + [ + "bool", + "copy_result", + "true" ] ], "ret_type": "tensor::Tensors*", "static": false, - "def": "tensor::Tensors *forward_image(image::Image &img, std::vector mean = std::vector(), std::vector scale = std::vector(), image::Fit fit = image::Fit::FIT_FILL)" + "def": "tensor::Tensors *forward_image(image::Image &img, std::vector mean = std::vector(), std::vector scale = std::vector(), image::Fit fit = image::Fit::FIT_FILL, bool copy_result = true)" } }, "def": "class NN" @@ -16899,6 +17246,99 @@ ], "def": "enum RtspStreamType\n {\n RTSP_STREAM_NONE = 0, // format invalid\n RTSP_STREAM_H265,\n }" }, + "Region": { + "type": "class", + "name": "Region", + "doc": { + "brief": "Region class", + "maixpy": "maix.rtsp.Region", + "py_doc": "Region class" + }, + "members": { + "__init__": { + "type": "func", + "name": "Region", + "doc": { + "brief": "Construct a new Region object", + "param": { + "x": "region coordinate x", + "y": "region coordinate y", + "width": "region width", + "height": "region height", + "format": "region format", + "camera": "bind region to camera" + }, + "maixpy": "maix.rtsp.Region.__init__", + "maixcdk": "maix.rtsp.Region.Region", + "py_doc": "Construct a new Region object\n\nArgs:\n - x: region coordinate x\n - y: region coordinate y\n - width: region width\n - height: region height\n - format: region format\n - camera: bind region to camera\n" + }, + "args": [ + [ + "int", + "x", + null + ], + [ + "int", + "y", + null + ], + [ + "int", + "width", + null + ], + [ + "int", + "height", + null + ], + [ + "image::Format", + "format", + null + ], + [ + "camera::Camera *", + "camera", + null + ] + ], + "ret_type": null, + "static": false, + "def": "Region(int x, int y, int width, int height, image::Format format, camera::Camera *camera)" + }, + "get_canvas": { + "type": "func", + "name": "get_canvas", + "doc": { + "brief": "Return an image object from region", + "return": "image object", + "maixpy": "maix.rtsp.Region.get_canvas", + "py_doc": "Return an image object from region\n\nReturns: image object\n" + }, + "args": [], + "ret_type": "image::Image*", + "static": false, + "def": "image::Image *get_canvas()" + }, + "update_canvas": { + "type": "func", + "name": "update_canvas", + "doc": { + "brief": "Update canvas", + "return": "error code", + "maixpy": "maix.rtsp.Region.update_canvas", + "py_doc": "Update canvas\n\nReturns: error code\n" + }, + "args": [], + "ret_type": "err::Err", + "static": false, + "def": "err::Err update_canvas()" + } + }, + "def": "class Region" + }, "Rtsp": { "type": "class", "name": "Rtsp", @@ -17075,6 +17515,73 @@ "static": false, "def": "bool rtsp_is_start()", "py_def": "def rtsp_is_start(self) -> bool" + }, + "add_region": { + "type": "func", + "name": "add_region", + "doc": { + "brief": "return a region object, you can draw image on the region.", + "param": { + "x": "region coordinate x", + "y": "region coordinate y", + "width": "region width", + "height": "region height", + "format": "region format, support Format::FMT_BGRA8888 only" + }, + "return": "the reigon object", + "maixpy": "maix.rtsp.Rtsp.add_region", + "py_doc": "return a region object, you can draw image on the region.\n\nArgs:\n - x: region coordinate x\n - y: region coordinate y\n - width: region width\n - height: region height\n - format: region format, support Format::FMT_BGRA8888 only\n\n\nReturns: the reigon object\n" + }, + "args": [ + [ + "int", + "x", + null + ], + [ + "int", + "y", + null + ], + [ + "int", + "width", + null + ], + [ + "int", + "height", + null + ], + [ + "image::Format", + "format", + "image::Format::FMT_BGRA8888" + ] + ], + "ret_type": "rtsp::Region*", + "static": false, + "def": "rtsp::Region *add_region(int x, int y, int width, int height, image::Format format = image::Format::FMT_BGRA8888)" + }, + "update_region": { + "type": "func", + "name": "update_region", + "doc": { + "brief": "update and show region", + "return": "error code", + "maixpy": "maix.rtsp.Rtsp.update_region", + "py_doc": "update and show region\n\nReturns: error code\n" + }, + "args": [ + [ + "rtsp::Region &", + "region", + null + ] + ], + "ret_type": "err::Err", + "static": false, + "def": "err::Err update_region(rtsp::Region ®ion)" } }, "def": "class Rtsp" @@ -17239,7 +17746,7 @@ "ret_type": null, "static": false, "def": "Video(std::string path = std::string(), bool record = false, int interval = 33333, int width = -1, int height = -1, bool audio = false, int sample_rate = 44100, int channel = 1, bool open = true)", - "py_def": "def __init__(self, width: int = -1, height: int = -1, type: VideoType = ...) -> None" + "py_def": "def __init__(self, path: str = '', record: bool = False, interval: int = 33333, width: int = -1, height: int = -1, audio: bool = False, sample_rate: int = 44100, channel: int = 1, open: bool = True) -> None" }, "open": { "type": "func", @@ -17305,7 +17812,7 @@ "ret_type": "err::Err", "static": false, "def": "err::Err open(std::string path = std::string(), bool record = false, int interval = 33333, int width = -1, int height = -1, bool audio = false, int sample_rate = 44100, int channel = 1)", - "py_def": "def open(self, width: int = -1, height: int = -1, type: VideoType = ...) -> maix.err.Err" + "py_def": "def open(self, path: str = '', record: bool = False, interval: int = 33333, width: int = -1, height: int = -1, audio: bool = False, sample_rate: int = 44100, channel: int = 1) -> maix.err.Err" }, "close": { "type": "func", @@ -17342,7 +17849,8 @@ ], "ret_type": "err::Err", "static": false, - "def": "err::Err bind_camera(camera::Camera *camera)" + "def": "err::Err bind_camera(camera::Camera *camera)", + "py_def": "def bind_camera(self, camera: maix.camera.Camera) -> maix.err.Err" }, "record_start": { "type": "func", @@ -17365,7 +17873,8 @@ ], "ret_type": "err::Err", "static": false, - "def": "err::Err record_start(uint64_t record_time = -1)" + "def": "err::Err record_start(uint64_t record_time = -1)", + "py_def": "def record_start(self, record_time: int = -1) -> maix.err.Err" }, "record_finish": { "type": "func", @@ -17379,7 +17888,8 @@ "args": [], "ret_type": "err::Err", "static": false, - "def": "err::Err record_finish()" + "def": "err::Err record_finish()", + "py_def": "def record_finish(self) -> maix.err.Err" }, "capture": { "type": "func", @@ -17393,7 +17903,8 @@ "args": [], "ret_type": "image::Image*", "static": false, - "def": "image::Image *capture()" + "def": "image::Image *capture()", + "py_def": "def capture(self) -> maix.image.Image" }, "encode": { "type": "func", @@ -17455,7 +17966,8 @@ "args": [], "ret_type": "bool", "static": false, - "def": "bool is_recording()" + "def": "bool is_recording()", + "py_def": "def is_recording(self) -> bool" }, "is_opened": { "type": "func", diff --git a/maixpy/api/index.html b/maixpy/api/index.html index 51541c91..a9b507d4 100644 --- a/maixpy/api/index.html +++ b/maixpy/api/index.html @@ -114,7 +114,10 @@

MaixPy

- + - + - +