+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/maixpy/api/api.json b/maixpy/api/api.json
new file mode 100644
index 00000000..dde4dbf7
--- /dev/null
+++ b/maixpy/api/api.json
@@ -0,0 +1,30263 @@
+{
+ "type": "top_module",
+ "members": {
+ "maix": {
+ "type": "module",
+ "doc": {
+ "breif": "MaixPy C/C++ API from MaixCDK"
+ },
+ "members": {
+ "err": {
+ "type": "module",
+ "doc": {
+ "brief": "maix.err module"
+ },
+ "members": {
+ "Err": {
+ "type": "enum",
+ "name": "Err",
+ "doc": {
+ "brief": "Maix Error code",
+ "maixpy": "maix.err.Err",
+ "py_doc": "Maix Error code"
+ },
+ "values": [
+ [
+ "ERR_NONE",
+ "0",
+ "No error"
+ ],
+ [
+ "ERR_ARGS",
+ "",
+ "Invalid arguments"
+ ],
+ [
+ "ERR_NO_MEM",
+ "",
+ "No memory"
+ ],
+ [
+ "ERR_NOT_IMPL",
+ "",
+ "Not implemented"
+ ],
+ [
+ "ERR_NOT_READY",
+ "",
+ "Not ready"
+ ],
+ [
+ "ERR_NOT_INIT",
+ "",
+ "Not initialized"
+ ],
+ [
+ "ERR_NOT_OPEN",
+ "",
+ "Not opened"
+ ],
+ [
+ "ERR_NOT_PERMIT",
+ "",
+ "Not permitted"
+ ],
+ [
+ "ERR_REOPEN",
+ "",
+ "Re-open"
+ ],
+ [
+ "ERR_BUSY",
+ "",
+ "Busy"
+ ],
+ [
+ "ERR_READ",
+ "",
+ "Read error"
+ ],
+ [
+ "ERR_WRITE",
+ "",
+ "Write error"
+ ],
+ [
+ "ERR_TIMEOUT",
+ "",
+ "Timeout"
+ ],
+ [
+ "ERR_RUNTIME",
+ "",
+ "Runtime error"
+ ],
+ [
+ "ERR_IO",
+ "",
+ "IO error"
+ ],
+ [
+ "ERR_NOT_FOUND",
+ "",
+ "Not found"
+ ],
+ [
+ "ERR_ALREAY_EXIST",
+ "",
+ "Already exist"
+ ],
+ [
+ "ERR_BUFF_FULL",
+ "",
+ "Buffer full"
+ ],
+ [
+ "ERR_BUFF_EMPTY",
+ "",
+ "Buffer empty"
+ ],
+ [
+ "ERR_CANCEL",
+ "",
+ "Cancel"
+ ],
+ [
+ "ERR_OVERFLOW",
+ "",
+ "Overflow"
+ ],
+ [
+ "ERR_MAX",
+ "",
+ ""
+ ]
+ ],
+ "def": "enum Err\n {\n // !!! fixed error code, DO NOT change number already defined, only append new error code\n ERR_NONE = 0, // No error\n ERR_ARGS , // Invalid arguments\n ERR_NO_MEM , // No memory\n ERR_NOT_IMPL , // Not implemented\n ERR_NOT_READY , // Not ready\n ERR_NOT_INIT , // Not initialized\n ERR_NOT_OPEN , // Not opened\n ERR_NOT_PERMIT , // Not permitted\n ERR_REOPEN , // Re-open\n ERR_BUSY , // Busy\n ERR_READ , // Read error\n ERR_WRITE , // Write error\n ERR_TIMEOUT , // Timeout\n ERR_RUNTIME , // Runtime error\n ERR_IO , // IO error\n ERR_NOT_FOUND , // Not found\n ERR_ALREAY_EXIST , // Already exist\n ERR_BUFF_FULL , // Buffer full\n ERR_BUFF_EMPTY , // Buffer empty\n ERR_CANCEL , // Cancel\n ERR_OVERFLOW , // Overflow\n ERR_MAX,\n }"
+ },
+ "Exception": {
+ "type": "class",
+ "name": "Exception",
+ "doc": {
+ "brief": "Maix Exception",
+ "maixpy": "maix.err.Exception",
+ "py_doc": "Maix Exception"
+ },
+ "members": {},
+ "def": "class Exception : public std::exception"
+ },
+ "to_str": {
+ "type": "func",
+ "name": "to_str",
+ "doc": {
+ "brief": "Error code to string",
+ "param": {
+ "e": "direction [in], error code, err::Err type"
+ },
+ "return": "error string",
+ "maixpy": "maix.err.to_str",
+ "py_doc": "Error code to string\n\nArgs:\n - e: direction [in], error code, err::Err type\n\n\nReturns: error string\n"
+ },
+ "args": [
+ [
+ "err::Err",
+ "e",
+ null
+ ]
+ ],
+ "ret_type": "std::string",
+ "static": false,
+ "def": "std::string to_str(err::Err e)",
+ "py_def": "def to_str(e: Err) -> str"
+ },
+ "get_error": {
+ "type": "func",
+ "name": "get_error",
+ "doc": {
+ "brief": "get last error string",
+ "return": "error string",
+ "maixpy": "maix.err.get_error",
+ "py_doc": "get last error string\n\nReturns: error string\n"
+ },
+ "args": [],
+ "ret_type": "std::string&",
+ "static": false,
+ "def": "std::string& get_error()",
+ "py_def": "def get_error() -> str"
+ },
+ "set_error": {
+ "type": "func",
+ "name": "set_error",
+ "doc": {
+ "brief": "set last error string",
+ "param": {
+ "str": "direction [in], error string"
+ },
+ "maixpy": "maix.err.set_error",
+ "py_doc": "set last error string\n\nArgs:\n - str: direction [in], error string\n"
+ },
+ "args": [
+ [
+ "const std::string &",
+ "str",
+ null
+ ]
+ ],
+ "ret_type": "void",
+ "static": false,
+ "def": "void set_error(const std::string &str)",
+ "py_def": "def set_error(str: str) -> None"
+ },
+ "check_raise": {
+ "type": "func",
+ "name": "check_raise",
+ "doc": {
+ "brief": "Check error code, if not ERR_NONE, raise err.Exception",
+ "param": {
+ "e": "direction [in], error code, err::Err type",
+ "msg": "direction [in], error message"
+ },
+ "maixpy": "maix.err.check_raise",
+ "py_doc": "Check error code, if not ERR_NONE, raise err.Exception\n\nArgs:\n - e: direction [in], error code, err::Err type\n - msg: direction [in], error message\n"
+ },
+ "args": [
+ [
+ "err::Err",
+ "e",
+ null
+ ],
+ [
+ "const std::string &",
+ "msg",
+ "\"\""
+ ]
+ ],
+ "ret_type": "void",
+ "static": false,
+ "def": "void check_raise(err::Err e, const std::string &msg = \"\")",
+ "py_def": "def check_raise(e: Err, msg: str = '') -> None"
+ },
+ "check_bool_raise": {
+ "type": "func",
+ "name": "check_bool_raise",
+ "doc": {
+ "brief": "Check condition, if false, raise err.Exception",
+ "param": {
+ "ok": "direction [in], condition, if true, do nothing, if false, raise err.Exception",
+ "msg": "direction [in], error message"
+ },
+ "maixpy": "maix.err.check_bool_raise",
+ "py_doc": "Check condition, if false, raise err.Exception\n\nArgs:\n - ok: direction [in], condition, if true, do nothing, if false, raise err.Exception\n - msg: direction [in], error message\n"
+ },
+ "args": [
+ [
+ "bool",
+ "ok",
+ null
+ ],
+ [
+ "const std::string &",
+ "msg",
+ "\"\""
+ ]
+ ],
+ "ret_type": "void",
+ "static": false,
+ "def": "void check_bool_raise(bool ok, const std::string &msg = \"\")",
+ "py_def": "def check_bool_raise(ok: bool, msg: str = '') -> None"
+ },
+ "check_null_raise": {
+ "type": "func",
+ "name": "check_null_raise",
+ "doc": {
+ "brief": "Check NULL pointer, if NULL, raise exception",
+ "param": {
+ "ptr": "direction [in], pointer",
+ "msg": "direction [in], error message"
+ },
+ "maixpy": "maix.err.check_null_raise",
+ "py_doc": "Check NULL pointer, if NULL, raise exception\n\nArgs:\n - ptr: direction [in], pointer\n - msg: direction [in], error message\n"
+ },
+ "args": [
+ [
+ "void *",
+ "ptr",
+ null
+ ],
+ [
+ "const std::string &",
+ "msg",
+ "\"\""
+ ]
+ ],
+ "ret_type": "void",
+ "static": false,
+ "def": "void check_null_raise(void *ptr, const std::string &msg = \"\")",
+ "py_def": "def check_null_raise(ptr: capsule, msg: str = '') -> None"
+ }
+ },
+ "auto_add": true
+ },
+ "tensor": {
+ "type": "module",
+ "doc": {
+ "brief": "maix.tensor module"
+ },
+ "members": {
+ "DType": {
+ "type": "enum",
+ "name": "DType",
+ "doc": {
+ "brief": "Tensor data types",
+ "maixpy": "maix.tensor.DType",
+ "py_doc": "Tensor data types"
+ },
+ "values": [
+ [
+ "UINT8",
+ "0",
+ ""
+ ],
+ [
+ "INT8",
+ "",
+ ""
+ ],
+ [
+ "UINT16",
+ "",
+ ""
+ ],
+ [
+ "INT16",
+ "",
+ ""
+ ],
+ [
+ "UINT32",
+ "",
+ ""
+ ],
+ [
+ "INT32",
+ "",
+ ""
+ ],
+ [
+ "FLOAT16",
+ "",
+ ""
+ ],
+ [
+ "FLOAT32",
+ "",
+ ""
+ ],
+ [
+ "FLOAT64",
+ "",
+ ""
+ ],
+ [
+ "BOOL",
+ "",
+ ""
+ ],
+ [
+ "DTYPE_MAX",
+ "",
+ ""
+ ]
+ ],
+ "def": "enum DType\n {\n UINT8 = 0,\n INT8,\n UINT16,\n INT16,\n UINT32,\n INT32,\n FLOAT16,\n FLOAT32,\n FLOAT64,\n BOOL,\n // STRING,\n // OBJECT,\n DTYPE_MAX\n }"
+ },
+ "dtype_size": {
+ "type": "var",
+ "name": "",
+ "doc": {
+ "brief": "Tensor data type size in bytes",
+ "attention": "It's a copy of this variable in MaixPy,\nso change it in C++ (e.g. update var in hello function) will not take effect the var inMaixPy.\nSo we add const for this var to avoid this mistake.",
+ "maixpy": "maix.tensor.dtype_size",
+ "py_doc": "Tensor data type size in bytes"
+ },
+ "value": "{\n 1, // UINT8\n 1, // INT8\n 2, // UINT16\n 2, // INT16\n 4, // UINT32\n 4, // INT32\n 2, // FLOAT16\n 4, // FLOAT32\n 8, // FLOAT64\n 1, // BOOL\n // 1, // STRING\n // 1, // OBJECT\n 0\n }",
+ "static": false,
+ "readonly": true,
+ "def": "const std::vector dtype_size = {\n 1, // UINT8\n 1, // INT8\n 2, // UINT16\n 2, // INT16\n 4, // UINT32\n 4, // INT32\n 2, // FLOAT16\n 4, // FLOAT32\n 8, // FLOAT64\n 1, // BOOL\n // 1, // STRING\n // 1, // OBJECT\n 0\n }"
+ },
+ "dtype_name": {
+ "type": "var",
+ "name": "",
+ "doc": {
+ "brief": "Tensor data type name",
+ "maixpy": "maix.tensor.dtype_name",
+ "py_doc": "Tensor data type name"
+ },
+ "value": "{\n \"uint8\",\n \"int8\",\n \"uint16\",\n \"int16\",\n \"uint32\",\n \"int32\",\n \"float16\",\n \"float32\",\n \"float64\",\n \"bool\",\n // \"string\",\n // \"object\",\n \"invalid\"\n }",
+ "static": false,
+ "readonly": true,
+ "def": "const std::vector dtype_name = {\n \"uint8\",\n \"int8\",\n \"uint16\",\n \"int16\",\n \"uint32\",\n \"int32\",\n \"float16\",\n \"float32\",\n \"float64\",\n \"bool\",\n // \"string\",\n // \"object\",\n \"invalid\"\n }"
+ },
+ "Tensor": {
+ "type": "class",
+ "name": "Tensor",
+ "doc": {
+ "brief": "Tensor class",
+ "maixpy": "maix.tensor.Tensor",
+ "py_doc": "Tensor class"
+ },
+ "members": {
+ "__init__": {
+ "type": "func",
+ "name": "Tensor",
+ "doc": {
+ "brief": "Tensor constructor",
+ "param": {
+ "shape": "tensor shape, a int list",
+ "dtype": "tensor element data type, see DType of this module"
+ },
+ "maixpy": "maix.tensor.Tensor.__init__",
+ "py_doc": "Tensor constructor\n\nArgs:\n - shape: tensor shape, a int list\n - dtype: tensor element data type, see DType of this module\n"
+ },
+ "args": [
+ [
+ "std::vector",
+ "shape",
+ null
+ ],
+ [
+ "tensor::DType",
+ "dtype",
+ null
+ ]
+ ],
+ "ret_type": null,
+ "static": false,
+ "def": "Tensor(std::vector shape, tensor::DType dtype)",
+ "py_def": "def __init__(self, shape: list[int], dtype: DType) -> None"
+ },
+ "to_str": {
+ "type": "func",
+ "name": "to_str",
+ "doc": {
+ "brief": "To string",
+ "maixpy": "maix.tensor.Tensor.to_str",
+ "py_doc": "To string"
+ },
+ "args": [],
+ "ret_type": "std::string",
+ "static": false,
+ "def": "std::string to_str()",
+ "py_def": "def to_str(self) -> str"
+ },
+ "__str__": {
+ "type": "func",
+ "name": "__str__",
+ "doc": {
+ "brief": "To string",
+ "maixpy": "maix.tensor.Tensor.__str__",
+ "py_doc": "To string"
+ },
+ "args": [],
+ "ret_type": "std::string",
+ "static": false,
+ "def": "std::string __str__()",
+ "py_def": "def __str__(self) -> str"
+ },
+ "shape": {
+ "type": "func",
+ "name": "shape",
+ "doc": {
+ "brief": "get tensor shape",
+ "return": "tensor shape, a int list",
+ "maixpy": "maix.tensor.Tensor.shape",
+ "py_doc": "get tensor shape\n\nReturns: tensor shape, a int list\n"
+ },
+ "args": [],
+ "ret_type": "std::vector",
+ "static": false,
+ "def": "std::vector shape()",
+ "py_def": "def shape(self) -> list[int]"
+ },
+ "expand_dims": {
+ "type": "func",
+ "name": "expand_dims",
+ "doc": {
+ "brief": "expand tensor shape",
+ "param": {
+ "axis": "axis to expand"
+ },
+ "maixpy": "maix.tensor.Tensor.expand_dims",
+ "py_doc": "expand tensor shape\n\nArgs:\n - axis: axis to expand\n"
+ },
+ "args": [
+ [
+ "int",
+ "axis",
+ null
+ ]
+ ],
+ "ret_type": "void",
+ "static": false,
+ "def": "void expand_dims(int axis)",
+ "py_def": "def expand_dims(self, axis: int) -> None"
+ },
+ "reshape": {
+ "type": "func",
+ "name": "reshape",
+ "doc": {
+ "brief": "reshape tensor shape, if size not match, it will throw an err::Exception",
+ "param": {
+ "shape": "new shape"
+ },
+ "maixpy": "maix.tensor.Tensor.reshape",
+ "py_doc": "reshape tensor shape, if size not match, it will throw an err::Exception\n\nArgs:\n - shape: new shape\n"
+ },
+ "args": [
+ [
+ "std::vector",
+ "shape",
+ null
+ ]
+ ],
+ "ret_type": "void",
+ "static": false,
+ "def": "void reshape(std::vector shape)",
+ "py_def": "def reshape(self, shape: list[int]) -> None"
+ },
+ "flatten": {
+ "type": "func",
+ "name": "flatten",
+ "doc": {
+ "brief": "Flatten tensor shape to 1D",
+ "maixpy": "maix.tensor.Tensor.flatten",
+ "py_doc": "Flatten tensor shape to 1D"
+ },
+ "args": [],
+ "ret_type": "void",
+ "static": false,
+ "def": "void flatten()",
+ "py_def": "def flatten(self) -> None"
+ },
+ "dtype": {
+ "type": "func",
+ "name": "dtype",
+ "doc": {
+ "brief": "get tensor data type",
+ "return": "tensor data type, see DType of this module",
+ "maixpy": "maix.tensor.Tensor.dtype",
+ "py_doc": "get tensor data type\n\nReturns: tensor data type, see DType of this module\n"
+ },
+ "args": [],
+ "ret_type": "tensor::DType",
+ "static": false,
+ "def": "tensor::DType dtype()",
+ "py_def": "def dtype(self) -> DType"
+ },
+ "to_float_list": {
+ "type": "func",
+ "name": "to_float_list",
+ "doc": {
+ "brief": "get tensor data and return a list",
+ "return": "list type data",
+ "maixpy": "maix.tensor.Tensor.to_float_list",
+ "py_doc": "get tensor data and return a list\n\nReturns: list type data\n"
+ },
+ "args": [],
+ "ret_type": "std::valarray*",
+ "static": false,
+ "def": "std::valarray* to_float_list()",
+ "py_def": "def to_float_list(self) -> list[float]"
+ },
+ "argmax": {
+ "type": "func",
+ "name": "argmax",
+ "doc": {
+ "brief": "argmax of tensor",
+ "param": {
+ "axis": "By default, the index is into the flattened array, otherwise along the specified axis., wrong axis will throw an err::Exception"
+ },
+ "return": "argmax result, you need to delete it after use in C++.",
+ "maixpy": "maix.tensor.Tensor.argmax",
+ "py_doc": "argmax of tensor\n\nArgs:\n - axis: By default, the index is into the flattened array, otherwise along the specified axis., wrong axis will throw an err::Exception\n\n\nReturns: argmax result, you need to delete it after use in C++.\n"
+ },
+ "args": [
+ [
+ "int",
+ "axis",
+ "0xffff"
+ ]
+ ],
+ "ret_type": "tensor::Tensor*",
+ "static": false,
+ "def": "tensor::Tensor *argmax(int axis = 0xffff)",
+ "py_def": "def argmax(self, axis: int = 65535) -> Tensor"
+ },
+ "argmax1": {
+ "type": "func",
+ "name": "argmax1",
+ "doc": {
+ "brief": "argmax1, flattened data max index",
+ "return": "argmax result, int type",
+ "maixpy": "maix.tensor.Tensor.argmax1",
+ "py_doc": "argmax1, flattened data max index\n\nReturns: argmax result, int type\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int argmax1()",
+ "py_def": "def argmax1(self) -> int"
+ }
+ },
+ "def": "class Tensor"
+ },
+ "Tensors": {
+ "type": "class",
+ "name": "Tensors",
+ "doc": {
+ "brief": "Tensors",
+ "maixpy": "maix.tensor.Tensors",
+ "py_doc": "Tensors"
+ },
+ "members": {
+ "__init__": {
+ "type": "func",
+ "name": "Tensors",
+ "doc": {
+ "brief": "Constructor of Tensors",
+ "maixpy": "maix.tensor.Tensors.__init__",
+ "maixcdk": "maix.tensor.Tensors.Tensors",
+ "py_doc": "Constructor of Tensors"
+ },
+ "args": [],
+ "ret_type": null,
+ "static": false,
+ "def": "Tensors()",
+ "py_def": "def __init__(self) -> None"
+ },
+ "add_tensor": {
+ "type": "func",
+ "name": "add_tensor",
+ "doc": {
+ "brief": "Add tensor",
+ "maixpy": "maix.tensor.Tensors.add_tensor",
+ "py_doc": "Add tensor"
+ },
+ "args": [
+ [
+ "const std::string &",
+ "key",
+ null
+ ],
+ [
+ "tensor::Tensor *",
+ "tensor",
+ null
+ ],
+ [
+ "bool",
+ "copy",
+ null
+ ],
+ [
+ "bool",
+ "auto_delete",
+ null
+ ]
+ ],
+ "ret_type": "void",
+ "static": false,
+ "def": "void add_tensor(const std::string &key, tensor::Tensor *tensor, bool copy, bool auto_delete)",
+ "py_def": "def add_tensor(self, key: str, tensor: Tensor, copy: bool, auto_delete: bool) -> None"
+ },
+ "rm_tensor": {
+ "type": "func",
+ "name": "rm_tensor",
+ "doc": {
+ "brief": "Remove tensor",
+ "maixpy": "maix.tensor.Tensors.rm_tensor",
+ "py_doc": "Remove tensor"
+ },
+ "args": [
+ [
+ "const std::string &",
+ "key",
+ null
+ ]
+ ],
+ "ret_type": "void",
+ "static": false,
+ "def": "void rm_tensor(const std::string &key)",
+ "py_def": "def rm_tensor(self, key: str) -> None"
+ },
+ "clear": {
+ "type": "func",
+ "name": "clear",
+ "doc": {
+ "brief": "Clear tensors",
+ "maixpy": "maix.tensor.Tensors.clear",
+ "py_doc": "Clear tensors"
+ },
+ "args": [],
+ "ret_type": "void",
+ "static": false,
+ "def": "void clear()",
+ "py_def": "def clear(self) -> None"
+ },
+ "get_tensor": {
+ "type": "func",
+ "name": "get_tensor",
+ "doc": {
+ "brief": "Get tensor by key",
+ "maixpy": "maix.tensor.Tensors.get_tensor",
+ "maixcdk": "maix.tensor.Tensors.get_tensor",
+ "py_doc": "Get tensor by key"
+ },
+ "args": [
+ [
+ "const std::string &",
+ "key",
+ null
+ ]
+ ],
+ "ret_type": "tensor::Tensor&",
+ "static": false,
+ "def": "tensor::Tensor &get_tensor(const std::string &key)",
+ "py_def": "def get_tensor(self, key: str) -> Tensor"
+ },
+ "__getitem__": {
+ "type": "func",
+ "name": "operator[]",
+ "doc": {
+ "brief": "Operator []",
+ "maixpy": "maix.tensor.Tensors.__getitem__",
+ "maixcdk": "maix.tensor.Tensors.[]",
+ "py_doc": "Operator []"
+ },
+ "args": [
+ [
+ "const std::string &",
+ "key",
+ null
+ ]
+ ],
+ "ret_type": "tensor::Tensor&",
+ "static": false,
+ "def": "tensor::Tensor &operator[](const std::string &key)",
+ "py_def": "def __getitem__(self, key: str) -> Tensor"
+ },
+ "__len__": {
+ "type": "func",
+ "name": "size",
+ "doc": {
+ "brief": "Size",
+ "maixpy": "maix.tensor.Tensors.__len__",
+ "maixcdk": "maix.tensor.Tensors.size",
+ "py_doc": "Size"
+ },
+ "args": [],
+ "ret_type": "size_t",
+ "static": false,
+ "def": "size_t size()",
+ "py_def": "def __len__(self) -> int"
+ },
+ "keys": {
+ "type": "func",
+ "name": "keys",
+ "doc": {
+ "brief": "Get names",
+ "maixpy": "maix.tensor.Tensors.keys",
+ "py_doc": "Get names"
+ },
+ "args": [],
+ "ret_type": "std::vector",
+ "static": false,
+ "def": "std::vector keys()",
+ "py_def": "def keys(self) -> list[str]"
+ },
+ "tensors": {
+ "type": "var",
+ "name": "tensors",
+ "doc": {
+ "brief": "Tensors data, dict type",
+ "maixpy": "maix.tensor.Tensors.tensors",
+ "py_doc": "Tensors data, dict type"
+ },
+ "value": null,
+ "static": false,
+ "readonly": false,
+ "def": "std::map tensors"
+ }
+ },
+ "def": "class Tensors"
+ },
+ "tensor_from_numpy_float32": {
+ "type": "func",
+ "name": "tensor_from_numpy_float32",
+ "doc": {
+ "brief": "float32 type numpy ndarray object to tensor.Tensor object.",
+ "param": {
+ "array": "numpy array object.",
+ "copy": "if true, will alloc new buffer and copy data, else will directly use array's data buffer, default true.\nUse this arg carefully, when set to false, ther array MUST keep alive until we don't use the return tensor of this func, or will cause program crash."
+ },
+ "return": "tensor.Tensor object.",
+ "maixpy": "maix.tensor.tensor_from_numpy_float32",
+ "py_doc": "float32 type numpy ndarray object to tensor.Tensor object.\n\nArgs:\n - array: numpy array object.\n - copy: if true, will alloc new buffer and copy data, else will directly use array's data buffer, default true.\nUse this arg carefully, when set to false, ther array MUST keep alive until we don't use the return tensor of this func, or will cause program crash.\n\n\nReturns: tensor.Tensor object.\n"
+ },
+ "args": [
+ [
+ "py::array_t",
+ "array",
+ null
+ ],
+ [
+ "bool",
+ "copy",
+ "true"
+ ]
+ ],
+ "ret_type": "tensor::Tensor*",
+ "static": false,
+ "def": "tensor::Tensor *tensor_from_numpy_float32(py::array_t array, bool copy = true)",
+ "py_def": "def tensor_from_numpy_float32(array: numpy.ndarray[numpy.float32], copy: bool = True) -> Tensor"
+ },
+ "tensor_from_numpy_uint8": {
+ "type": "func",
+ "name": "tensor_from_numpy_uint8",
+ "doc": {
+ "brief": "uint8 type numpy ndarray object to tensor.Tensor object.",
+ "param": {
+ "array": "numpy array object.",
+ "copy": "if true, will alloc new buffer and copy data, else will directly use array's data buffer, default true.\nUse this arg carefully, when set to false, ther array MUST keep alive until we don't use the return tensor of this func, or will cause program crash."
+ },
+ "return": "tensor.Tensor object.",
+ "maixpy": "maix.tensor.tensor_from_numpy_uint8",
+ "py_doc": "uint8 type numpy ndarray object to tensor.Tensor object.\n\nArgs:\n - array: numpy array object.\n - copy: if true, will alloc new buffer and copy data, else will directly use array's data buffer, default true.\nUse this arg carefully, when set to false, ther array MUST keep alive until we don't use the return tensor of this func, or will cause program crash.\n\n\nReturns: tensor.Tensor object.\n"
+ },
+ "args": [
+ [
+ "py::array_t",
+ "array",
+ null
+ ],
+ [
+ "bool",
+ "copy",
+ "true"
+ ]
+ ],
+ "ret_type": "tensor::Tensor*",
+ "static": false,
+ "def": "tensor::Tensor *tensor_from_numpy_uint8(py::array_t array, bool copy = true)",
+ "py_def": "def tensor_from_numpy_uint8(array: numpy.ndarray[numpy.uint8], copy: bool = True) -> Tensor"
+ },
+ "tensor_from_numpy_int8": {
+ "type": "func",
+ "name": "tensor_from_numpy_int8",
+ "doc": {
+ "brief": "int8 type numpy ndarray object to tensor.Tensor object.",
+ "param": {
+ "array": "numpy array object.",
+ "copy": "if true, will alloc new buffer and copy data, else will directly use array's data buffer, default true.\nUse this arg carefully, when set to false, ther array MUST keep alive until we don't use the return tensor of this func, or will cause program crash."
+ },
+ "return": "tensor.Tensor object.",
+ "maixpy": "maix.tensor.tensor_from_numpy_int8",
+ "py_doc": "int8 type numpy ndarray object to tensor.Tensor object.\n\nArgs:\n - array: numpy array object.\n - copy: if true, will alloc new buffer and copy data, else will directly use array's data buffer, default true.\nUse this arg carefully, when set to false, ther array MUST keep alive until we don't use the return tensor of this func, or will cause program crash.\n\n\nReturns: tensor.Tensor object.\n"
+ },
+ "args": [
+ [
+ "py::array_t",
+ "array",
+ null
+ ],
+ [
+ "bool",
+ "copy",
+ "true"
+ ]
+ ],
+ "ret_type": "tensor::Tensor*",
+ "static": false,
+ "def": "tensor::Tensor *tensor_from_numpy_int8(py::array_t array, bool copy = true)",
+ "py_def": "def tensor_from_numpy_int8(array: numpy.ndarray[numpy.int8], copy: bool = True) -> Tensor"
+ },
+ "tensor_to_numpy_float32": {
+ "type": "func",
+ "name": "tensor_to_numpy_float32",
+ "doc": {
+ "brief": "tensor.Tensor object to float32 type numpy ndarray object.",
+ "param": {
+ "t": "tensor.Tensor object.",
+ "copy": "Whether alloc new Tensor and copy data or not,\nif not copy, array object will directly use arg's data buffer, will faster but change array will affect arg's data, default true."
+ },
+ "return": "numpy array object",
+ "maixpy": "maix.tensor.tensor_to_numpy_float32",
+ "py_doc": "tensor.Tensor object to float32 type numpy ndarray object.\n\nArgs:\n - t: tensor.Tensor object.\n - copy: Whether alloc new Tensor and copy data or not,\nif not copy, array object will directly use arg's data buffer, will faster but change array will affect arg's data, default true.\n\n\nReturns: numpy array object\n"
+ },
+ "args": [
+ [
+ "tensor::Tensor *",
+ "t",
+ null
+ ],
+ [
+ "bool",
+ "copy",
+ "true"
+ ]
+ ],
+ "ret_type": "py::array_t",
+ "static": false,
+ "def": "py::array_t tensor_to_numpy_float32(tensor::Tensor *t, bool copy = true)",
+ "py_def": "def tensor_to_numpy_float32(t: Tensor, copy: bool = True) -> numpy.ndarray[numpy.float32]"
+ },
+ "tensor_to_numpy_uint8": {
+ "type": "func",
+ "name": "tensor_to_numpy_uint8",
+ "doc": {
+ "brief": "tensor.Tensor object to int8 type numpy ndarray object.",
+ "param": {
+ "t": "tensor.Tensor object.",
+ "copy": "Whether alloc new Tensor and copy data or not,\nif not copy, array object will directly use arg's data buffer, will faster but change array will affect arg's data, default true."
+ },
+ "return": "numpy array object",
+ "maixpy": "maix.tensor.tensor_to_numpy_uint8",
+ "py_doc": "tensor.Tensor object to int8 type numpy ndarray object.\n\nArgs:\n - t: tensor.Tensor object.\n - copy: Whether alloc new Tensor and copy data or not,\nif not copy, array object will directly use arg's data buffer, will faster but change array will affect arg's data, default true.\n\n\nReturns: numpy array object\n"
+ },
+ "args": [
+ [
+ "tensor::Tensor *",
+ "t",
+ null
+ ],
+ [
+ "bool",
+ "copy",
+ "true"
+ ]
+ ],
+ "ret_type": "py::array_t",
+ "static": false,
+ "def": "py::array_t tensor_to_numpy_uint8(tensor::Tensor *t, bool copy = true)",
+ "py_def": "def tensor_to_numpy_uint8(t: Tensor, copy: bool = True) -> numpy.ndarray[numpy.uint8]"
+ },
+ "tensor_to_numpy_int8": {
+ "type": "func",
+ "name": "tensor_to_numpy_int8",
+ "doc": {
+ "brief": "tensor.Tensor object to int8 type numpy ndarray object.",
+ "param": {
+ "t": "tensor.Tensor object.",
+ "copy": "Whether alloc new Tensor and copy data or not,\nif not copy, array object will directly use arg's data buffer, will faster but change array will affect arg's data, default true."
+ },
+ "return": "numpy array object",
+ "maixpy": "maix.tensor.tensor_to_numpy_int8",
+ "py_doc": "tensor.Tensor object to int8 type numpy ndarray object.\n\nArgs:\n - t: tensor.Tensor object.\n - copy: Whether alloc new Tensor and copy data or not,\nif not copy, array object will directly use arg's data buffer, will faster but change array will affect arg's data, default true.\n\n\nReturns: numpy array object\n"
+ },
+ "args": [
+ [
+ "tensor::Tensor *",
+ "t",
+ null
+ ],
+ [
+ "bool",
+ "copy",
+ "true"
+ ]
+ ],
+ "ret_type": "py::array_t",
+ "static": false,
+ "def": "py::array_t tensor_to_numpy_int8(tensor::Tensor *t, bool copy = true)",
+ "py_def": "def tensor_to_numpy_int8(t: Tensor, copy: bool = True) -> numpy.ndarray[numpy.int8]"
+ }
+ },
+ "auto_add": true
+ },
+ "image": {
+ "type": "module",
+ "doc": {
+ "brief": "maix.image module, image related definition and functions",
+ "maixpy": "maix.image",
+ "py_doc": "maix.image module, image related definition and functions"
+ },
+ "members": {
+ "Format": {
+ "type": "enum",
+ "name": "Format",
+ "doc": {
+ "brief": "Image formats",
+ "attention": "for MaixPy firmware developers, update this enum will also need to update the fmt_size and fmt_names too !!!",
+ "maixpy": "maix.image.Format",
+ "py_doc": "Image formats"
+ },
+ "values": [
+ [
+ "FMT_RGB888",
+ "0",
+ "RGBRGB...RGB, R at the lowest address"
+ ],
+ [
+ "FMT_BGR888",
+ "",
+ "BGRBGR...BGR, B at the lowest address"
+ ],
+ [
+ "FMT_RGBA8888",
+ "",
+ "RGBARGBA...RGBA, R at the lowest address"
+ ],
+ [
+ "FMT_BGRA8888",
+ "",
+ "BGRABGRA...BGRA, B at the lowest address"
+ ],
+ [
+ "FMT_RGB565",
+ "",
+ ""
+ ],
+ [
+ "FMT_BGR565",
+ "",
+ ""
+ ],
+ [
+ "FMT_YUV422SP",
+ "",
+ "YYY...UVUVUV...UVUV"
+ ],
+ [
+ "FMT_YUV422P",
+ "",
+ "YYY...UUU...VVV"
+ ],
+ [
+ "FMT_YVU420SP",
+ "",
+ "YYY...VUVUVU...VUVU, NV21"
+ ],
+ [
+ "FMT_YUV420SP",
+ "",
+ "YYY...UVUVUV...UVUV, NV12"
+ ],
+ [
+ "FMT_YVU420P",
+ "",
+ "YYY...VVV...UUU"
+ ],
+ [
+ "FMT_YUV420P",
+ "",
+ "YYY...UUU...VVV"
+ ],
+ [
+ "FMT_GRAYSCALE",
+ "",
+ ""
+ ],
+ [
+ "FMT_BGGR6",
+ "",
+ "6-bit Bayer format with a BGGR pattern."
+ ],
+ [
+ "FMT_GBRG6",
+ "",
+ "6-bit Bayer format with a GBRG pattern."
+ ],
+ [
+ "FMT_GRBG6",
+ "",
+ "6-bit Bayer format with a GRBG pattern."
+ ],
+ [
+ "FMT_RGGB6",
+ "",
+ "6-bit Bayer format with a RGGB pattern."
+ ],
+ [
+ "FMT_BGGR8",
+ "",
+ "8-bit Bayer format with a BGGR pattern."
+ ],
+ [
+ "FMT_GBRG8",
+ "",
+ "8-bit Bayer format with a GBRG pattern."
+ ],
+ [
+ "FMT_GRBG8",
+ "",
+ "8-bit Bayer format with a GRBG pattern."
+ ],
+ [
+ "FMT_RGGB8",
+ "",
+ "8-bit Bayer format with a RGGB pattern."
+ ],
+ [
+ "FMT_BGGR10",
+ "",
+ "10-bit Bayer format with a BGGR pattern."
+ ],
+ [
+ "FMT_GBRG10",
+ "",
+ "10-bit Bayer format with a GBRG pattern."
+ ],
+ [
+ "FMT_GRBG10",
+ "",
+ "10-bit Bayer format with a GRBG pattern."
+ ],
+ [
+ "FMT_RGGB10",
+ "",
+ "10-bit Bayer format with a RGGB pattern."
+ ],
+ [
+ "FMT_BGGR12",
+ "",
+ "12-bit Bayer format with a BGGR pattern."
+ ],
+ [
+ "FMT_GBRG12",
+ "",
+ "12-bit Bayer format with a GBRG pattern."
+ ],
+ [
+ "FMT_GRBG12",
+ "",
+ "12-bit Bayer format with a GRBG pattern."
+ ],
+ [
+ "FMT_RGGB12",
+ "",
+ "12-bit Bayer format with a RGGB pattern."
+ ],
+ [
+ "FMT_UNCOMPRESSED_MAX",
+ "",
+ ""
+ ],
+ [
+ "FMT_COMPRESSED_MIN",
+ "",
+ ""
+ ],
+ [
+ "FMT_JPEG",
+ "",
+ ""
+ ],
+ [
+ "FMT_PNG",
+ "",
+ ""
+ ],
+ [
+ "FMT_COMPRESSED_MAX",
+ "",
+ ""
+ ],
+ [
+ "FMT_INVALID",
+ "0xFF",
+ "format not valid"
+ ]
+ ],
+ "def": "enum Format\n {\n FMT_RGB888 = 0, // RGBRGB...RGB, R at the lowest address\n FMT_BGR888, // BGRBGR...BGR, B at the lowest address\n FMT_RGBA8888, // RGBARGBA...RGBA, R at the lowest address\n FMT_BGRA8888, // BGRABGRA...BGRA, B at the lowest address\n FMT_RGB565,\n FMT_BGR565,\n FMT_YUV422SP, // YYY...UVUVUV...UVUV\n FMT_YUV422P, // YYY...UUU...VVV\n FMT_YVU420SP, // YYY...VUVUVU...VUVU, NV21\n FMT_YUV420SP, // YYY...UVUVUV...UVUV, NV12\n FMT_YVU420P, // YYY...VVV...UUU\n FMT_YUV420P, // YYY...UUU...VVV\n FMT_GRAYSCALE,\n FMT_BGGR6, // 6-bit Bayer format with a BGGR pattern.\n FMT_GBRG6, // 6-bit Bayer format with a GBRG pattern.\n FMT_GRBG6, // 6-bit Bayer format with a GRBG pattern.\n FMT_RGGB6, // 6-bit Bayer format with a RGGB pattern.\n FMT_BGGR8, // 8-bit Bayer format with a BGGR pattern.\n FMT_GBRG8, // 8-bit Bayer format with a GBRG pattern.\n FMT_GRBG8, // 8-bit Bayer format with a GRBG pattern.\n FMT_RGGB8, // 8-bit Bayer format with a RGGB pattern.\n FMT_BGGR10, // 10-bit Bayer format with a BGGR pattern.\n FMT_GBRG10, // 10-bit Bayer format with a GBRG pattern.\n FMT_GRBG10, // 10-bit Bayer format with a GRBG pattern.\n FMT_RGGB10, // 10-bit Bayer format with a RGGB pattern.\n FMT_BGGR12, // 12-bit Bayer format with a BGGR pattern.\n FMT_GBRG12, // 12-bit Bayer format with a GBRG pattern.\n FMT_GRBG12, // 12-bit Bayer format with a GRBG pattern.\n FMT_RGGB12, // 12-bit Bayer format with a RGGB pattern.\n FMT_UNCOMPRESSED_MAX,\n\n // compressed format below, not compressed should define upper\n FMT_COMPRESSED_MIN,\n FMT_JPEG,\n FMT_PNG,\n FMT_COMPRESSED_MAX,\n\n FMT_INVALID = 0xFF // format not valid\n }"
+ },
+ "fmt_size": {
+ "type": "var",
+ "name": "",
+ "doc": {
+ "brief": "Image format size in bytes",
+ "attention": "It's a copy of this variable in MaixPy,\nso change it in C++ (e.g. update var in hello function) will not take effect the var inMaixPy.\nSo we add const for this var to avoid this mistake.",
+ "maixpy": "maix.image.fmt_size",
+ "py_doc": "Image format size in bytes"
+ },
+ "value": "{\n 3,\n 3,\n 4,\n 4,\n 2,\n 2,\n 2,\n 2,\n 1.5,\n 1.5,\n 1.5,\n 1.5,\n 1, // grayscale\n 0.75, // 6-bit Bayer format\n 0.75, // 6-bit Bayer format\n 0.75, // 6-bit Bayer format\n 0.75, // 6-bit Bayer format\n 1, // 8-bit Bayer format\n 1, // 8-bit Bayer format\n 1, // 8-bit Bayer format\n 1, // 8-bit Bayer format\n 1.25, // 10-bit Bayer format\n 1.25, // 10-bit Bayer format\n 1.25, // 10-bit Bayer format\n 1.25, // 10-bit Bayer format\n 1.5, // 12-bit Bayer format\n 1.5, // 12-bit Bayer format\n 1.5, // 12-bit Bayer format\n 1.5, // 12-bit Bayer format\n 0, // uncompereed_max\n 0, // compressed_min\n 1, // jpeg\n 1, // png\n 0, // compressed_max\n 0 // invalid\n }",
+ "static": false,
+ "readonly": true,
+ "def": "const std::vector fmt_size = {\n 3,\n 3,\n 4,\n 4,\n 2,\n 2,\n 2,\n 2,\n 1.5,\n 1.5,\n 1.5,\n 1.5,\n 1, // grayscale\n 0.75, // 6-bit Bayer format\n 0.75, // 6-bit Bayer format\n 0.75, // 6-bit Bayer format\n 0.75, // 6-bit Bayer format\n 1, // 8-bit Bayer format\n 1, // 8-bit Bayer format\n 1, // 8-bit Bayer format\n 1, // 8-bit Bayer format\n 1.25, // 10-bit Bayer format\n 1.25, // 10-bit Bayer format\n 1.25, // 10-bit Bayer format\n 1.25, // 10-bit Bayer format\n 1.5, // 12-bit Bayer format\n 1.5, // 12-bit Bayer format\n 1.5, // 12-bit Bayer format\n 1.5, // 12-bit Bayer format\n 0, // uncompereed_max\n 0, // compressed_min\n 1, // jpeg\n 1, // png\n 0, // compressed_max\n 0 // invalid\n }"
+ },
+ "fmt_names": {
+ "type": "var",
+ "name": "",
+ "doc": {
+ "brief": "Image format string",
+ "maixpy": "maix.image.fmt_names",
+ "py_doc": "Image format string"
+ },
+ "value": "{\n \"RGB888\",\n \"BGR888\",\n \"RGBA8888\",\n \"BGRA8888\",\n \"RGB565\",\n \"BGR565\",\n \"YUV422SP\",\n \"YUV422P\",\n \"YVU420SP\",\n \"YUV420SP\",\n \"YVU420P\",\n \"YUV420P\",\n \"GRAYSCALE\",\n \"BGGR6\",\n \"GBRG6\",\n \"GRBG6\",\n \"RG6B6\",\n \"BGGR8\",\n \"GBRG8\",\n \"GRBG8\",\n \"RG6B8\",\n \"BGGR10\",\n \"GBRG10\",\n \"GRBG10\",\n \"RG6B10\",\n \"BGGR12\",\n \"GBRG12\",\n \"GRBG12\",\n \"RG6B12\",\n \"UNCOMPRESSED_MAX\",\n \"COMPRESSED_MIN\",\n \"JPEG\",\n \"PNG\",\n \"COMPRESSED_MAX\",\n \"INVALID\"\n }",
+ "static": false,
+ "readonly": true,
+ "def": "const std::vector fmt_names = {\n \"RGB888\",\n \"BGR888\",\n \"RGBA8888\",\n \"BGRA8888\",\n \"RGB565\",\n \"BGR565\",\n \"YUV422SP\",\n \"YUV422P\",\n \"YVU420SP\",\n \"YUV420SP\",\n \"YVU420P\",\n \"YUV420P\",\n \"GRAYSCALE\",\n \"BGGR6\",\n \"GBRG6\",\n \"GRBG6\",\n \"RG6B6\",\n \"BGGR8\",\n \"GBRG8\",\n \"GRBG8\",\n \"RG6B8\",\n \"BGGR10\",\n \"GBRG10\",\n \"GRBG10\",\n \"RG6B10\",\n \"BGGR12\",\n \"GBRG12\",\n \"GRBG12\",\n \"RG6B12\",\n \"UNCOMPRESSED_MAX\",\n \"COMPRESSED_MIN\",\n \"JPEG\",\n \"PNG\",\n \"COMPRESSED_MAX\",\n \"INVALID\"\n }"
+ },
+ "Size": {
+ "type": "class",
+ "name": "Size",
+ "doc": {
+ "brief": "Image size type",
+ "maixpy": "maix.image.Size",
+ "py_doc": "Image size type"
+ },
+ "members": {
+ "__init__": {
+ "type": "func",
+ "name": "Size",
+ "doc": {
+ "brief": "Construct a new Size object",
+ "param": {
+ "width": "image width",
+ "height": "image height"
+ },
+ "maixpy": "maix.image.Size.__init__",
+ "py_doc": "Construct a new Size object\n\nArgs:\n - width: image width\n - height: image height\n"
+ },
+ "args": [
+ [
+ "int",
+ "width",
+ "0"
+ ],
+ [
+ "int",
+ "height",
+ "0"
+ ]
+ ],
+ "ret_type": null,
+ "static": false,
+ "def": "Size(int width = 0, int height = 0)",
+ "py_def": "def __init__(self, width: int = 0, height: int = 0) -> None"
+ },
+ "width": {
+ "type": "func",
+ "name": "width",
+ "doc": {
+ "brief": "width of size",
+ "param": {
+ "width": "set new width, if not set, only return current width"
+ },
+ "maixpy": "maix.image.Size.width",
+ "py_doc": "width of size\n\nArgs:\n - width: set new width, if not set, only return current width\n"
+ },
+ "args": [
+ [
+ "int",
+ "width",
+ "-1"
+ ]
+ ],
+ "ret_type": "int",
+ "static": false,
+ "def": "int width(int width = -1)",
+ "py_def": "def width(self, width: int = -1) -> int"
+ },
+ "height": {
+ "type": "func",
+ "name": "height",
+ "doc": {
+ "brief": "height of size",
+ "param": {
+ "height": "set new height, if not set, only return current height"
+ },
+ "maixpy": "maix.image.Size.height",
+ "py_doc": "height of size\n\nArgs:\n - height: set new height, if not set, only return current height\n"
+ },
+ "args": [
+ [
+ "int",
+ "height",
+ "-1"
+ ]
+ ],
+ "ret_type": "int",
+ "static": false,
+ "def": "int height(int height = -1)",
+ "py_def": "def height(self, height: int = -1) -> int"
+ },
+ "__getitem__": {
+ "type": "func",
+ "name": "operator[]",
+ "doc": {
+ "brief": "Subscript operator",
+ "param": {
+ "index": "0 for width, 1 for height"
+ },
+ "return": "int& width or height",
+ "maixpy": "maix.image.Size.__getitem__",
+ "maixcdk": "maix.image.Size.[]",
+ "py_doc": "Subscript operator\n\nArgs:\n - index: 0 for width, 1 for height\n\n\nReturns: int& width or height\n"
+ },
+ "args": [
+ [
+ "int",
+ "index",
+ null
+ ]
+ ],
+ "ret_type": "int&",
+ "static": false,
+ "def": "int &operator[](int index)",
+ "py_def": "def __getitem__(self, index: int) -> int"
+ },
+ "__str__": {
+ "type": "func",
+ "name": "__str__",
+ "doc": {
+ "brief": "to string",
+ "maixpy": "maix.image.Size.__str__",
+ "py_doc": "to string"
+ },
+ "args": [],
+ "ret_type": "std::string",
+ "static": false,
+ "def": "std::string __str__()",
+ "py_def": "def __str__(self) -> str"
+ }
+ },
+ "def": "class Size"
+ },
+ "Fit": {
+ "type": "enum",
+ "name": "Fit",
+ "doc": {
+ "brief": "Object fit method",
+ "maixpy": "maix.image.Fit",
+ "py_doc": "Object fit method"
+ },
+ "values": [
+ [
+ "FIT_NONE",
+ "-1",
+ "no object fit, keep original"
+ ],
+ [
+ "FIT_FILL",
+ "0",
+ "width to new width, height to new height, may be stretch"
+ ],
+ [
+ "FIT_CONTAIN",
+ "",
+ "keep aspect ratio, fill blank area with black color"
+ ],
+ [
+ "FIT_COVER",
+ "",
+ "keep aspect ratio, crop image to fit new size"
+ ],
+ [
+ "FIT_MAX",
+ "",
+ ""
+ ]
+ ],
+ "def": "enum Fit\n {\n FIT_NONE = -1, // no object fit, keep original\n FIT_FILL = 0, // width to new width, height to new height, may be stretch\n FIT_CONTAIN, // keep aspect ratio, fill blank area with black color\n FIT_COVER, // keep aspect ratio, crop image to fit new size\n FIT_MAX\n }"
+ },
+ "ResizeMethod": {
+ "type": "enum",
+ "name": "ResizeMethod",
+ "doc": {
+ "brief": "Resize method",
+ "maixpy": "maix.image.ResizeMethod",
+ "py_doc": "Resize method"
+ },
+ "values": [
+ [
+ "NEAREST",
+ "0",
+ ""
+ ],
+ [
+ "BILINEAR",
+ "",
+ ""
+ ],
+ [
+ "BICUBIC",
+ "",
+ ""
+ ],
+ [
+ "AREA",
+ "",
+ ""
+ ],
+ [
+ "LANCZOS",
+ "",
+ ""
+ ],
+ [
+ "HAMMING",
+ "",
+ ""
+ ],
+ [
+ "RESIZE_METHOD_MAX",
+ "",
+ ""
+ ]
+ ],
+ "def": "enum ResizeMethod\n {\n NEAREST = 0,\n BILINEAR,\n BICUBIC,\n AREA,\n LANCZOS,\n HAMMING,\n RESIZE_METHOD_MAX\n }"
+ },
+ "ApriltagFamilies": {
+ "type": "enum",
+ "name": "ApriltagFamilies",
+ "doc": {
+ "brief": "Family of apriltag",
+ "maixpy": "maix.image.ApriltagFamilies",
+ "py_doc": "Family of apriltag"
+ },
+ "values": [
+ [
+ "TAG16H5",
+ "1",
+ ""
+ ],
+ [
+ "TAG25H7",
+ "2",
+ ""
+ ],
+ [
+ "TAG25H9",
+ "4",
+ ""
+ ],
+ [
+ "TAG36H10",
+ "8",
+ ""
+ ],
+ [
+ "TAG36H11",
+ "16",
+ ""
+ ],
+ [
+ "ARTOOLKIT",
+ "32",
+ ""
+ ]
+ ],
+ "def": "enum ApriltagFamilies\n {\n TAG16H5 = 1,\n TAG25H7 = 2,\n TAG25H9 = 4,\n TAG36H10 = 8,\n TAG36H11 = 16,\n ARTOOLKIT = 32\n }"
+ },
+ "TemplateMatch": {
+ "type": "enum",
+ "name": "TemplateMatch",
+ "doc": {
+ "brief": "Template match method",
+ "maixpy": "maix.image.TemplateMatch",
+ "py_doc": "Template match method"
+ },
+ "values": [
+ [
+ "SEARCH_EX",
+ "",
+ "Exhaustive search"
+ ],
+ [
+ "SEARCH_DS",
+ "",
+ "Diamond search"
+ ]
+ ],
+ "def": "enum TemplateMatch\n {\n SEARCH_EX, // Exhaustive search\n SEARCH_DS, // Diamond search\n }"
+ },
+ "CornerDetector": {
+ "type": "enum",
+ "name": "CornerDetector",
+ "doc": {
+ "brief": "CornerDetector class",
+ "maixpy": "maix.image.CornerDetector",
+ "py_doc": "CornerDetector class"
+ },
+ "values": [
+ [
+ "CORNER_FAST",
+ "",
+ ""
+ ],
+ [
+ "CORNER_AGAST",
+ "",
+ ""
+ ]
+ ],
+ "def": "enum CornerDetector\n {\n CORNER_FAST,\n CORNER_AGAST\n }"
+ },
+ "EdgeDetector": {
+ "type": "enum",
+ "name": "EdgeDetector",
+ "doc": {
+ "brief": "EdgeDetector class",
+ "maixpy": "maix.image.EdgeDetector",
+ "py_doc": "EdgeDetector class"
+ },
+ "values": [
+ [
+ "EDGE_CANNY",
+ "",
+ ""
+ ],
+ [
+ "EDGE_SIMPLE",
+ "",
+ ""
+ ]
+ ],
+ "def": "enum EdgeDetector\n {\n EDGE_CANNY,\n EDGE_SIMPLE,\n }"
+ },
+ "Line": {
+ "type": "class",
+ "name": "Line",
+ "doc": {
+ "brief": "Line class",
+ "maixpy": "maix.image.Line",
+ "py_doc": "Line class"
+ },
+ "members": {
+ "__init__": {
+ "type": "func",
+ "name": "Line",
+ "doc": {
+ "brief": "Line constructor",
+ "param": {
+ "x1": "coordinate x1 of the straight line",
+ "y1": "coordinate y1 of the straight line",
+ "x2": "coordinate x2 of the straight line",
+ "y2": "coordinate y2 of the straight line",
+ "magnitude": "magnitude of the straight line after Hough transformation",
+ "theta": "angle of the straight line after Hough transformation",
+ "rho": "p-value of the straight line after Hough transformation"
+ },
+ "maixpy": "maix.image.Line.__init__",
+ "py_doc": "Line constructor\n\nArgs:\n - x1: coordinate x1 of the straight line\n - y1: coordinate y1 of the straight line\n - x2: coordinate x2 of the straight line\n - y2: coordinate y2 of the straight line\n - magnitude: magnitude of the straight line after Hough transformation\n - theta: angle of the straight line after Hough transformation\n - rho: p-value of the straight line after Hough transformation\n"
+ },
+ "args": [
+ [
+ "int",
+ "x1",
+ null
+ ],
+ [
+ "int",
+ "y1",
+ null
+ ],
+ [
+ "int",
+ "x2",
+ null
+ ],
+ [
+ "int",
+ "y2",
+ null
+ ],
+ [
+ "int",
+ "magnitude",
+ "0"
+ ],
+ [
+ "int",
+ "theta",
+ "0"
+ ],
+ [
+ "int",
+ "rho",
+ "0"
+ ]
+ ],
+ "ret_type": null,
+ "static": false,
+ "def": "Line(int x1, int y1, int x2, int y2, int magnitude = 0, int theta = 0, int rho = 0)",
+ "py_def": "def __init__(self, x1: int, y1: int, x2: int, y2: int, magnitude: int = 0, theta: int = 0, rho: int = 0) -> None"
+ },
+ "__getitem__": {
+ "type": "func",
+ "name": "__getitem__",
+ "doc": {
+ "brief": "Subscript operator",
+ "param": {
+ "index": "[0] get x1 of line\n[1] get y1 of line\n[2] get x2 of line\n[3] get y2 of line\n[4] get length of line\n[5] get magnitude of the straight line after Hough transformation\n[6] get angle of the straight line after Hough transformation (0-179 degrees)\n[7] get p-value of the straight line after Hough transformation"
+ },
+ "return": "int&",
+ "maixpy": "maix.image.Line.__getitem__",
+ "py_doc": "Subscript operator\n\nArgs:\n - index: [0] get x1 of line\n[1] get y1 of line\n[2] get x2 of line\n[3] get y2 of line\n[4] get length of line\n[5] get magnitude of the straight line after Hough transformation\n[6] get angle of the straight line after Hough transformation (0-179 degrees)\n[7] get p-value of the straight line after Hough transformation\n\n\nReturns: int&\n"
+ },
+ "args": [
+ [
+ "int",
+ "index",
+ null
+ ]
+ ],
+ "ret_type": "int&",
+ "static": false,
+ "def": "int &__getitem__(int index)",
+ "py_def": "def __getitem__(self, index: int) -> int"
+ },
+ "x1": {
+ "type": "func",
+ "name": "x1",
+ "doc": {
+ "brief": "get x1 of line",
+ "return": "return x1 of the line, type is int",
+ "maixpy": "maix.image.Line.x1",
+ "py_doc": "get x1 of line\n\nReturns: return x1 of the line, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int x1()",
+ "py_def": "def x1(self) -> int"
+ },
+ "y1": {
+ "type": "func",
+ "name": "y1",
+ "doc": {
+ "brief": "get y1 of line",
+ "return": "return y1 of the line, type is int",
+ "maixpy": "maix.image.Line.y1",
+ "py_doc": "get y1 of line\n\nReturns: return y1 of the line, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int y1()",
+ "py_def": "def y1(self) -> int"
+ },
+ "x2": {
+ "type": "func",
+ "name": "x2",
+ "doc": {
+ "brief": "get x2 of line",
+ "return": "return x2 of the line, type is int",
+ "maixpy": "maix.image.Line.x2",
+ "py_doc": "get x2 of line\n\nReturns: return x2 of the line, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int x2()",
+ "py_def": "def x2(self) -> int"
+ },
+ "y2": {
+ "type": "func",
+ "name": "y2",
+ "doc": {
+ "brief": "get y2 of line",
+ "return": "return y2 of the line, type is int",
+ "maixpy": "maix.image.Line.y2",
+ "py_doc": "get y2 of line\n\nReturns: return y2 of the line, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int y2()",
+ "py_def": "def y2(self) -> int"
+ },
+ "length": {
+ "type": "func",
+ "name": "length",
+ "doc": {
+ "brief": "get length of line",
+ "return": "return length of the line, type is int",
+ "maixpy": "maix.image.Line.length",
+ "py_doc": "get length of line\n\nReturns: return length of the line, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int length()",
+ "py_def": "def length(self) -> int"
+ },
+ "magnitude": {
+ "type": "func",
+ "name": "magnitude",
+ "doc": {
+ "brief": "get magnitude of the straight line after Hough transformation",
+ "return": "return magnitude, type is int",
+ "maixpy": "maix.image.Line.magnitude",
+ "py_doc": "get magnitude of the straight line after Hough transformation\n\nReturns: return magnitude, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int magnitude()",
+ "py_def": "def magnitude(self) -> int"
+ },
+ "theta": {
+ "type": "func",
+ "name": "theta",
+ "doc": {
+ "brief": "get angle of the straight line after Hough transformation (0-179 degrees)",
+ "return": "return angle, type is int",
+ "maixpy": "maix.image.Line.theta",
+ "py_doc": "get angle of the straight line after Hough transformation (0-179 degrees)\n\nReturns: return angle, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int theta()",
+ "py_def": "def theta(self) -> int"
+ },
+ "rho": {
+ "type": "func",
+ "name": "rho",
+ "doc": {
+ "brief": "get p-value of the straight line after Hough transformation",
+ "return": "return p-value, type is int",
+ "maixpy": "maix.image.Line.rho",
+ "py_doc": "get p-value of the straight line after Hough transformation\n\nReturns: return p-value, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int rho()",
+ "py_def": "def rho(self) -> int"
+ }
+ },
+ "def": "class Line"
+ },
+ "Rect": {
+ "type": "class",
+ "name": "Rect",
+ "doc": {
+ "brief": "Rect class",
+ "maixpy": "maix.image.Rect",
+ "py_doc": "Rect class"
+ },
+ "members": {
+ "__init__": {
+ "type": "func",
+ "name": "Rect",
+ "doc": {
+ "brief": "Rect constructor",
+ "param": {
+ "corners": "corners of rect",
+ "x": "coordinate x of the straight line",
+ "y": "coordinate y of the straight line",
+ "w": "coordinate w of the straight line",
+ "h": "coordinate h of the straight line",
+ "magnitude": "magnitude of the straight line after Hough transformation"
+ },
+ "maixpy": "maix.image.Rect.__init__",
+ "py_doc": "Rect constructor\n\nArgs:\n - corners: corners of rect\n - x: coordinate x of the straight line\n - y: coordinate y of the straight line\n - w: coordinate w of the straight line\n - h: coordinate h of the straight line\n - magnitude: magnitude of the straight line after Hough transformation\n"
+ },
+ "args": [
+ [
+ "std::vector> &",
+ "corners",
+ null
+ ],
+ [
+ "int",
+ "x",
+ null
+ ],
+ [
+ "int",
+ "y",
+ null
+ ],
+ [
+ "int",
+ "w",
+ null
+ ],
+ [
+ "int",
+ "h",
+ null
+ ],
+ [
+ "int",
+ "magnitude",
+ "0"
+ ]
+ ],
+ "ret_type": null,
+ "static": false,
+ "def": "Rect(std::vector> &corners, int x, int y, int w, int h, int magnitude = 0)",
+ "py_def": "def __init__(self, corners: list[list[int]], x: int, y: int, w: int, h: int, magnitude: int = 0) -> None"
+ },
+ "__getitem__": {
+ "type": "func",
+ "name": "__getitem__",
+ "doc": {
+ "brief": "Subscript operator",
+ "param": {
+ "index": "[0] get x of rect\n[1] get y of rect\n[2] get w of rect\n[3] get h of rect\n[4] get magnitude of the straight line after Hough transformation"
+ },
+ "return": "int&",
+ "maixpy": "maix.image.Rect.__getitem__",
+ "py_doc": "Subscript operator\n\nArgs:\n - index: [0] get x of rect\n[1] get y of rect\n[2] get w of rect\n[3] get h of rect\n[4] get magnitude of the straight line after Hough transformation\n\n\nReturns: int&\n"
+ },
+ "args": [
+ [
+ "int",
+ "index",
+ null
+ ]
+ ],
+ "ret_type": "int&",
+ "static": false,
+ "def": "int &__getitem__(int index)",
+ "py_def": "def __getitem__(self, index: int) -> int"
+ },
+ "corners": {
+ "type": "func",
+ "name": "corners",
+ "doc": {
+ "brief": "get corners of rect",
+ "return": "return the coordinate of the rect.",
+ "maixpy": "maix.image.Rect.corners",
+ "py_doc": "get corners of rect\n\nReturns: return the coordinate of the rect.\n"
+ },
+ "args": [],
+ "ret_type": "std::vector>",
+ "static": false,
+ "def": "std::vector> corners()",
+ "py_def": "def corners(self) -> list[list[int]]"
+ },
+ "rect": {
+ "type": "func",
+ "name": "rect",
+ "doc": {
+ "brief": "get rectangle of rect",
+ "return": "return the rectangle of the rect. format is {x, y, w, h}, type is std::vector",
+ "maixpy": "maix.image.Rect.rect",
+ "py_doc": "get rectangle of rect\n\nReturns: return the rectangle of the rect. format is {x, y, w, h}, type is std::vector\n"
+ },
+ "args": [],
+ "ret_type": "std::vector",
+ "static": false,
+ "def": "std::vector rect()",
+ "py_def": "def rect(self) -> list[int]"
+ },
+ "x": {
+ "type": "func",
+ "name": "x",
+ "doc": {
+ "brief": "get x of rect",
+ "return": "return x of the rect, type is int",
+ "maixpy": "maix.image.Rect.x",
+ "py_doc": "get x of rect\n\nReturns: return x of the rect, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int x()",
+ "py_def": "def x(self) -> int"
+ },
+ "y": {
+ "type": "func",
+ "name": "y",
+ "doc": {
+ "brief": "get y of rect",
+ "return": "return y of the rect, type is int",
+ "maixpy": "maix.image.Rect.y",
+ "py_doc": "get y of rect\n\nReturns: return y of the rect, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int y()",
+ "py_def": "def y(self) -> int"
+ },
+ "w": {
+ "type": "func",
+ "name": "w",
+ "doc": {
+ "brief": "get w of rect",
+ "return": "return w of the rect, type is int",
+ "maixpy": "maix.image.Rect.w",
+ "py_doc": "get w of rect\n\nReturns: return w of the rect, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int w()",
+ "py_def": "def w(self) -> int"
+ },
+ "h": {
+ "type": "func",
+ "name": "h",
+ "doc": {
+ "brief": "get h of rect",
+ "return": "return h of the rect, type is int",
+ "maixpy": "maix.image.Rect.h",
+ "py_doc": "get h of rect\n\nReturns: return h of the rect, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int h()",
+ "py_def": "def h(self) -> int"
+ },
+ "magnitude": {
+ "type": "func",
+ "name": "magnitude",
+ "doc": {
+ "brief": "get magnitude of the straight line after Hough transformation",
+ "return": "return magnitude, type is int",
+ "maixpy": "maix.image.Rect.magnitude",
+ "py_doc": "get magnitude of the straight line after Hough transformation\n\nReturns: return magnitude, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int magnitude()",
+ "py_def": "def magnitude(self) -> int"
+ }
+ },
+ "def": "class Rect"
+ },
+ "Circle": {
+ "type": "class",
+ "name": "Circle",
+ "doc": {
+ "brief": "circle class",
+ "maixpy": "maix.image.Circle",
+ "py_doc": "circle class"
+ },
+ "members": {
+ "__init__": {
+ "type": "func",
+ "name": "Circle",
+ "doc": {
+ "brief": "Circle constructor",
+ "param": {
+ "x": "coordinate x of the circle",
+ "y": "coordinate y of the circle",
+ "r": "coordinate r of the circle",
+ "magnitude": "coordinate y2 of the straight line"
+ },
+ "maixpy": "maix.image.Circle.__init__",
+ "py_doc": "Circle constructor\n\nArgs:\n - x: coordinate x of the circle\n - y: coordinate y of the circle\n - r: coordinate r of the circle\n - magnitude: coordinate y2 of the straight line\n"
+ },
+ "args": [
+ [
+ "int",
+ "x",
+ null
+ ],
+ [
+ "int",
+ "y",
+ null
+ ],
+ [
+ "int",
+ "r",
+ null
+ ],
+ [
+ "int",
+ "magnitude",
+ null
+ ]
+ ],
+ "ret_type": null,
+ "static": false,
+ "def": "Circle(int x, int y, int r, int magnitude)",
+ "py_def": "def __init__(self, x: int, y: int, r: int, magnitude: int) -> None"
+ },
+ "__getitem__": {
+ "type": "func",
+ "name": "__getitem__",
+ "doc": {
+ "brief": "Subscript operator",
+ "param": {
+ "index": "[0] get x of circle\n[1] get y of circle\n[2] get r of circle\n[3] get magnitude of the circle after Hough transformation"
+ },
+ "return": "int&",
+ "maixpy": "maix.image.Circle.__getitem__",
+ "py_doc": "Subscript operator\n\nArgs:\n - index: [0] get x of circle\n[1] get y of circle\n[2] get r of circle\n[3] get magnitude of the circle after Hough transformation\n\n\nReturns: int&\n"
+ },
+ "args": [
+ [
+ "int",
+ "index",
+ null
+ ]
+ ],
+ "ret_type": "int&",
+ "static": false,
+ "def": "int &__getitem__(int index)",
+ "py_def": "def __getitem__(self, index: int) -> int"
+ },
+ "x": {
+ "type": "func",
+ "name": "x",
+ "doc": {
+ "brief": "get x of circle",
+ "return": "return x of the circle, type is int",
+ "maixpy": "maix.image.Circle.x",
+ "py_doc": "get x of circle\n\nReturns: return x of the circle, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int x()",
+ "py_def": "def x(self) -> int"
+ },
+ "y": {
+ "type": "func",
+ "name": "y",
+ "doc": {
+ "brief": "get y of circle",
+ "return": "return y of the circle, type is int",
+ "maixpy": "maix.image.Circle.y",
+ "py_doc": "get y of circle\n\nReturns: return y of the circle, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int y()",
+ "py_def": "def y(self) -> int"
+ },
+ "r": {
+ "type": "func",
+ "name": "r",
+ "doc": {
+ "brief": "get r of circle",
+ "return": "return r of the circle, type is int",
+ "maixpy": "maix.image.Circle.r",
+ "py_doc": "get r of circle\n\nReturns: return r of the circle, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int r()",
+ "py_def": "def r(self) -> int"
+ },
+ "magnitude": {
+ "type": "func",
+ "name": "magnitude",
+ "doc": {
+ "brief": "get magnitude of the circle after Hough transformation",
+ "return": "return magnitude, type is int",
+ "maixpy": "maix.image.Circle.magnitude",
+ "py_doc": "get magnitude of the circle after Hough transformation\n\nReturns: return magnitude, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int magnitude()",
+ "py_def": "def magnitude(self) -> int"
+ }
+ },
+ "def": "class Circle"
+ },
+ "Blob": {
+ "type": "class",
+ "name": "Blob",
+ "doc": {
+ "brief": "Blob class",
+ "maixpy": "maix.image.Blob",
+ "py_doc": "Blob class"
+ },
+ "members": {
+ "__init__": {
+ "type": "func",
+ "name": "Blob",
+ "doc": {
+ "brief": "Blob constructor",
+ "param": {
+ "rect": "blob rect, type is std::vector",
+ "corners": "blob corners, type is std::vector>",
+ "mini_corners": "blob mini_corners, type is std::vector>",
+ "cx": "blob center x, type is float",
+ "cy": "blob center y, type is float",
+ "pixels": "blob pixels, type is int",
+ "rotation": "blob rotation, type is float",
+ "code": "blob code, type is int",
+ "count": "blob count, type is int",
+ "perimeter": "blob perimeter, type is int",
+ "roundness": "blob roundness, type is float",
+ "x_hist_bins": "blob x_hist_bins, type is std::vector",
+ "y_hist_bins": "blob y_hist_bins, type is std::vector"
+ },
+ "maixpy": "maix.image.Blob.__init__",
+ "py_doc": "Blob constructor\n\nArgs:\n - rect: blob rect, type is std::vector\n - corners: blob corners, type is std::vector>\n - mini_corners: blob mini_corners, type is std::vector>\n - cx: blob center x, type is float\n - cy: blob center y, type is float\n - pixels: blob pixels, type is int\n - rotation: blob rotation, type is float\n - code: blob code, type is int\n - count: blob count, type is int\n - perimeter: blob perimeter, type is int\n - roundness: blob roundness, type is float\n - x_hist_bins: blob x_hist_bins, type is std::vector\n - y_hist_bins: blob y_hist_bins, type is std::vector\n"
+ },
+ "args": [
+ [
+ "std::vector &",
+ "rect",
+ null
+ ],
+ [
+ "std::vector> &",
+ "corners",
+ null
+ ],
+ [
+ "std::vector> &",
+ "mini_corners",
+ null
+ ],
+ [
+ "float",
+ "cx",
+ null
+ ],
+ [
+ "float",
+ "cy",
+ null
+ ],
+ [
+ "int",
+ "pixels",
+ null
+ ],
+ [
+ "float",
+ "rotation",
+ null
+ ],
+ [
+ "int",
+ "code",
+ null
+ ],
+ [
+ "int",
+ "count",
+ null
+ ],
+ [
+ "int",
+ "perimeter",
+ null
+ ],
+ [
+ "float",
+ "roundness",
+ null
+ ],
+ [
+ "std::vector &",
+ "x_hist_bins",
+ null
+ ],
+ [
+ "std::vector &",
+ "y_hist_bins",
+ null
+ ]
+ ],
+ "ret_type": null,
+ "static": false,
+ "def": "Blob(std::vector &rect, std::vector> &corners, std::vector> &mini_corners,float cx, float cy, int pixels, float rotation, int code, int count, int perimeter, float roundness, std::vector &x_hist_bins, std::vector &y_hist_bins)",
+ "py_def": "def __init__(self, rect: list[int], corners: list[list[int]], mini_corners: list[list[int]], cx: float, cy: float, pixels: int, rotation: float, code: int, count: int, perimeter: int, roundness: float, x_hist_bins: list[int], y_hist_bins: list[int]) -> None"
+ },
+ "__getitem__": {
+ "type": "func",
+ "name": "__getitem__",
+ "doc": {
+ "brief": "Subscript operator",
+ "param": {
+ "index": "[0] Returns the blob\u2019s bounding box x coordinate\n[1] Returns the blob\u2019s bounding box y coordinate\n[2] Returns the blob\u2019s bounding box w coordinate\n[3] Returns the blob\u2019s bounding box h coordinate\n[4] Returns the number of pixels that are part of this blob\n[5] Returns the centroid x position of the blob\n[6] Returns the centroid y position of the blob"
+ },
+ "return": "int& width or height",
+ "maixpy": "maix.image.Blob.__getitem__",
+ "py_doc": "Subscript operator\n\nArgs:\n - index: [0] Returns the blob\u2019s bounding box x coordinate\n[1] Returns the blob\u2019s bounding box y coordinate\n[2] Returns the blob\u2019s bounding box w coordinate\n[3] Returns the blob\u2019s bounding box h coordinate\n[4] Returns the number of pixels that are part of this blob\n[5] Returns the centroid x position of the blob\n[6] Returns the centroid y position of the blob\n\n\nReturns: int& width or height\n"
+ },
+ "args": [
+ [
+ "int",
+ "index",
+ null
+ ]
+ ],
+ "ret_type": "int&",
+ "static": false,
+ "def": "int &__getitem__(int index)",
+ "py_def": "def __getitem__(self, index: int) -> int"
+ },
+ "corners": {
+ "type": "func",
+ "name": "corners",
+ "doc": {
+ "brief": "get blob corners",
+ "return": "Returns a list of 4 (x,y) tuples of the 4 corners of the object.\n(x0, y0)___________(x1, y1)\n| |\n| |\n| |\n|___________|\n(x3, y3) (x2, y2)\nnote: the order of corners may change",
+ "maixpy": "maix.image.Blob.corners",
+ "py_doc": "get blob corners\n\nReturns: Returns a list of 4 (x,y) tuples of the 4 corners of the object.\n(x0, y0)___________(x1, y1)\n| |\n| |\n| |\n|___________|\n(x3, y3) (x2, y2)\nnote: the order of corners may change\n"
+ },
+ "args": [],
+ "ret_type": "std::vector>",
+ "static": false,
+ "def": "std::vector> corners()",
+ "py_def": "def corners(self) -> list[list[int]]"
+ },
+ "mini_corners": {
+ "type": "func",
+ "name": "mini_corners",
+ "doc": {
+ "brief": "get blob mini corners",
+ "return": "Returns a list of 4 (x,y) tuples of the 4 corners than bound the min area rectangle of the blob.\n(x0, y0)___________(x1, y1)\n| |\n| |\n| |\n|___________|\n(x3, y3) (x2, y2)\nnote: the order of corners may change",
+ "maixpy": "maix.image.Blob.mini_corners",
+ "py_doc": "get blob mini corners\n\nReturns: Returns a list of 4 (x,y) tuples of the 4 corners than bound the min area rectangle of the blob.\n(x0, y0)___________(x1, y1)\n| |\n| |\n| |\n|___________|\n(x3, y3) (x2, y2)\nnote: the order of corners may change\n"
+ },
+ "args": [],
+ "ret_type": "std::vector>",
+ "static": false,
+ "def": "std::vector> mini_corners()",
+ "py_def": "def mini_corners(self) -> list[list[int]]"
+ },
+ "rect": {
+ "type": "func",
+ "name": "rect",
+ "doc": {
+ "brief": "get blob rect",
+ "return": "Returns the center coordinates and width and height of the rectangle. format is (x, y, w, h)\nw\n(x, y) ___________\n| |\n| | h\n| |\n|___________|",
+ "maixpy": "maix.image.Blob.rect",
+ "py_doc": "get blob rect\n\nReturns: Returns the center coordinates and width and height of the rectangle. format is (x, y, w, h)\nw\n(x, y) ___________\n| |\n| | h\n| |\n|___________|\n"
+ },
+ "args": [],
+ "ret_type": "std::vector",
+ "static": false,
+ "def": "std::vector rect()",
+ "py_def": "def rect(self) -> list[int]"
+ },
+ "x": {
+ "type": "func",
+ "name": "x",
+ "doc": {
+ "brief": "get blob x of the upper left coordinate",
+ "return": "Returns the x coordinate of the upper left corner of the rectangle.",
+ "maixpy": "maix.image.Blob.x",
+ "py_doc": "get blob x of the upper left coordinate\n\nReturns: Returns the x coordinate of the upper left corner of the rectangle.\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int x()",
+ "py_def": "def x(self) -> int"
+ },
+ "y": {
+ "type": "func",
+ "name": "y",
+ "doc": {
+ "brief": "get blob y of the upper left coordinate",
+ "return": "Returns the y coordinate of the upper left corner of the rectangle.",
+ "maixpy": "maix.image.Blob.y",
+ "py_doc": "get blob y of the upper left coordinate\n\nReturns: Returns the y coordinate of the upper left corner of the rectangle.\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int y()",
+ "py_def": "def y(self) -> int"
+ },
+ "w": {
+ "type": "func",
+ "name": "w",
+ "doc": {
+ "brief": "get blob width",
+ "return": "Returns the blob\u2019s bounding box w coordinate",
+ "maixpy": "maix.image.Blob.w",
+ "py_doc": "get blob width\n\nReturns: Returns the blob\u2019s bounding box w coordinate\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int w()",
+ "py_def": "def w(self) -> int"
+ },
+ "h": {
+ "type": "func",
+ "name": "h",
+ "doc": {
+ "brief": "get blob height",
+ "return": "Returns the blob\u2019s bounding box h coordinate",
+ "maixpy": "maix.image.Blob.h",
+ "py_doc": "get blob height\n\nReturns: Returns the blob\u2019s bounding box h coordinate\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int h()",
+ "py_def": "def h(self) -> int"
+ },
+ "pixels": {
+ "type": "func",
+ "name": "pixels",
+ "doc": {
+ "brief": "get blob pixels",
+ "return": "Returns the number of pixels that are part of this blob.",
+ "maixpy": "maix.image.Blob.pixels",
+ "py_doc": "get blob pixels\n\nReturns: Returns the number of pixels that are part of this blob.\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int pixels()",
+ "py_def": "def pixels(self) -> int"
+ },
+ "cx": {
+ "type": "func",
+ "name": "cx",
+ "doc": {
+ "brief": "get blob center x",
+ "return": "Returns the centroid x position of the blob",
+ "maixpy": "maix.image.Blob.cx",
+ "py_doc": "get blob center x\n\nReturns: Returns the centroid x position of the blob\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int cx()",
+ "py_def": "def cx(self) -> int"
+ },
+ "cy": {
+ "type": "func",
+ "name": "cy",
+ "doc": {
+ "brief": "get blob center y",
+ "return": "Returns the centroid y position of the blob",
+ "maixpy": "maix.image.Blob.cy",
+ "py_doc": "get blob center y\n\nReturns: Returns the centroid y position of the blob\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int cy()",
+ "py_def": "def cy(self) -> int"
+ },
+ "cxf": {
+ "type": "func",
+ "name": "cxf",
+ "doc": {
+ "brief": "get blob center x",
+ "return": "Returns the centroid x position of the blob",
+ "maixpy": "maix.image.Blob.cxf",
+ "py_doc": "get blob center x\n\nReturns: Returns the centroid x position of the blob\n"
+ },
+ "args": [],
+ "ret_type": "float",
+ "static": false,
+ "def": "float cxf()",
+ "py_def": "def cxf(self) -> float"
+ },
+ "cyf": {
+ "type": "func",
+ "name": "cyf",
+ "doc": {
+ "brief": "get blob center y",
+ "return": "Returns the centroid y position of the blob",
+ "maixpy": "maix.image.Blob.cyf",
+ "py_doc": "get blob center y\n\nReturns: Returns the centroid y position of the blob\n"
+ },
+ "args": [],
+ "ret_type": "float",
+ "static": false,
+ "def": "float cyf()",
+ "py_def": "def cyf(self) -> float"
+ },
+ "rotation": {
+ "type": "func",
+ "name": "rotation",
+ "doc": {
+ "brief": "get blob rotation",
+ "return": "Returns the rotation of the blob in radians (float). If the blob is like a pencil or pen this value will be unique for 0-180 degrees.",
+ "maixpy": "maix.image.Blob.rotation",
+ "py_doc": "get blob rotation\n\nReturns: Returns the rotation of the blob in radians (float). If the blob is like a pencil or pen this value will be unique for 0-180 degrees.\n"
+ },
+ "args": [],
+ "ret_type": "float",
+ "static": false,
+ "def": "float rotation()",
+ "py_def": "def rotation(self) -> float"
+ },
+ "rotation_rad": {
+ "type": "func",
+ "name": "rotation_rad",
+ "doc": {
+ "brief": "get blob rotation_rad",
+ "return": "Returns the rotation of the blob in radians",
+ "maixpy": "maix.image.Blob.rotation_rad",
+ "py_doc": "get blob rotation_rad\n\nReturns: Returns the rotation of the blob in radians\n"
+ },
+ "args": [],
+ "ret_type": "float",
+ "static": false,
+ "def": "float rotation_rad()",
+ "py_def": "def rotation_rad(self) -> float"
+ },
+ "rotation_deg": {
+ "type": "func",
+ "name": "rotation_deg",
+ "doc": {
+ "brief": "get blob rotation_deg",
+ "return": "Returns the rotation of the blob in degrees.",
+ "maixpy": "maix.image.Blob.rotation_deg",
+ "py_doc": "get blob rotation_deg\n\nReturns: Returns the rotation of the blob in degrees.\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int rotation_deg()",
+ "py_def": "def rotation_deg(self) -> int"
+ },
+ "code": {
+ "type": "func",
+ "name": "code",
+ "doc": {
+ "brief": "get blob code",
+ "return": "Returns a 32-bit binary number with a bit set in it for each color threshold that\u2019s part of this blob",
+ "maixpy": "maix.image.Blob.code",
+ "py_doc": "get blob code\n\nReturns: Returns a 32-bit binary number with a bit set in it for each color threshold that\u2019s part of this blob\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int code()",
+ "py_def": "def code(self) -> int"
+ },
+ "count": {
+ "type": "func",
+ "name": "count",
+ "doc": {
+ "brief": "get blob count",
+ "return": "Returns the number of blobs merged into this blob.",
+ "maixpy": "maix.image.Blob.count",
+ "py_doc": "get blob count\n\nReturns: Returns the number of blobs merged into this blob.\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int count()",
+ "py_def": "def count(self) -> int"
+ },
+ "perimeter": {
+ "type": "func",
+ "name": "perimeter",
+ "doc": {
+ "brief": "get blob merge_cnt",
+ "return": "Returns the number of pixels on this blob\u2019s perimeter.",
+ "maixpy": "maix.image.Blob.perimeter",
+ "py_doc": "get blob merge_cnt\n\nReturns: Returns the number of pixels on this blob\u2019s perimeter.\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int perimeter()",
+ "py_def": "def perimeter(self) -> int"
+ },
+ "roundness": {
+ "type": "func",
+ "name": "roundness",
+ "doc": {
+ "brief": "get blob roundness",
+ "return": "Returns a value between 0 and 1 representing how round the object is",
+ "maixpy": "maix.image.Blob.roundness",
+ "py_doc": "get blob roundness\n\nReturns: Returns a value between 0 and 1 representing how round the object is\n"
+ },
+ "args": [],
+ "ret_type": "float",
+ "static": false,
+ "def": "float roundness()",
+ "py_def": "def roundness(self) -> float"
+ },
+ "elongation": {
+ "type": "func",
+ "name": "elongation",
+ "doc": {
+ "brief": "get blob elongation",
+ "returnReturns": "a value between 0 and 1 representing how long (not round) the object is",
+ "maixpy": "maix.image.Blob.elongation",
+ "py_doc": "get blob elongation"
+ },
+ "args": [],
+ "ret_type": "float",
+ "static": false,
+ "def": "float elongation()",
+ "py_def": "def elongation(self) -> float"
+ },
+ "area": {
+ "type": "func",
+ "name": "area",
+ "doc": {
+ "brief": "get blob area",
+ "return": "Returns the area of the bounding box around the blob",
+ "maixpy": "maix.image.Blob.area",
+ "py_doc": "get blob area\n\nReturns: Returns the area of the bounding box around the blob\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int area()",
+ "py_def": "def area(self) -> int"
+ },
+ "density": {
+ "type": "func",
+ "name": "density",
+ "doc": {
+ "brief": "get blob density",
+ "return": "Returns the density ratio of the blob",
+ "maixpy": "maix.image.Blob.density",
+ "py_doc": "get blob density\n\nReturns: Returns the density ratio of the blob\n"
+ },
+ "args": [],
+ "ret_type": "float",
+ "static": false,
+ "def": "float density()",
+ "py_def": "def density(self) -> float"
+ },
+ "extent": {
+ "type": "func",
+ "name": "extent",
+ "doc": {
+ "brief": "Alias for blob.density()",
+ "return": "Returns the density ratio of the blob",
+ "maixpy": "maix.image.Blob.extent",
+ "py_doc": "Alias for blob.density()\n\nReturns: Returns the density ratio of the blob\n"
+ },
+ "args": [],
+ "ret_type": "float",
+ "static": false,
+ "def": "float extent()",
+ "py_def": "def extent(self) -> float"
+ },
+ "compactness": {
+ "type": "func",
+ "name": "compactness",
+ "doc": {
+ "brief": "get blob compactness",
+ "return": "Returns the compactness ratio of the blob",
+ "maixpy": "maix.image.Blob.compactness",
+ "py_doc": "get blob compactness\n\nReturns: Returns the compactness ratio of the blob\n"
+ },
+ "args": [],
+ "ret_type": "float",
+ "static": false,
+ "def": "float compactness()",
+ "py_def": "def compactness(self) -> float"
+ },
+ "solidity": {
+ "type": "func",
+ "name": "solidity",
+ "doc": {
+ "brief": "get blob solidity",
+ "return": "Returns the solidity ratio of the blob",
+ "maixpy": "maix.image.Blob.solidity",
+ "py_doc": "get blob solidity\n\nReturns: Returns the solidity ratio of the blob\n"
+ },
+ "args": [],
+ "ret_type": "float",
+ "static": false,
+ "def": "float solidity()",
+ "py_def": "def solidity(self) -> float"
+ },
+ "convexity": {
+ "type": "func",
+ "name": "convexity",
+ "doc": {
+ "brief": "get blob convexity",
+ "return": "Returns a value between 0 and 1 representing how convex the object is",
+ "maixpy": "maix.image.Blob.convexity",
+ "py_doc": "get blob convexity\n\nReturns: Returns a value between 0 and 1 representing how convex the object is\n"
+ },
+ "args": [],
+ "ret_type": "float",
+ "static": false,
+ "def": "float convexity()",
+ "py_def": "def convexity(self) -> float"
+ },
+ "x_hist_bins": {
+ "type": "func",
+ "name": "x_hist_bins",
+ "doc": {
+ "brief": "get blob x_hist_bins",
+ "return": "Returns the x_hist_bins of the blob",
+ "maixpy": "maix.image.Blob.x_hist_bins",
+ "py_doc": "get blob x_hist_bins\n\nReturns: Returns the x_hist_bins of the blob\n"
+ },
+ "args": [],
+ "ret_type": "std::vector",
+ "static": false,
+ "def": "std::vector x_hist_bins()",
+ "py_def": "def x_hist_bins(self) -> list[int]"
+ },
+ "y_hist_bins": {
+ "type": "func",
+ "name": "y_hist_bins",
+ "doc": {
+ "brief": "get blob y_hist_bins",
+ "return": "Returns the y_hist_bins of the blob",
+ "maixpy": "maix.image.Blob.y_hist_bins",
+ "py_doc": "get blob y_hist_bins\n\nReturns: Returns the y_hist_bins of the blob\n"
+ },
+ "args": [],
+ "ret_type": "std::vector",
+ "static": false,
+ "def": "std::vector y_hist_bins()",
+ "py_def": "def y_hist_bins(self) -> list[int]"
+ },
+ "major_axis_line": {
+ "type": "func",
+ "name": "major_axis_line",
+ "doc": {
+ "brief": "get blob major_axis_line",
+ "return": "Returns a line tuple (x1, y1, x2, y2) of the minor axis of the blob.",
+ "maixpy": "maix.image.Blob.major_axis_line",
+ "py_doc": "get blob major_axis_line\n\nReturns: Returns a line tuple (x1, y1, x2, y2) of the minor axis of the blob.\n"
+ },
+ "args": [],
+ "ret_type": "std::vector",
+ "static": false,
+ "def": "std::vector major_axis_line()",
+ "py_def": "def major_axis_line(self) -> list[int]"
+ },
+ "minor_axis_line": {
+ "type": "func",
+ "name": "minor_axis_line",
+ "doc": {
+ "brief": "get blob minor_axis_line",
+ "return": "Returns a line tuple (x1, y1, x2, y2) of the minor axis of the blob.",
+ "maixpy": "maix.image.Blob.minor_axis_line",
+ "py_doc": "get blob minor_axis_line\n\nReturns: Returns a line tuple (x1, y1, x2, y2) of the minor axis of the blob.\n"
+ },
+ "args": [],
+ "ret_type": "std::vector",
+ "static": false,
+ "def": "std::vector minor_axis_line()",
+ "py_def": "def minor_axis_line(self) -> list[int]"
+ },
+ "enclosing_circle": {
+ "type": "func",
+ "name": "enclosing_circle",
+ "doc": {
+ "brief": "get blob enclosing_circle",
+ "return": "Returns a circle tuple (x, y, r) of the circle that encloses the min area rectangle of a blob.",
+ "maixpy": "maix.image.Blob.enclosing_circle",
+ "py_doc": "get blob enclosing_circle\n\nReturns: Returns a circle tuple (x, y, r) of the circle that encloses the min area rectangle of a blob.\n"
+ },
+ "args": [],
+ "ret_type": "std::vector",
+ "static": false,
+ "def": "std::vector enclosing_circle()",
+ "py_def": "def enclosing_circle(self) -> list[int]"
+ },
+ "enclosed_ellipse": {
+ "type": "func",
+ "name": "enclosed_ellipse",
+ "doc": {
+ "brief": "get blob enclosed_ellipse",
+ "return": "Returns an ellipse tuple (x, y, rx, ry, rotation) of the ellipse that fits inside of the min area rectangle of a blob.",
+ "maixpy": "maix.image.Blob.enclosed_ellipse",
+ "py_doc": "get blob enclosed_ellipse\n\nReturns: Returns an ellipse tuple (x, y, rx, ry, rotation) of the ellipse that fits inside of the min area rectangle of a blob.\n"
+ },
+ "args": [],
+ "ret_type": "std::vector",
+ "static": false,
+ "def": "std::vector enclosed_ellipse()",
+ "py_def": "def enclosed_ellipse(self) -> list[int]"
+ }
+ },
+ "def": "class Blob"
+ },
+ "QRCode": {
+ "type": "class",
+ "name": "QRCode",
+ "doc": {
+ "brief": "QRCode class",
+ "maixpy": "maix.image.QRCode",
+ "py_doc": "QRCode class"
+ },
+ "members": {
+ "__init__": {
+ "type": "func",
+ "name": "QRCode",
+ "doc": {
+ "brief": "QRCode constructor",
+ "param": {
+ "rect": "rect of corners, type is std::vector",
+ "corners": "corners of QRCode",
+ "payload": "payload of the QRCode",
+ "version": "version of the QRCode",
+ "ecc_level": "ecc_level of the QRCode",
+ "mask": "mask of the QRCode",
+ "data_type": "data_type of the QRCode",
+ "eci": "eci of the QRCode"
+ },
+ "maixpy": "maix.image.QRCode.__init__",
+ "py_doc": "QRCode constructor\n\nArgs:\n - rect: rect of corners, type is std::vector\n - corners: corners of QRCode\n - payload: payload of the QRCode\n - version: version of the QRCode\n - ecc_level: ecc_level of the QRCode\n - mask: mask of the QRCode\n - data_type: data_type of the QRCode\n - eci: eci of the QRCode\n"
+ },
+ "args": [
+ [
+ "std::vector &",
+ "rect",
+ null
+ ],
+ [
+ "std::vector> &",
+ "corners",
+ null
+ ],
+ [
+ "std::string &",
+ "payload",
+ null
+ ],
+ [
+ "int",
+ "version",
+ null
+ ],
+ [
+ "int",
+ "ecc_level",
+ null
+ ],
+ [
+ "int",
+ "mask",
+ null
+ ],
+ [
+ "int",
+ "data_type",
+ null
+ ],
+ [
+ "int",
+ "eci",
+ null
+ ]
+ ],
+ "ret_type": null,
+ "static": false,
+ "def": "QRCode(std::vector &rect, std::vector> &corners, std::string &payload, int version, int ecc_level, int mask, int data_type, int eci)",
+ "py_def": "def __init__(self, rect: list[int], corners: list[list[int]], payload: str, version: int, ecc_level: int, mask: int, data_type: int, eci: int) -> None"
+ },
+ "__getitem__": {
+ "type": "func",
+ "name": "__getitem__",
+ "doc": {
+ "brief": "Subscript operator",
+ "param": {
+ "index": "[0] Returns the qrcode\u2019s bounding box x coordinate\n[1] Returns the qrcode\u2019s bounding box y coordinate\n[2] Returns the qrcode\u2019s bounding box w coordinate\n[3] Returns the qrcode\u2019s bounding box h coordinate\n[4] Not support this index, try to use payload() method\n[5] Returns the version of qrcode\n[6] Returns the error correction level of qrcode\n[7] Returns the mask of qrcode\n[8] Returns the datatype of qrcode\n[9] Returns the eci of qrcode"
+ },
+ "return": "int&",
+ "maixpy": "maix.image.QRCode.__getitem__",
+ "py_doc": "Subscript operator\n\nArgs:\n - index: [0] Returns the qrcode\u2019s bounding box x coordinate\n[1] Returns the qrcode\u2019s bounding box y coordinate\n[2] Returns the qrcode\u2019s bounding box w coordinate\n[3] Returns the qrcode\u2019s bounding box h coordinate\n[4] Not support this index, try to use payload() method\n[5] Returns the version of qrcode\n[6] Returns the error correction level of qrcode\n[7] Returns the mask of qrcode\n[8] Returns the datatype of qrcode\n[9] Returns the eci of qrcode\n\n\nReturns: int&\n"
+ },
+ "args": [
+ [
+ "int",
+ "index",
+ null
+ ]
+ ],
+ "ret_type": "int&",
+ "static": false,
+ "def": "int &__getitem__(int index)",
+ "py_def": "def __getitem__(self, index: int) -> int"
+ },
+ "corners": {
+ "type": "func",
+ "name": "corners",
+ "doc": {
+ "brief": "get coordinate of QRCode",
+ "return": "return the coordinate of the QRCode.",
+ "maixpy": "maix.image.QRCode.corners",
+ "py_doc": "get coordinate of QRCode\n\nReturns: return the coordinate of the QRCode.\n"
+ },
+ "args": [],
+ "ret_type": "std::vector>",
+ "static": false,
+ "def": "std::vector> corners()",
+ "py_def": "def corners(self) -> list[list[int]]"
+ },
+ "rect": {
+ "type": "func",
+ "name": "rect",
+ "doc": {
+ "brief": "get rectangle of QRCode",
+ "return": "return the rectangle of the QRCode. format is {x, y, w, h}, type is std::vector",
+ "maixpy": "maix.image.QRCode.rect",
+ "py_doc": "get rectangle of QRCode\n\nReturns: return the rectangle of the QRCode. format is {x, y, w, h}, type is std::vector\n"
+ },
+ "args": [],
+ "ret_type": "std::vector",
+ "static": false,
+ "def": "std::vector rect()",
+ "py_def": "def rect(self) -> list[int]"
+ },
+ "x": {
+ "type": "func",
+ "name": "x",
+ "doc": {
+ "brief": "get x of QRCode",
+ "return": "return x of the QRCode, type is int",
+ "maixpy": "maix.image.QRCode.x",
+ "py_doc": "get x of QRCode\n\nReturns: return x of the QRCode, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int x()",
+ "py_def": "def x(self) -> int"
+ },
+ "y": {
+ "type": "func",
+ "name": "y",
+ "doc": {
+ "brief": "get y of QRCode",
+ "return": "return y of the QRCode, type is int",
+ "maixpy": "maix.image.QRCode.y",
+ "py_doc": "get y of QRCode\n\nReturns: return y of the QRCode, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int y()",
+ "py_def": "def y(self) -> int"
+ },
+ "w": {
+ "type": "func",
+ "name": "w",
+ "doc": {
+ "brief": "get w of QRCode",
+ "return": "return w of the QRCode, type is int",
+ "maixpy": "maix.image.QRCode.w",
+ "py_doc": "get w of QRCode\n\nReturns: return w of the QRCode, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int w()",
+ "py_def": "def w(self) -> int"
+ },
+ "h": {
+ "type": "func",
+ "name": "h",
+ "doc": {
+ "brief": "get h of QRCode",
+ "return": "return h of the QRCode, type is int",
+ "maixpy": "maix.image.QRCode.h",
+ "py_doc": "get h of QRCode\n\nReturns: return h of the QRCode, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int h()",
+ "py_def": "def h(self) -> int"
+ },
+ "payload": {
+ "type": "func",
+ "name": "payload",
+ "doc": {
+ "brief": "get QRCode payload",
+ "return": "return area of the QRCode",
+ "maixpy": "maix.image.QRCode.payload",
+ "py_doc": "get QRCode payload\n\nReturns: return area of the QRCode\n"
+ },
+ "args": [],
+ "ret_type": "std::string",
+ "static": false,
+ "def": "std::string payload()",
+ "py_def": "def payload(self) -> str"
+ },
+ "version": {
+ "type": "func",
+ "name": "version",
+ "doc": {
+ "brief": "get QRCode version",
+ "return": "return version of the QRCode",
+ "maixpy": "maix.image.QRCode.version",
+ "py_doc": "get QRCode version\n\nReturns: return version of the QRCode\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int version()",
+ "py_def": "def version(self) -> int"
+ },
+ "ecc_level": {
+ "type": "func",
+ "name": "ecc_level",
+ "doc": {
+ "brief": "get QRCode error correction level",
+ "return": "return error correction level of the QRCode",
+ "maixpy": "maix.image.QRCode.ecc_level",
+ "py_doc": "get QRCode error correction level\n\nReturns: return error correction level of the QRCode\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int ecc_level()",
+ "py_def": "def ecc_level(self) -> int"
+ },
+ "mask": {
+ "type": "func",
+ "name": "mask",
+ "doc": {
+ "brief": "get QRCode mask",
+ "return": "return mask of the QRCode",
+ "maixpy": "maix.image.QRCode.mask",
+ "py_doc": "get QRCode mask\n\nReturns: return mask of the QRCode\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int mask()",
+ "py_def": "def mask(self) -> int"
+ },
+ "data_type": {
+ "type": "func",
+ "name": "data_type",
+ "doc": {
+ "brief": "get QRCode dataType",
+ "return": "return mask of the QRCode",
+ "maixpy": "maix.image.QRCode.data_type",
+ "py_doc": "get QRCode dataType\n\nReturns: return mask of the QRCode\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int data_type()",
+ "py_def": "def data_type(self) -> int"
+ },
+ "eci": {
+ "type": "func",
+ "name": "eci",
+ "doc": {
+ "brief": "get QRCode eci",
+ "return": "return data of the QRCode",
+ "maixpy": "maix.image.QRCode.eci",
+ "py_doc": "get QRCode eci\n\nReturns: return data of the QRCode\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int eci()",
+ "py_def": "def eci(self) -> int"
+ },
+ "is_numeric": {
+ "type": "func",
+ "name": "is_numeric",
+ "doc": {
+ "brief": "check QRCode is numeric",
+ "return": "return true if the result type of the QRCode is numeric",
+ "maixpy": "maix.image.QRCode.is_numeric",
+ "py_doc": "check QRCode is numeric\n\nReturns: return true if the result type of the QRCode is numeric\n"
+ },
+ "args": [],
+ "ret_type": "bool",
+ "static": false,
+ "def": "bool is_numeric()",
+ "py_def": "def is_numeric(self) -> bool"
+ },
+ "is_alphanumeric": {
+ "type": "func",
+ "name": "is_alphanumeric",
+ "doc": {
+ "brief": "check QRCode is alphanumeric",
+ "return": "return true if the result type of the QRCode is alphanumeric",
+ "maixpy": "maix.image.QRCode.is_alphanumeric",
+ "py_doc": "check QRCode is alphanumeric\n\nReturns: return true if the result type of the QRCode is alphanumeric\n"
+ },
+ "args": [],
+ "ret_type": "bool",
+ "static": false,
+ "def": "bool is_alphanumeric()",
+ "py_def": "def is_alphanumeric(self) -> bool"
+ },
+ "is_binary": {
+ "type": "func",
+ "name": "is_binary",
+ "doc": {
+ "brief": "check QRCode is binary",
+ "return": "return true if the result type of the QRCode is binary",
+ "maixpy": "maix.image.QRCode.is_binary",
+ "py_doc": "check QRCode is binary\n\nReturns: return true if the result type of the QRCode is binary\n"
+ },
+ "args": [],
+ "ret_type": "bool",
+ "static": false,
+ "def": "bool is_binary()",
+ "py_def": "def is_binary(self) -> bool"
+ },
+ "is_kanji": {
+ "type": "func",
+ "name": "is_kanji",
+ "doc": {
+ "brief": "check QRCode is kanji",
+ "return": "return true if the result type of the QRCode is kanji",
+ "maixpy": "maix.image.QRCode.is_kanji",
+ "py_doc": "check QRCode is kanji\n\nReturns: return true if the result type of the QRCode is kanji\n"
+ },
+ "args": [],
+ "ret_type": "bool",
+ "static": false,
+ "def": "bool is_kanji()",
+ "py_def": "def is_kanji(self) -> bool"
+ }
+ },
+ "def": "class QRCode"
+ },
+ "AprilTag": {
+ "type": "class",
+ "name": "AprilTag",
+ "doc": {
+ "brief": "AprilTag class",
+ "maixpy": "maix.image.AprilTag",
+ "py_doc": "AprilTag class"
+ },
+ "members": {
+ "__init__": {
+ "type": "func",
+ "name": "AprilTag",
+ "doc": {
+ "brief": "AprilTag constructor",
+ "param": {
+ "rect": "Inlucdes the top-left corner and the width and height of the rectangle. format is {x, y, w, h}, type is std::vector",
+ "corners": "Includes the four corners of the rectangle. format is {{x0, y0}, {x1, y1}, {x2, y2}, {x3, y3}}, type is std::vector>",
+ "id": "The id of the AprilTag",
+ "famliy": "The family of the AprilTag",
+ "centroid_x": "The x coordinate of the center of the AprilTag",
+ "centroid_y": "The y coordinate of the center of the AprilTag",
+ "rotation": "The rotation of the AprilTag",
+ "decision_margin": "The decision_margin of the AprilTag",
+ "hamming": "The hamming of the AprilTag",
+ "goodness": "The goodness of the AprilTag",
+ "x_translation": "The x_translation of the AprilTag",
+ "y_translation": "The y_translation of the AprilTag",
+ "z_translation": "The z_translation of the AprilTag",
+ "x_rotation": "The x_rotation of the AprilTag",
+ "y_rotation": "The y_rotation of the AprilTag",
+ "z_rotation": "The z_rotation of the AprilTag"
+ },
+ "maixpy": "maix.image.AprilTag.__init__",
+ "py_doc": "AprilTag constructor\n\nArgs:\n - rect: Inlucdes the top-left corner and the width and height of the rectangle. format is {x, y, w, h}, type is std::vector\n - corners: Includes the four corners of the rectangle. format is {{x0, y0}, {x1, y1}, {x2, y2}, {x3, y3}}, type is std::vector>\n - id: The id of the AprilTag\n - famliy: The family of the AprilTag\n - centroid_x: The x coordinate of the center of the AprilTag\n - centroid_y: The y coordinate of the center of the AprilTag\n - rotation: The rotation of the AprilTag\n - decision_margin: The decision_margin of the AprilTag\n - hamming: The hamming of the AprilTag\n - goodness: The goodness of the AprilTag\n - x_translation: The x_translation of the AprilTag\n - y_translation: The y_translation of the AprilTag\n - z_translation: The z_translation of the AprilTag\n - x_rotation: The x_rotation of the AprilTag\n - y_rotation: The y_rotation of the AprilTag\n - z_rotation: The z_rotation of the AprilTag\n"
+ },
+ "args": [
+ [
+ "std::vector &",
+ "rect",
+ null
+ ],
+ [
+ "std::vector> &",
+ "corners",
+ null
+ ],
+ [
+ "int",
+ "id",
+ null
+ ],
+ [
+ "int",
+ "famliy",
+ null
+ ],
+ [
+ "float",
+ "centroid_x",
+ null
+ ],
+ [
+ "float",
+ "centroid_y",
+ null
+ ],
+ [
+ "float",
+ "rotation",
+ null
+ ],
+ [
+ "float",
+ "decision_margin",
+ null
+ ],
+ [
+ "int",
+ "hamming",
+ null
+ ],
+ [
+ "float",
+ "goodness",
+ null
+ ],
+ [
+ "float",
+ "x_translation",
+ null
+ ],
+ [
+ "float",
+ "y_translation",
+ null
+ ],
+ [
+ "float",
+ "z_translation",
+ null
+ ],
+ [
+ "float",
+ "x_rotation",
+ null
+ ],
+ [
+ "float",
+ "y_rotation",
+ null
+ ],
+ [
+ "float",
+ "z_rotation",
+ null
+ ]
+ ],
+ "ret_type": null,
+ "static": false,
+ "def": "AprilTag(std::vector &rect, std::vector> &corners, int id, int famliy, float centroid_x, float centroid_y, float rotation, float decision_margin, int hamming, float goodness, float x_translation, float y_translation, float z_translation, float x_rotation, float y_rotation, float z_rotation)",
+ "py_def": "def __init__(self, rect: list[int], corners: list[list[int]], id: int, famliy: int, centroid_x: float, centroid_y: float, rotation: float, decision_margin: float, hamming: int, goodness: float, x_translation: float, y_translation: float, z_translation: float, x_rotation: float, y_rotation: float, z_rotation: float) -> None"
+ },
+ "__getitem__": {
+ "type": "func",
+ "name": "__getitem__",
+ "doc": {
+ "brief": "Subscript operator",
+ "param": {
+ "index": "[0] Returns the apriltag\u2019s bounding box x coordinate\n[1] Returns the apriltag\u2019s bounding box y coordinate\n[2] Returns the apriltag\u2019s bounding box w coordinate\n[3] Returns the apriltag\u2019s bounding box h coordinate\n[4] Returns the apriltag\u2019s id\n[5] Returns the apriltag\u2019s family\n[6] Not support\n[7] Not support\n[8] Not support\n[9] Not support\n[10] Returns the apriltag\u2019s hamming\n[11] Not support\n[12] Not support\n[13] Not support\n[14] Not support\n[15] Not support\n[16] Not support\n[17] Not support"
+ },
+ "return": "int&",
+ "maixpy": "maix.image.AprilTag.__getitem__",
+ "py_doc": "Subscript operator\n\nArgs:\n - index: [0] Returns the apriltag\u2019s bounding box x coordinate\n[1] Returns the apriltag\u2019s bounding box y coordinate\n[2] Returns the apriltag\u2019s bounding box w coordinate\n[3] Returns the apriltag\u2019s bounding box h coordinate\n[4] Returns the apriltag\u2019s id\n[5] Returns the apriltag\u2019s family\n[6] Not support\n[7] Not support\n[8] Not support\n[9] Not support\n[10] Returns the apriltag\u2019s hamming\n[11] Not support\n[12] Not support\n[13] Not support\n[14] Not support\n[15] Not support\n[16] Not support\n[17] Not support\n\n\nReturns: int&\n"
+ },
+ "args": [
+ [
+ "int",
+ "index",
+ null
+ ]
+ ],
+ "ret_type": "int&",
+ "static": false,
+ "def": "int &__getitem__(int index)",
+ "py_def": "def __getitem__(self, index: int) -> int"
+ },
+ "corners": {
+ "type": "func",
+ "name": "corners",
+ "doc": {
+ "brief": "get coordinate of AprilTag",
+ "return": "return the coordinate of the AprilTag.",
+ "maixpy": "maix.image.AprilTag.corners",
+ "py_doc": "get coordinate of AprilTag\n\nReturns: return the coordinate of the AprilTag.\n"
+ },
+ "args": [],
+ "ret_type": "std::vector>",
+ "static": false,
+ "def": "std::vector> corners()",
+ "py_def": "def corners(self) -> list[list[int]]"
+ },
+ "rect": {
+ "type": "func",
+ "name": "rect",
+ "doc": {
+ "brief": "get rectangle of AprilTag",
+ "return": "return the rectangle of the AprilTag. format is {x, y, w, h}, type is std::vector",
+ "maixpy": "maix.image.AprilTag.rect",
+ "py_doc": "get rectangle of AprilTag\n\nReturns: return the rectangle of the AprilTag. format is {x, y, w, h}, type is std::vector\n"
+ },
+ "args": [],
+ "ret_type": "std::vector",
+ "static": false,
+ "def": "std::vector rect()",
+ "py_def": "def rect(self) -> list[int]"
+ },
+ "x": {
+ "type": "func",
+ "name": "x",
+ "doc": {
+ "brief": "get x of AprilTag",
+ "return": "return x of the AprilTag, type is int",
+ "maixpy": "maix.image.AprilTag.x",
+ "py_doc": "get x of AprilTag\n\nReturns: return x of the AprilTag, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int x()",
+ "py_def": "def x(self) -> int"
+ },
+ "y": {
+ "type": "func",
+ "name": "y",
+ "doc": {
+ "brief": "get y of AprilTag",
+ "return": "return y of the AprilTag, type is int",
+ "maixpy": "maix.image.AprilTag.y",
+ "py_doc": "get y of AprilTag\n\nReturns: return y of the AprilTag, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int y()",
+ "py_def": "def y(self) -> int"
+ },
+ "w": {
+ "type": "func",
+ "name": "w",
+ "doc": {
+ "brief": "get w of AprilTag",
+ "return": "return w of the AprilTag, type is int",
+ "maixpy": "maix.image.AprilTag.w",
+ "py_doc": "get w of AprilTag\n\nReturns: return w of the AprilTag, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int w()",
+ "py_def": "def w(self) -> int"
+ },
+ "h": {
+ "type": "func",
+ "name": "h",
+ "doc": {
+ "brief": "get h of AprilTag",
+ "return": "return h of the AprilTag, type is int",
+ "maixpy": "maix.image.AprilTag.h",
+ "py_doc": "get h of AprilTag\n\nReturns: return h of the AprilTag, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int h()",
+ "py_def": "def h(self) -> int"
+ },
+ "id": {
+ "type": "func",
+ "name": "id",
+ "doc": {
+ "brief": "get id of AprilTag",
+ "return": "return id of the AprilTag, type is int",
+ "maixpy": "maix.image.AprilTag.id",
+ "py_doc": "get id of AprilTag\n\nReturns: return id of the AprilTag, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int id()",
+ "py_def": "def id(self) -> int"
+ },
+ "family": {
+ "type": "func",
+ "name": "family",
+ "doc": {
+ "brief": "get family of AprilTag",
+ "return": "return family of the AprilTag, type is int",
+ "maixpy": "maix.image.AprilTag.family",
+ "py_doc": "get family of AprilTag\n\nReturns: return family of the AprilTag, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int family()",
+ "py_def": "def family(self) -> int"
+ },
+ "cx": {
+ "type": "func",
+ "name": "cx",
+ "doc": {
+ "brief": "get cx of AprilTag",
+ "return": "return cx of the AprilTag, type is int",
+ "maixpy": "maix.image.AprilTag.cx",
+ "py_doc": "get cx of AprilTag\n\nReturns: return cx of the AprilTag, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int cx()",
+ "py_def": "def cx(self) -> int"
+ },
+ "cxf": {
+ "type": "func",
+ "name": "cxf",
+ "doc": {
+ "brief": "get cxf of AprilTag",
+ "return": "return cxf of the AprilTag, type is float",
+ "maixpy": "maix.image.AprilTag.cxf",
+ "py_doc": "get cxf of AprilTag\n\nReturns: return cxf of the AprilTag, type is float\n"
+ },
+ "args": [],
+ "ret_type": "float",
+ "static": false,
+ "def": "float cxf()",
+ "py_def": "def cxf(self) -> float"
+ },
+ "cy": {
+ "type": "func",
+ "name": "cy",
+ "doc": {
+ "brief": "get cy of AprilTag",
+ "return": "return cy of the AprilTag, type is int",
+ "maixpy": "maix.image.AprilTag.cy",
+ "py_doc": "get cy of AprilTag\n\nReturns: return cy of the AprilTag, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int cy()",
+ "py_def": "def cy(self) -> int"
+ },
+ "cyf": {
+ "type": "func",
+ "name": "cyf",
+ "doc": {
+ "brief": "get cyf of AprilTag",
+ "return": "return cyf of the AprilTag, type is float",
+ "maixpy": "maix.image.AprilTag.cyf",
+ "py_doc": "get cyf of AprilTag\n\nReturns: return cyf of the AprilTag, type is float\n"
+ },
+ "args": [],
+ "ret_type": "float",
+ "static": false,
+ "def": "float cyf()",
+ "py_def": "def cyf(self) -> float"
+ },
+ "rotation": {
+ "type": "func",
+ "name": "rotation",
+ "doc": {
+ "brief": "get rotation of AprilTag",
+ "return": "return rotation of the AprilTag, type is float",
+ "maixpy": "maix.image.AprilTag.rotation",
+ "py_doc": "get rotation of AprilTag\n\nReturns: return rotation of the AprilTag, type is float\n"
+ },
+ "args": [],
+ "ret_type": "float",
+ "static": false,
+ "def": "float rotation()",
+ "py_def": "def rotation(self) -> float"
+ },
+ "decision_margin": {
+ "type": "func",
+ "name": "decision_margin",
+ "doc": {
+ "brief": "Get decision_margin of AprilTag",
+ "return": "Returns the quality of the apriltag match (0.0 - 1.0) where 1.0 is the best.",
+ "maixpy": "maix.image.AprilTag.decision_margin",
+ "py_doc": "Get decision_margin of AprilTag\n\nReturns: Returns the quality of the apriltag match (0.0 - 1.0) where 1.0 is the best.\n"
+ },
+ "args": [],
+ "ret_type": "float",
+ "static": false,
+ "def": "float decision_margin()",
+ "py_def": "def decision_margin(self) -> float"
+ },
+ "hamming": {
+ "type": "func",
+ "name": "hamming",
+ "doc": {
+ "brief": "get hamming of AprilTag",
+ "return": "Returns the number of accepted bit errors for this tag.\nreturn 0, means 0 bit errors will be accepted.\n1 is TAG25H7, means up to 1 bit error may be accepted\n2 is TAG25H9, means up to 3 bit errors may be accepted\n3 is TAG36H10, means up to 3 bit errors may be accepted\n4 is TAG36H11, means up to 4 bit errors may be accepted\n5 is ARTOOLKIT, means 0 bit errors will be accepted",
+ "maixpy": "maix.image.AprilTag.hamming",
+ "py_doc": "get hamming of AprilTag\n\nReturns: Returns the number of accepted bit errors for this tag.\nreturn 0, means 0 bit errors will be accepted.\n1 is TAG25H7, means up to 1 bit error may be accepted\n2 is TAG25H9, means up to 3 bit errors may be accepted\n3 is TAG36H10, means up to 3 bit errors may be accepted\n4 is TAG36H11, means up to 4 bit errors may be accepted\n5 is ARTOOLKIT, means 0 bit errors will be accepted\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int hamming()",
+ "py_def": "def hamming(self) -> int"
+ },
+ "goodness": {
+ "type": "func",
+ "name": "goodness",
+ "doc": {
+ "brief": "get goodness of AprilTag",
+ "return": "return goodness of the AprilTag, type is float\nNote: This value is always 0.0 for now.",
+ "maixpy": "maix.image.AprilTag.goodness",
+ "py_doc": "get goodness of AprilTag\n\nReturns: return goodness of the AprilTag, type is float\nNote: This value is always 0.0 for now.\n"
+ },
+ "args": [],
+ "ret_type": "float",
+ "static": false,
+ "def": "float goodness()",
+ "py_def": "def goodness(self) -> float"
+ },
+ "x_translation": {
+ "type": "func",
+ "name": "x_translation",
+ "doc": {
+ "brief": "get x_translation of AprilTag",
+ "return": "return x_translation of the AprilTag, type is float",
+ "maixpy": "maix.image.AprilTag.x_translation",
+ "py_doc": "get x_translation of AprilTag\n\nReturns: return x_translation of the AprilTag, type is float\n"
+ },
+ "args": [],
+ "ret_type": "float",
+ "static": false,
+ "def": "float x_translation()",
+ "py_def": "def x_translation(self) -> float"
+ },
+ "y_translation": {
+ "type": "func",
+ "name": "y_translation",
+ "doc": {
+ "brief": "get y_translation of AprilTag",
+ "return": "return y_translation of the AprilTag, type is float",
+ "maixpy": "maix.image.AprilTag.y_translation",
+ "py_doc": "get y_translation of AprilTag\n\nReturns: return y_translation of the AprilTag, type is float\n"
+ },
+ "args": [],
+ "ret_type": "float",
+ "static": false,
+ "def": "float y_translation()",
+ "py_def": "def y_translation(self) -> float"
+ },
+ "z_translation": {
+ "type": "func",
+ "name": "z_translation",
+ "doc": {
+ "brief": "get z_translation of AprilTag",
+ "return": "return z_translation of the AprilTag, type is float",
+ "maixpy": "maix.image.AprilTag.z_translation",
+ "py_doc": "get z_translation of AprilTag\n\nReturns: return z_translation of the AprilTag, type is float\n"
+ },
+ "args": [],
+ "ret_type": "float",
+ "static": false,
+ "def": "float z_translation()",
+ "py_def": "def z_translation(self) -> float"
+ },
+ "x_rotation": {
+ "type": "func",
+ "name": "x_rotation",
+ "doc": {
+ "brief": "get x_rotation of AprilTag",
+ "return": "return x_rotation of the AprilTag, type is float",
+ "maixpy": "maix.image.AprilTag.x_rotation",
+ "py_doc": "get x_rotation of AprilTag\n\nReturns: return x_rotation of the AprilTag, type is float\n"
+ },
+ "args": [],
+ "ret_type": "float",
+ "static": false,
+ "def": "float x_rotation()",
+ "py_def": "def x_rotation(self) -> float"
+ },
+ "y_rotation": {
+ "type": "func",
+ "name": "y_rotation",
+ "doc": {
+ "brief": "get y_rotation of AprilTag",
+ "return": "return y_rotation of the AprilTag, type is float",
+ "maixpy": "maix.image.AprilTag.y_rotation",
+ "py_doc": "get y_rotation of AprilTag\n\nReturns: return y_rotation of the AprilTag, type is float\n"
+ },
+ "args": [],
+ "ret_type": "float",
+ "static": false,
+ "def": "float y_rotation()",
+ "py_def": "def y_rotation(self) -> float"
+ },
+ "z_rotation": {
+ "type": "func",
+ "name": "z_rotation",
+ "doc": {
+ "brief": "get z_rotation of AprilTag",
+ "return": "return z_rotation of the AprilTag, type is float",
+ "maixpy": "maix.image.AprilTag.z_rotation",
+ "py_doc": "get z_rotation of AprilTag\n\nReturns: return z_rotation of the AprilTag, type is float\n"
+ },
+ "args": [],
+ "ret_type": "float",
+ "static": false,
+ "def": "float z_rotation()",
+ "py_def": "def z_rotation(self) -> float"
+ }
+ },
+ "def": "class AprilTag"
+ },
+ "DataMatrix": {
+ "type": "class",
+ "name": "DataMatrix",
+ "doc": {
+ "brief": "DataMatrix class",
+ "maixpy": "maix.image.DataMatrix",
+ "py_doc": "DataMatrix class"
+ },
+ "members": {
+ "__init__": {
+ "type": "func",
+ "name": "DataMatrix",
+ "doc": {
+ "brief": "DataMatrix constructor",
+ "param": {
+ "rect": "Inlucdes the top-left corner and the width and height of the rectangle. format is {x, y, w, h}, type is std::vector",
+ "corners": "Includes the four corners of the rectangle. format is {{x0, y0}, {x1, y1}, {x2, y2}, {x3, y3}}, type is std::vector>",
+ "payload": "The payload of the DataMatrix",
+ "rotation": "The rotation of the DataMatrix",
+ "rows": "The rows of the DataMatrix",
+ "columns": "The columns of the DataMatrix",
+ "capacity": "The capacity of the DataMatrix",
+ "padding": "The padding of the DataMatrix"
+ },
+ "maixpy": "maix.image.DataMatrix.__init__",
+ "py_doc": "DataMatrix constructor\n\nArgs:\n - rect: Inlucdes the top-left corner and the width and height of the rectangle. format is {x, y, w, h}, type is std::vector\n - corners: Includes the four corners of the rectangle. format is {{x0, y0}, {x1, y1}, {x2, y2}, {x3, y3}}, type is std::vector>\n - payload: The payload of the DataMatrix\n - rotation: The rotation of the DataMatrix\n - rows: The rows of the DataMatrix\n - columns: The columns of the DataMatrix\n - capacity: The capacity of the DataMatrix\n - padding: The padding of the DataMatrix\n"
+ },
+ "args": [
+ [
+ "std::vector &",
+ "rect",
+ null
+ ],
+ [
+ "std::vector> &",
+ "corners",
+ null
+ ],
+ [
+ "std::string &",
+ "payload",
+ null
+ ],
+ [
+ "float",
+ "rotation",
+ null
+ ],
+ [
+ "int",
+ "rows",
+ null
+ ],
+ [
+ "int",
+ "columns",
+ null
+ ],
+ [
+ "int",
+ "capacity",
+ null
+ ],
+ [
+ "int",
+ "padding",
+ null
+ ]
+ ],
+ "ret_type": null,
+ "static": false,
+ "def": "DataMatrix(std::vector &rect, std::vector> &corners, std::string &payload, float rotation, int rows, int columns, int capacity, int padding)",
+ "py_def": "def __init__(self, rect: list[int], corners: list[list[int]], payload: str, rotation: float, rows: int, columns: int, capacity: int, padding: int) -> None"
+ },
+ "__getitem__": {
+ "type": "func",
+ "name": "__getitem__",
+ "doc": {
+ "brief": "Subscript operator",
+ "param": {
+ "index": "[0] get x of DataMatrix\n[1] get y of DataMatrix\n[2] get w of DataMatrix\n[3] get h of DataMatrix\n[4] Not support this index, try to use payload() method\n[5] Not support this index, try to use rotation() method\n[6] get rows of DataMatrix\n[7] get columns of DataMatrix\n[8] get capacity of DataMatrix\n[9] get padding of DataMatrix"
+ },
+ "return": "int&",
+ "maixpy": "maix.image.DataMatrix.__getitem__",
+ "py_doc": "Subscript operator\n\nArgs:\n - index: [0] get x of DataMatrix\n[1] get y of DataMatrix\n[2] get w of DataMatrix\n[3] get h of DataMatrix\n[4] Not support this index, try to use payload() method\n[5] Not support this index, try to use rotation() method\n[6] get rows of DataMatrix\n[7] get columns of DataMatrix\n[8] get capacity of DataMatrix\n[9] get padding of DataMatrix\n\n\nReturns: int&\n"
+ },
+ "args": [
+ [
+ "int",
+ "index",
+ null
+ ]
+ ],
+ "ret_type": "int&",
+ "static": false,
+ "def": "int &__getitem__(int index)",
+ "py_def": "def __getitem__(self, index: int) -> int"
+ },
+ "corners": {
+ "type": "func",
+ "name": "corners",
+ "doc": {
+ "brief": "get coordinate of DataMatrix",
+ "return": "return the coordinate of the DataMatrix.",
+ "maixpy": "maix.image.DataMatrix.corners",
+ "py_doc": "get coordinate of DataMatrix\n\nReturns: return the coordinate of the DataMatrix.\n"
+ },
+ "args": [],
+ "ret_type": "std::vector>",
+ "static": false,
+ "def": "std::vector> corners()",
+ "py_def": "def corners(self) -> list[list[int]]"
+ },
+ "rect": {
+ "type": "func",
+ "name": "rect",
+ "doc": {
+ "brief": "get rectangle of DataMatrix",
+ "return": "return the rectangle of the DataMatrix. format is {x, y, w, h}, type is std::vector",
+ "maixpy": "maix.image.DataMatrix.rect",
+ "py_doc": "get rectangle of DataMatrix\n\nReturns: return the rectangle of the DataMatrix. format is {x, y, w, h}, type is std::vector\n"
+ },
+ "args": [],
+ "ret_type": "std::vector",
+ "static": false,
+ "def": "std::vector rect()",
+ "py_def": "def rect(self) -> list[int]"
+ },
+ "x": {
+ "type": "func",
+ "name": "x",
+ "doc": {
+ "brief": "get x of DataMatrix",
+ "return": "return x of the DataMatrix, type is int",
+ "maixpy": "maix.image.DataMatrix.x",
+ "py_doc": "get x of DataMatrix\n\nReturns: return x of the DataMatrix, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int x()",
+ "py_def": "def x(self) -> int"
+ },
+ "y": {
+ "type": "func",
+ "name": "y",
+ "doc": {
+ "brief": "get y of DataMatrix",
+ "return": "return y of the DataMatrix, type is int",
+ "maixpy": "maix.image.DataMatrix.y",
+ "py_doc": "get y of DataMatrix\n\nReturns: return y of the DataMatrix, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int y()",
+ "py_def": "def y(self) -> int"
+ },
+ "w": {
+ "type": "func",
+ "name": "w",
+ "doc": {
+ "brief": "get w of DataMatrix",
+ "return": "return w of the DataMatrix, type is int",
+ "maixpy": "maix.image.DataMatrix.w",
+ "py_doc": "get w of DataMatrix\n\nReturns: return w of the DataMatrix, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int w()",
+ "py_def": "def w(self) -> int"
+ },
+ "h": {
+ "type": "func",
+ "name": "h",
+ "doc": {
+ "brief": "get h of DataMatrix",
+ "return": "return h of the DataMatrix, type is int",
+ "maixpy": "maix.image.DataMatrix.h",
+ "py_doc": "get h of DataMatrix\n\nReturns: return h of the DataMatrix, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int h()",
+ "py_def": "def h(self) -> int"
+ },
+ "payload": {
+ "type": "func",
+ "name": "payload",
+ "doc": {
+ "brief": "get payload of DataMatrix",
+ "return": "return payload of the DataMatrix, type is std::string",
+ "maixpy": "maix.image.DataMatrix.payload",
+ "py_doc": "get payload of DataMatrix\n\nReturns: return payload of the DataMatrix, type is std::string\n"
+ },
+ "args": [],
+ "ret_type": "std::string",
+ "static": false,
+ "def": "std::string payload()",
+ "py_def": "def payload(self) -> str"
+ },
+ "rotation": {
+ "type": "func",
+ "name": "rotation",
+ "doc": {
+ "brief": "get rotation of DataMatrix",
+ "return": "return rotation of the DataMatrix, type is float",
+ "maixpy": "maix.image.DataMatrix.rotation",
+ "py_doc": "get rotation of DataMatrix\n\nReturns: return rotation of the DataMatrix, type is float\n"
+ },
+ "args": [],
+ "ret_type": "float",
+ "static": false,
+ "def": "float rotation()",
+ "py_def": "def rotation(self) -> float"
+ },
+ "rows": {
+ "type": "func",
+ "name": "rows",
+ "doc": {
+ "brief": "get rows of DataMatrix",
+ "return": "return rows of the DataMatrix, type is int",
+ "maixpy": "maix.image.DataMatrix.rows",
+ "py_doc": "get rows of DataMatrix\n\nReturns: return rows of the DataMatrix, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int rows()",
+ "py_def": "def rows(self) -> int"
+ },
+ "columns": {
+ "type": "func",
+ "name": "columns",
+ "doc": {
+ "brief": "get columns of DataMatrix",
+ "return": "return columns of the DataMatrix, type is int",
+ "maixpy": "maix.image.DataMatrix.columns",
+ "py_doc": "get columns of DataMatrix\n\nReturns: return columns of the DataMatrix, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int columns()",
+ "py_def": "def columns(self) -> int"
+ },
+ "capacity": {
+ "type": "func",
+ "name": "capacity",
+ "doc": {
+ "brief": "get capacity of DataMatrix",
+ "return": "returns how many characters could fit in this data matrix, type is int",
+ "maixpy": "maix.image.DataMatrix.capacity",
+ "py_doc": "get capacity of DataMatrix\n\nReturns: returns how many characters could fit in this data matrix, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int capacity()",
+ "py_def": "def capacity(self) -> int"
+ },
+ "padding": {
+ "type": "func",
+ "name": "padding",
+ "doc": {
+ "brief": "get padding of DataMatrix",
+ "return": "returns how many unused characters are in this data matrix, type is int",
+ "maixpy": "maix.image.DataMatrix.padding",
+ "py_doc": "get padding of DataMatrix\n\nReturns: returns how many unused characters are in this data matrix, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int padding()",
+ "py_def": "def padding(self) -> int"
+ }
+ },
+ "def": "class DataMatrix"
+ },
+ "BarCode": {
+ "type": "class",
+ "name": "BarCode",
+ "doc": {
+ "brief": "BarCode class",
+ "maixpy": "maix.image.BarCode",
+ "py_doc": "BarCode class"
+ },
+ "members": {
+ "__init__": {
+ "type": "func",
+ "name": "BarCode",
+ "doc": {
+ "brief": "BarCode constructor",
+ "param": {
+ "rect": "Inlucdes the top-left corner and the width and height of the rectangle. format is {x, y, w, h}, type is std::vector",
+ "corners": "Includes the four corners of the rectangle. format is {{x0, y0}, {x1, y1}, {x2, y2}, {x3, y3}}, type is std::vector>",
+ "payload": "The payload of the BarCode",
+ "type": "The type of the BarCode",
+ "rotation": "The rotation of the BarCode",
+ "quality": "The quality of the BarCode"
+ },
+ "maixpy": "maix.image.BarCode.__init__",
+ "py_doc": "BarCode constructor\n\nArgs:\n - rect: Inlucdes the top-left corner and the width and height of the rectangle. format is {x, y, w, h}, type is std::vector\n - corners: Includes the four corners of the rectangle. format is {{x0, y0}, {x1, y1}, {x2, y2}, {x3, y3}}, type is std::vector>\n - payload: The payload of the BarCode\n - type: The type of the BarCode\n - rotation: The rotation of the BarCode\n - quality: The quality of the BarCode\n"
+ },
+ "args": [
+ [
+ "std::vector &",
+ "rect",
+ null
+ ],
+ [
+ "std::vector> &",
+ "corners",
+ null
+ ],
+ [
+ "std::string &",
+ "payload",
+ null
+ ],
+ [
+ "int",
+ "type",
+ null
+ ],
+ [
+ "float",
+ "rotation",
+ null
+ ],
+ [
+ "int",
+ "quality",
+ null
+ ]
+ ],
+ "ret_type": null,
+ "static": false,
+ "def": "BarCode(std::vector &rect, std::vector> &corners, std::string &payload, int type, float rotation, int quality)",
+ "py_def": "def __init__(self, rect: list[int], corners: list[list[int]], payload: str, type: int, rotation: float, quality: int) -> None"
+ },
+ "__getitem__": {
+ "type": "func",
+ "name": "__getitem__",
+ "doc": {
+ "brief": "Subscript operator",
+ "param": {
+ "index": "[0] get x of BarCode\n[1] get y of BarCode\n[2] get w of BarCode\n[3] get h of BarCode\n[4] Not support this index, try to use payload() method\n[5] get type of BarCode\n[6] Not support this index, try to use rotation() method\n[7] get quality of BarCode"
+ },
+ "return": "int&",
+ "maixpy": "maix.image.BarCode.__getitem__",
+ "py_doc": "Subscript operator\n\nArgs:\n - index: [0] get x of BarCode\n[1] get y of BarCode\n[2] get w of BarCode\n[3] get h of BarCode\n[4] Not support this index, try to use payload() method\n[5] get type of BarCode\n[6] Not support this index, try to use rotation() method\n[7] get quality of BarCode\n\n\nReturns: int&\n"
+ },
+ "args": [
+ [
+ "int",
+ "index",
+ null
+ ]
+ ],
+ "ret_type": "int&",
+ "static": false,
+ "def": "int &__getitem__(int index)",
+ "py_def": "def __getitem__(self, index: int) -> int"
+ },
+ "corners": {
+ "type": "func",
+ "name": "corners",
+ "doc": {
+ "brief": "get coordinate of BarCode",
+ "return": "return the coordinate of the BarCode.",
+ "maixpy": "maix.image.BarCode.corners",
+ "py_doc": "get coordinate of BarCode\n\nReturns: return the coordinate of the BarCode.\n"
+ },
+ "args": [],
+ "ret_type": "std::vector>",
+ "static": false,
+ "def": "std::vector> corners()",
+ "py_def": "def corners(self) -> list[list[int]]"
+ },
+ "rect": {
+ "type": "func",
+ "name": "rect",
+ "doc": {
+ "brief": "get rectangle of BarCode",
+ "return": "return the rectangle of the BarCode. format is {x, y, w, h}, type is std::vector",
+ "maixpy": "maix.image.BarCode.rect",
+ "py_doc": "get rectangle of BarCode\n\nReturns: return the rectangle of the BarCode. format is {x, y, w, h}, type is std::vector\n"
+ },
+ "args": [],
+ "ret_type": "std::vector",
+ "static": false,
+ "def": "std::vector rect()",
+ "py_def": "def rect(self) -> list[int]"
+ },
+ "x": {
+ "type": "func",
+ "name": "x",
+ "doc": {
+ "brief": "get x of BarCode",
+ "return": "return x of the BarCode, type is int",
+ "maixpy": "maix.image.BarCode.x",
+ "py_doc": "get x of BarCode\n\nReturns: return x of the BarCode, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int x()",
+ "py_def": "def x(self) -> int"
+ },
+ "y": {
+ "type": "func",
+ "name": "y",
+ "doc": {
+ "brief": "get y of BarCode",
+ "return": "return y of the BarCode, type is int",
+ "maixpy": "maix.image.BarCode.y",
+ "py_doc": "get y of BarCode\n\nReturns: return y of the BarCode, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int y()",
+ "py_def": "def y(self) -> int"
+ },
+ "w": {
+ "type": "func",
+ "name": "w",
+ "doc": {
+ "brief": "get w of BarCode",
+ "return": "return w of the BarCode, type is int",
+ "maixpy": "maix.image.BarCode.w",
+ "py_doc": "get w of BarCode\n\nReturns: return w of the BarCode, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int w()",
+ "py_def": "def w(self) -> int"
+ },
+ "h": {
+ "type": "func",
+ "name": "h",
+ "doc": {
+ "brief": "get h of BarCode",
+ "return": "return h of the BarCode, type is int",
+ "maixpy": "maix.image.BarCode.h",
+ "py_doc": "get h of BarCode\n\nReturns: return h of the BarCode, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int h()",
+ "py_def": "def h(self) -> int"
+ },
+ "payload": {
+ "type": "func",
+ "name": "payload",
+ "doc": {
+ "brief": "get payload of BarCode",
+ "return": "return payload of the BarCode, type is std::string",
+ "maixpy": "maix.image.BarCode.payload",
+ "py_doc": "get payload of BarCode\n\nReturns: return payload of the BarCode, type is std::string\n"
+ },
+ "args": [],
+ "ret_type": "std::string",
+ "static": false,
+ "def": "std::string payload()",
+ "py_def": "def payload(self) -> str"
+ },
+ "type": {
+ "type": "func",
+ "name": "type",
+ "doc": {
+ "brief": "get type of BarCode",
+ "return": "return type of the BarCode, type is int",
+ "maixpy": "maix.image.BarCode.type",
+ "py_doc": "get type of BarCode\n\nReturns: return type of the BarCode, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int type()",
+ "py_def": "def type(self) -> int"
+ },
+ "rotation": {
+ "type": "func",
+ "name": "rotation",
+ "doc": {
+ "brief": "get rotation of BarCode",
+ "return": "return rotation of the BarCode, type is float. FIXME: always return 0.0",
+ "maixpy": "maix.image.BarCode.rotation",
+ "py_doc": "get rotation of BarCode\n\nReturns: return rotation of the BarCode, type is float. FIXME: always return 0.0\n"
+ },
+ "args": [],
+ "ret_type": "float",
+ "static": false,
+ "def": "float rotation()",
+ "py_def": "def rotation(self) -> float"
+ },
+ "quality": {
+ "type": "func",
+ "name": "quality",
+ "doc": {
+ "brief": "get quality of BarCode",
+ "return": "return quality of the BarCode, type is int",
+ "maixpy": "maix.image.BarCode.quality",
+ "py_doc": "get quality of BarCode\n\nReturns: return quality of the BarCode, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int quality()",
+ "py_def": "def quality(self) -> int"
+ }
+ },
+ "def": "class BarCode"
+ },
+ "Statistics": {
+ "type": "class",
+ "name": "Statistics",
+ "doc": {
+ "brief": "Statistics class",
+ "maixpy": "maix.image.Statistics",
+ "py_doc": "Statistics class"
+ },
+ "members": {
+ "__init__": {
+ "type": "func",
+ "name": "Statistics",
+ "doc": {
+ "brief": "Statistics constructor",
+ "param": {
+ "format": "The statistics source image format",
+ "l_statistics": "The statistics of the L channel. format is {mean, median, mode, std_dev, min, max, lq, uq}, type is std::vector",
+ "a_statistics": "The statistics of the A channel. format is {mean, median, mode, std_dev, min, max, lq, uq}, type is std::vector",
+ "b_statistics": "The statistics of the B channel. format is {mean, median, mode, std_dev, min, max, lq, uq}, type is std::vector"
+ },
+ "maixpy": "maix.image.Statistics.__init__",
+ "py_doc": "Statistics constructor\n\nArgs:\n - format: The statistics source image format\n - l_statistics: The statistics of the L channel. format is {mean, median, mode, std_dev, min, max, lq, uq}, type is std::vector\n - a_statistics: The statistics of the A channel. format is {mean, median, mode, std_dev, min, max, lq, uq}, type is std::vector\n - b_statistics: The statistics of the B channel. format is {mean, median, mode, std_dev, min, max, lq, uq}, type is std::vector\n"
+ },
+ "args": [
+ [
+ "image::Format",
+ "format",
+ null
+ ],
+ [
+ "std::vector &",
+ "l_statistics",
+ null
+ ],
+ [
+ "std::vector &",
+ "a_statistics",
+ null
+ ],
+ [
+ "std::vector &",
+ "b_statistics",
+ null
+ ]
+ ],
+ "ret_type": null,
+ "static": false,
+ "def": "Statistics(image::Format format, std::vector &l_statistics, std::vector &a_statistics, std::vector &b_statistics)",
+ "py_def": "def __init__(self, format: Format, l_statistics: list[int], a_statistics: list[int], b_statistics: list[int]) -> None"
+ },
+ "__getitem__": {
+ "type": "func",
+ "name": "__getitem__",
+ "doc": {
+ "brief": "Subscript operator",
+ "param": {
+ "index": "array index"
+ },
+ "return": "int&",
+ "maixpy": "maix.image.Statistics.__getitem__",
+ "py_doc": "Subscript operator\n\nArgs:\n - index: array index\n\n\nReturns: int&\n"
+ },
+ "args": [
+ [
+ "int",
+ "index",
+ null
+ ]
+ ],
+ "ret_type": "int&",
+ "static": false,
+ "def": "int &__getitem__(int index)",
+ "py_def": "def __getitem__(self, index: int) -> int"
+ },
+ "format": {
+ "type": "func",
+ "name": "format",
+ "doc": {
+ "brief": "get format of Statistics source image",
+ "return": "return format of the Statistics source image, type is image::Format",
+ "maixpy": "maix.image.Statistics.format",
+ "py_doc": "get format of Statistics source image\n\nReturns: return format of the Statistics source image, type is image::Format\n"
+ },
+ "args": [],
+ "ret_type": "image::Format",
+ "static": false,
+ "def": "image::Format format()",
+ "py_def": "def format(self) -> Format"
+ },
+ "l_mean": {
+ "type": "func",
+ "name": "l_mean",
+ "doc": {
+ "brief": "get L channel mean",
+ "return": "return L channel mean, type is int",
+ "maixpy": "maix.image.Statistics.l_mean",
+ "py_doc": "get L channel mean\n\nReturns: return L channel mean, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int l_mean()",
+ "py_def": "def l_mean(self) -> int"
+ },
+ "l_median": {
+ "type": "func",
+ "name": "l_median",
+ "doc": {
+ "brief": "get L channel median",
+ "return": "return L channel median, type is int",
+ "maixpy": "maix.image.Statistics.l_median",
+ "py_doc": "get L channel median\n\nReturns: return L channel median, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int l_median()",
+ "py_def": "def l_median(self) -> int"
+ },
+ "l_mode": {
+ "type": "func",
+ "name": "l_mode",
+ "doc": {
+ "brief": "get L channel mode",
+ "return": "return L channel mode, type is int",
+ "maixpy": "maix.image.Statistics.l_mode",
+ "py_doc": "get L channel mode\n\nReturns: return L channel mode, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int l_mode()",
+ "py_def": "def l_mode(self) -> int"
+ },
+ "l_std_dev": {
+ "type": "func",
+ "name": "l_std_dev",
+ "doc": {
+ "brief": "get L channel std_dev",
+ "return": "return L channel std_dev, type is int",
+ "maixpy": "maix.image.Statistics.l_std_dev",
+ "py_doc": "get L channel std_dev\n\nReturns: return L channel std_dev, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int l_std_dev()",
+ "py_def": "def l_std_dev(self) -> int"
+ },
+ "l_min": {
+ "type": "func",
+ "name": "l_min",
+ "doc": {
+ "brief": "get L channel min",
+ "return": "return L channel min, type is int",
+ "maixpy": "maix.image.Statistics.l_min",
+ "py_doc": "get L channel min\n\nReturns: return L channel min, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int l_min()",
+ "py_def": "def l_min(self) -> int"
+ },
+ "l_max": {
+ "type": "func",
+ "name": "l_max",
+ "doc": {
+ "brief": "get L channel max",
+ "return": "return L channel max, type is int",
+ "maixpy": "maix.image.Statistics.l_max",
+ "py_doc": "get L channel max\n\nReturns: return L channel max, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int l_max()",
+ "py_def": "def l_max(self) -> int"
+ },
+ "l_lq": {
+ "type": "func",
+ "name": "l_lq",
+ "doc": {
+ "brief": "get L channel lq",
+ "return": "return L channel lq, type is int",
+ "maixpy": "maix.image.Statistics.l_lq",
+ "py_doc": "get L channel lq\n\nReturns: return L channel lq, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int l_lq()",
+ "py_def": "def l_lq(self) -> int"
+ },
+ "l_uq": {
+ "type": "func",
+ "name": "l_uq",
+ "doc": {
+ "brief": "get L channel uq",
+ "return": "return L channel uq, type is int",
+ "maixpy": "maix.image.Statistics.l_uq",
+ "py_doc": "get L channel uq\n\nReturns: return L channel uq, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int l_uq()",
+ "py_def": "def l_uq(self) -> int"
+ },
+ "a_mean": {
+ "type": "func",
+ "name": "a_mean",
+ "doc": {
+ "brief": "get A channel mean",
+ "return": "return A channel mean, type is int",
+ "maixpy": "maix.image.Statistics.a_mean",
+ "py_doc": "get A channel mean\n\nReturns: return A channel mean, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int a_mean()",
+ "py_def": "def a_mean(self) -> int"
+ },
+ "a_median": {
+ "type": "func",
+ "name": "a_median",
+ "doc": {
+ "brief": "get A channea median",
+ "return": "return A channel median, type is int",
+ "maixpy": "maix.image.Statistics.a_median",
+ "py_doc": "get A channea median\n\nReturns: return A channel median, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int a_median()",
+ "py_def": "def a_median(self) -> int"
+ },
+ "a_mode": {
+ "type": "func",
+ "name": "a_mode",
+ "doc": {
+ "brief": "get A channel mode",
+ "return": "return A channel mode, type is int",
+ "maixpy": "maix.image.Statistics.a_mode",
+ "py_doc": "get A channel mode\n\nReturns: return A channel mode, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int a_mode()",
+ "py_def": "def a_mode(self) -> int"
+ },
+ "a_std_dev": {
+ "type": "func",
+ "name": "a_std_dev",
+ "doc": {
+ "brief": "get A channel std_dev",
+ "return": "return A channel std_dev, type is int",
+ "maixpy": "maix.image.Statistics.a_std_dev",
+ "py_doc": "get A channel std_dev\n\nReturns: return A channel std_dev, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int a_std_dev()",
+ "py_def": "def a_std_dev(self) -> int"
+ },
+ "a_min": {
+ "type": "func",
+ "name": "a_min",
+ "doc": {
+ "brief": "get A channel min",
+ "return": "return A channel min, type is int",
+ "maixpy": "maix.image.Statistics.a_min",
+ "py_doc": "get A channel min\n\nReturns: return A channel min, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int a_min()",
+ "py_def": "def a_min(self) -> int"
+ },
+ "a_max": {
+ "type": "func",
+ "name": "a_max",
+ "doc": {
+ "brief": "get A channel max",
+ "return": "return A channel max, type is int",
+ "maixpy": "maix.image.Statistics.a_max",
+ "py_doc": "get A channel max\n\nReturns: return A channel max, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int a_max()",
+ "py_def": "def a_max(self) -> int"
+ },
+ "a_lq": {
+ "type": "func",
+ "name": "a_lq",
+ "doc": {
+ "brief": "get A channel lq",
+ "return": "return A channel lq, type is int",
+ "maixpy": "maix.image.Statistics.a_lq",
+ "py_doc": "get A channel lq\n\nReturns: return A channel lq, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int a_lq()",
+ "py_def": "def a_lq(self) -> int"
+ },
+ "a_uq": {
+ "type": "func",
+ "name": "a_uq",
+ "doc": {
+ "brief": "get A channel uq",
+ "return": "return A channel uq, type is int",
+ "maixpy": "maix.image.Statistics.a_uq",
+ "py_doc": "get A channel uq\n\nReturns: return A channel uq, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int a_uq()",
+ "py_def": "def a_uq(self) -> int"
+ },
+ "b_mean": {
+ "type": "func",
+ "name": "b_mean",
+ "doc": {
+ "brief": "get B channel mean",
+ "return": "return B channel mean, type is int",
+ "maixpy": "maix.image.Statistics.b_mean",
+ "py_doc": "get B channel mean\n\nReturns: return B channel mean, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int b_mean()",
+ "py_def": "def b_mean(self) -> int"
+ },
+ "b_median": {
+ "type": "func",
+ "name": "b_median",
+ "doc": {
+ "brief": "get B channea median",
+ "return": "return B channel median, type is int",
+ "maixpy": "maix.image.Statistics.b_median",
+ "py_doc": "get B channea median\n\nReturns: return B channel median, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int b_median()",
+ "py_def": "def b_median(self) -> int"
+ },
+ "b_mode": {
+ "type": "func",
+ "name": "b_mode",
+ "doc": {
+ "brief": "get B channel mode",
+ "return": "return B channel mode, type is int",
+ "maixpy": "maix.image.Statistics.b_mode",
+ "py_doc": "get B channel mode\n\nReturns: return B channel mode, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int b_mode()",
+ "py_def": "def b_mode(self) -> int"
+ },
+ "b_std_dev": {
+ "type": "func",
+ "name": "b_std_dev",
+ "doc": {
+ "brief": "get B channel std_dev",
+ "return": "return B channel std_dev, type is int",
+ "maixpy": "maix.image.Statistics.b_std_dev",
+ "py_doc": "get B channel std_dev\n\nReturns: return B channel std_dev, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int b_std_dev()",
+ "py_def": "def b_std_dev(self) -> int"
+ },
+ "b_min": {
+ "type": "func",
+ "name": "b_min",
+ "doc": {
+ "brief": "get B channel min",
+ "return": "return B channel min, type is int",
+ "maixpy": "maix.image.Statistics.b_min",
+ "py_doc": "get B channel min\n\nReturns: return B channel min, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int b_min()",
+ "py_def": "def b_min(self) -> int"
+ },
+ "b_max": {
+ "type": "func",
+ "name": "b_max",
+ "doc": {
+ "brief": "get B channel max",
+ "return": "return B channel max, type is int",
+ "maixpy": "maix.image.Statistics.b_max",
+ "py_doc": "get B channel max\n\nReturns: return B channel max, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int b_max()",
+ "py_def": "def b_max(self) -> int"
+ },
+ "b_lq": {
+ "type": "func",
+ "name": "b_lq",
+ "doc": {
+ "brief": "get B channel lq",
+ "return": "return B channel lq, type is int",
+ "maixpy": "maix.image.Statistics.b_lq",
+ "py_doc": "get B channel lq\n\nReturns: return B channel lq, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int b_lq()",
+ "py_def": "def b_lq(self) -> int"
+ },
+ "b_uq": {
+ "type": "func",
+ "name": "b_uq",
+ "doc": {
+ "brief": "get B channel uq",
+ "return": "return B channel uq, type is int",
+ "maixpy": "maix.image.Statistics.b_uq",
+ "py_doc": "get B channel uq\n\nReturns: return B channel uq, type is int\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int b_uq()",
+ "py_def": "def b_uq(self) -> int"
+ }
+ },
+ "def": "class Statistics"
+ },
+ "Displacement": {
+ "type": "class",
+ "name": "Displacement",
+ "doc": {
+ "brief": "Displacement class",
+ "maixpy": "maix.image.Displacement",
+ "py_doc": "Displacement class"
+ },
+ "members": {
+ "__init__": {
+ "type": "func",
+ "name": "Displacement",
+ "doc": {
+ "brief": "Displacement constructor",
+ "param": {
+ "x_translation": "The x_translation of the Displacement",
+ "y_translation": "The y_translation of the Displacement",
+ "rotation": "The rotation of the Displacement",
+ "scale": "The scale of the Displacement",
+ "response": "The response of the Displacement"
+ },
+ "maixpy": "maix.image.Displacement.__init__",
+ "py_doc": "Displacement constructor\n\nArgs:\n - x_translation: The x_translation of the Displacement\n - y_translation: The y_translation of the Displacement\n - rotation: The rotation of the Displacement\n - scale: The scale of the Displacement\n - response: The response of the Displacement\n"
+ },
+ "args": [
+ [
+ "float",
+ "x_translation",
+ null
+ ],
+ [
+ "float",
+ "y_translation",
+ null
+ ],
+ [
+ "float",
+ "rotation",
+ null
+ ],
+ [
+ "float",
+ "scale",
+ null
+ ],
+ [
+ "float",
+ "response",
+ null
+ ]
+ ],
+ "ret_type": null,
+ "static": false,
+ "def": "Displacement(float x_translation, float y_translation, float rotation, float scale, float response)",
+ "py_def": "def __init__(self, x_translation: float, y_translation: float, rotation: float, scale: float, response: float) -> None"
+ },
+ "__getitem__": {
+ "type": "func",
+ "name": "__getitem__",
+ "doc": {
+ "brief": "Subscript operator",
+ "param": {
+ "index": "array index"
+ },
+ "return": "int&",
+ "maixpy": "maix.image.Displacement.__getitem__",
+ "py_doc": "Subscript operator\n\nArgs:\n - index: array index\n\n\nReturns: int&\n"
+ },
+ "args": [
+ [
+ "int",
+ "index",
+ null
+ ]
+ ],
+ "ret_type": "int&",
+ "static": false,
+ "def": "int &__getitem__(int index)",
+ "py_def": "def __getitem__(self, index: int) -> int"
+ },
+ "x_translation": {
+ "type": "func",
+ "name": "x_translation",
+ "doc": {
+ "brief": "get x_translation of Displacement",
+ "return": "return x_translation of the Displacement, type is float",
+ "maixpy": "maix.image.Displacement.x_translation",
+ "py_doc": "get x_translation of Displacement\n\nReturns: return x_translation of the Displacement, type is float\n"
+ },
+ "args": [],
+ "ret_type": "float",
+ "static": false,
+ "def": "float x_translation()",
+ "py_def": "def x_translation(self) -> float"
+ },
+ "y_translation": {
+ "type": "func",
+ "name": "y_translation",
+ "doc": {
+ "brief": "get y_translation of Displacement",
+ "return": "return y_translation of the Displacement, type is float",
+ "maixpy": "maix.image.Displacement.y_translation",
+ "py_doc": "get y_translation of Displacement\n\nReturns: return y_translation of the Displacement, type is float\n"
+ },
+ "args": [],
+ "ret_type": "float",
+ "static": false,
+ "def": "float y_translation()",
+ "py_def": "def y_translation(self) -> float"
+ },
+ "rotation": {
+ "type": "func",
+ "name": "rotation",
+ "doc": {
+ "brief": "get rotation of Displacement",
+ "return": "return rotation of the Displacement, type is float",
+ "maixpy": "maix.image.Displacement.rotation",
+ "py_doc": "get rotation of Displacement\n\nReturns: return rotation of the Displacement, type is float\n"
+ },
+ "args": [],
+ "ret_type": "float",
+ "static": false,
+ "def": "float rotation()",
+ "py_def": "def rotation(self) -> float"
+ },
+ "scale": {
+ "type": "func",
+ "name": "scale",
+ "doc": {
+ "brief": "get scale of Displacement",
+ "return": "return scale of the Displacement, type is float",
+ "maixpy": "maix.image.Displacement.scale",
+ "py_doc": "get scale of Displacement\n\nReturns: return scale of the Displacement, type is float\n"
+ },
+ "args": [],
+ "ret_type": "float",
+ "static": false,
+ "def": "float scale()",
+ "py_def": "def scale(self) -> float"
+ },
+ "response": {
+ "type": "func",
+ "name": "response",
+ "doc": {
+ "brief": "get response of Displacement",
+ "return": "return response of the Displacement, type is float",
+ "maixpy": "maix.image.Displacement.response",
+ "py_doc": "get response of Displacement\n\nReturns: return response of the Displacement, type is float\n"
+ },
+ "args": [],
+ "ret_type": "float",
+ "static": false,
+ "def": "float response()",
+ "py_def": "def response(self) -> float"
+ }
+ },
+ "def": "class Displacement"
+ },
+ "Percentile": {
+ "type": "class",
+ "name": "Percentile",
+ "doc": {
+ "brief": "Percentile class",
+ "maixpy": "maix.image.Percentile",
+ "py_doc": "Percentile class"
+ },
+ "members": {
+ "__init__": {
+ "type": "func",
+ "name": "Percentile",
+ "doc": {
+ "brief": "Percentile constructor",
+ "param": {
+ "l_value": "for grayscale image, it is grayscale percentile value (between 0 and 255).\nfor rgb888 image, it is l channel percentile value of lab (between 0 and 100).",
+ "a_value": "for rgb888 image, it is a channel percentile value of lab format(between -128 and 127).",
+ "b_value": "for rgb888 image, it is b channel percentile value of lab format(between -128 and 127)."
+ },
+ "maixpy": "maix.image.Percentile.__init__",
+ "py_doc": "Percentile constructor\n\nArgs:\n - l_value: for grayscale image, it is grayscale percentile value (between 0 and 255).\nfor rgb888 image, it is l channel percentile value of lab (between 0 and 100).\n - a_value: for rgb888 image, it is a channel percentile value of lab format(between -128 and 127).\n - b_value: for rgb888 image, it is b channel percentile value of lab format(between -128 and 127).\n"
+ },
+ "args": [
+ [
+ "int",
+ "l_value",
+ null
+ ],
+ [
+ "int",
+ "a_value",
+ "0"
+ ],
+ [
+ "int",
+ "b_value",
+ "0"
+ ]
+ ],
+ "ret_type": null,
+ "static": false,
+ "def": "Percentile(int l_value, int a_value = 0, int b_value = 0)",
+ "py_def": "def __init__(self, l_value: int, a_value: int = 0, b_value: int = 0) -> None"
+ },
+ "__getitem__": {
+ "type": "func",
+ "name": "__getitem__",
+ "doc": {
+ "brief": "Subscript operator",
+ "maixpy": "maix.image.Percentile.__getitem__",
+ "py_doc": "Subscript operator"
+ },
+ "args": [
+ [
+ "int",
+ "index",
+ null
+ ]
+ ],
+ "ret_type": "int&",
+ "static": false,
+ "def": "int &__getitem__(int index)",
+ "py_def": "def __getitem__(self, index: int) -> int"
+ },
+ "value": {
+ "type": "func",
+ "name": "value",
+ "doc": {
+ "brief": "Return the grayscale percentile value (between 0 and 255).",
+ "return": "returns grayscale percentile value",
+ "maixpy": "maix.image.Percentile.value",
+ "py_doc": "Return the grayscale percentile value (between 0 and 255).\n\nReturns: returns grayscale percentile value\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int value()",
+ "py_def": "def value(self) -> int"
+ },
+ "l_value": {
+ "type": "func",
+ "name": "l_value",
+ "doc": {
+ "brief": "Return the l channel percentile value of lab format (between 0 and 100).",
+ "return": "returns l channel percentile value",
+ "maixpy": "maix.image.Percentile.l_value",
+ "py_doc": "Return the l channel percentile value of lab format (between 0 and 100).\n\nReturns: returns l channel percentile value\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int l_value()",
+ "py_def": "def l_value(self) -> int"
+ },
+ "a_value": {
+ "type": "func",
+ "name": "a_value",
+ "doc": {
+ "brief": "Return the a channel percentile value of lab format (between -128 and 127).",
+ "return": "returns a channel percentile value",
+ "maixpy": "maix.image.Percentile.a_value",
+ "py_doc": "Return the a channel percentile value of lab format (between -128 and 127).\n\nReturns: returns a channel percentile value\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int a_value()",
+ "py_def": "def a_value(self) -> int"
+ },
+ "b_value": {
+ "type": "func",
+ "name": "b_value",
+ "doc": {
+ "brief": "Return the b channel percentile value of lab format (between -128 and 127).",
+ "return": "returns b channel percentile value",
+ "maixpy": "maix.image.Percentile.b_value",
+ "py_doc": "Return the b channel percentile value of lab format (between -128 and 127).\n\nReturns: returns b channel percentile value\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int b_value()",
+ "py_def": "def b_value(self) -> int"
+ }
+ },
+ "def": "class Percentile"
+ },
+ "Threshold": {
+ "type": "class",
+ "name": "Threshold",
+ "doc": {
+ "brief": "Threshold class",
+ "maixpy": "maix.image.Threshold",
+ "py_doc": "Threshold class"
+ },
+ "members": {
+ "__init__": {
+ "type": "func",
+ "name": "Threshold",
+ "doc": {
+ "brief": "Threshold constructor",
+ "param": {
+ "l_value": "for grayscale image, it is grayscale threshold value (between 0 and 255).\nfor rgb888 image, it is l channel threshold value of lab (between 0 and 100).",
+ "a_value": "for rgb888 image, it is a channel threshold value of lab format(between -128 and 127).",
+ "b_value": "for rgb888 image, it is b channel threshold value of lab format(between -128 and 127)."
+ },
+ "maixpy": "maix.image.Threshold.__init__",
+ "py_doc": "Threshold constructor\n\nArgs:\n - l_value: for grayscale image, it is grayscale threshold value (between 0 and 255).\nfor rgb888 image, it is l channel threshold value of lab (between 0 and 100).\n - a_value: for rgb888 image, it is a channel threshold value of lab format(between -128 and 127).\n - b_value: for rgb888 image, it is b channel threshold value of lab format(between -128 and 127).\n"
+ },
+ "args": [
+ [
+ "int",
+ "l_value",
+ null
+ ],
+ [
+ "int",
+ "a_value",
+ "0"
+ ],
+ [
+ "int",
+ "b_value",
+ "0"
+ ]
+ ],
+ "ret_type": null,
+ "static": false,
+ "def": "Threshold(int l_value, int a_value = 0, int b_value = 0)",
+ "py_def": "def __init__(self, l_value: int, a_value: int = 0, b_value: int = 0) -> None"
+ },
+ "__getitem__": {
+ "type": "func",
+ "name": "__getitem__",
+ "doc": {
+ "brief": "Subscript operator",
+ "maixpy": "maix.image.Threshold.__getitem__",
+ "py_doc": "Subscript operator"
+ },
+ "args": [
+ [
+ "int",
+ "index",
+ null
+ ]
+ ],
+ "ret_type": "int&",
+ "static": false,
+ "def": "int &__getitem__(int index)",
+ "py_def": "def __getitem__(self, index: int) -> int"
+ },
+ "value": {
+ "type": "func",
+ "name": "value",
+ "doc": {
+ "brief": "Return the grayscale threshold value (between 0 and 255).",
+ "return": "returns grayscale threshold value",
+ "maixpy": "maix.image.Threshold.value",
+ "py_doc": "Return the grayscale threshold value (between 0 and 255).\n\nReturns: returns grayscale threshold value\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int value()",
+ "py_def": "def value(self) -> int"
+ },
+ "l_value": {
+ "type": "func",
+ "name": "l_value",
+ "doc": {
+ "brief": "Return the l channel threshold value of lab format (between 0 and 100).",
+ "return": "returns l channel percentile value",
+ "maixpy": "maix.image.Threshold.l_value",
+ "py_doc": "Return the l channel threshold value of lab format (between 0 and 100).\n\nReturns: returns l channel percentile value\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int l_value()",
+ "py_def": "def l_value(self) -> int"
+ },
+ "a_value": {
+ "type": "func",
+ "name": "a_value",
+ "doc": {
+ "brief": "Return the a channel threshold value of lab format (between -128 and 127).",
+ "return": "returns a channel percentile value",
+ "maixpy": "maix.image.Threshold.a_value",
+ "py_doc": "Return the a channel threshold value of lab format (between -128 and 127).\n\nReturns: returns a channel percentile value\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int a_value()",
+ "py_def": "def a_value(self) -> int"
+ },
+ "b_value": {
+ "type": "func",
+ "name": "b_value",
+ "doc": {
+ "brief": "Return the b channel threshold value of lab format (between -128 and 127).",
+ "return": "returns b channel percentile value",
+ "maixpy": "maix.image.Threshold.b_value",
+ "py_doc": "Return the b channel threshold value of lab format (between -128 and 127).\n\nReturns: returns b channel percentile value\n"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int b_value()",
+ "py_def": "def b_value(self) -> int"
+ }
+ },
+ "def": "class Threshold"
+ },
+ "Histogram": {
+ "type": "class",
+ "name": "Histogram",
+ "doc": {
+ "brief": "Histogram class",
+ "maixpy": "maix.image.Histogram",
+ "py_doc": "Histogram class"
+ },
+ "members": {
+ "__init__": {
+ "type": "func",
+ "name": "Histogram",
+ "doc": {
+ "brief": "Histogram constructor",
+ "param": {
+ "l_value": "for grayscale image, it is grayscale threshold value list (the range of element values in the list is 0 and 255).\nfor rgb888 image, it is l channel threshold value list of lab (the range of element values in the list is 0 and 100).",
+ "a_value": "for rgb888 image, it is a channel threshold value list of lab format(the range of element values in the list is -128 and 127).",
+ "b_value": "for rgb888 image, it is b channel threshold value list of lab format(the range of element values in the list is -128 and 127).",
+ "format": "format of the source image"
+ },
+ "maixpy": "maix.image.Histogram.__init__",
+ "py_doc": "Histogram constructor\n\nArgs:\n - l_value: for grayscale image, it is grayscale threshold value list (the range of element values in the list is 0 and 255).\nfor rgb888 image, it is l channel threshold value list of lab (the range of element values in the list is 0 and 100).\n - a_value: for rgb888 image, it is a channel threshold value list of lab format(the range of element values in the list is -128 and 127).\n - b_value: for rgb888 image, it is b channel threshold value list of lab format(the range of element values in the list is -128 and 127).\n - format: format of the source image\n"
+ },
+ "args": [
+ [
+ "std::vector",
+ "l_bin",
+ null
+ ],
+ [
+ "std::vector",
+ "a_bin",
+ null
+ ],
+ [
+ "std::vector",
+ "b_bin",
+ null
+ ],
+ [
+ "image::Format",
+ "format",
+ "image::Format::FMT_RGB888"
+ ]
+ ],
+ "ret_type": null,
+ "static": false,
+ "def": "Histogram(std::vector l_bin, std::vector a_bin, std::vector b_bin, image::Format format = image::Format::FMT_RGB888)",
+ "py_def": "def __init__(self, l_bin: list[float], a_bin: list[float], b_bin: list[float], format: Format = ...) -> None"
+ },
+ "__getitem__": {
+ "type": "func",
+ "name": "__getitem__",
+ "doc": {
+ "brief": "Subscript operator",
+ "maixpy": "maix.image.Histogram.__getitem__",
+ "py_doc": "Subscript operator"
+ },
+ "args": [
+ [
+ "int",
+ "index",
+ null
+ ]
+ ],
+ "ret_type": "int&",
+ "static": false,
+ "def": "int &__getitem__(int index)",
+ "py_def": "def __getitem__(self, index: int) -> int"
+ },
+ "bins": {
+ "type": "func",
+ "name": "bins",
+ "doc": {
+ "brief": "Returns a list of floats for the grayscale histogram.",
+ "maixpy": "maix.image.Histogram.bins",
+ "py_doc": "Returns a list of floats for the grayscale histogram."
+ },
+ "args": [],
+ "ret_type": "std::vector",
+ "static": false,
+ "def": "std::vector bins()",
+ "py_def": "def bins(self) -> list[float]"
+ },
+ "l_bins": {
+ "type": "func",
+ "name": "l_bins",
+ "doc": {
+ "brief": "Returns a list of floats for the RGB565 histogram LAB L channel.",
+ "maixpy": "maix.image.Histogram.l_bins",
+ "py_doc": "Returns a list of floats for the RGB565 histogram LAB L channel."
+ },
+ "args": [],
+ "ret_type": "std::vector",
+ "static": false,
+ "def": "std::vector l_bins()",
+ "py_def": "def l_bins(self) -> list[float]"
+ },
+ "a_bins": {
+ "type": "func",
+ "name": "a_bins",
+ "doc": {
+ "brief": "Returns a list of floats for the RGB565 histogram LAB A channel.",
+ "maixpy": "maix.image.Histogram.a_bins",
+ "py_doc": "Returns a list of floats for the RGB565 histogram LAB A channel."
+ },
+ "args": [],
+ "ret_type": "std::vector",
+ "static": false,
+ "def": "std::vector a_bins()",
+ "py_def": "def a_bins(self) -> list[float]"
+ },
+ "b_bins": {
+ "type": "func",
+ "name": "b_bins",
+ "doc": {
+ "brief": "Returns a list of floats for the RGB565 histogram LAB B channel.",
+ "maixpy": "maix.image.Histogram.b_bins",
+ "py_doc": "Returns a list of floats for the RGB565 histogram LAB B channel."
+ },
+ "args": [],
+ "ret_type": "std::vector",
+ "static": false,
+ "def": "std::vector b_bins()",
+ "py_def": "def b_bins(self) -> list[float]"
+ },
+ "get_percentile": {
+ "type": "func",
+ "name": "get_percentile",
+ "doc": {
+ "brief": "Computes the CDF of the histogram channels and returns a image::Percentile object",
+ "param": {
+ "percentile": "the values of the histogram at the passed in percentile (0.0 - 1.0) (float).\nSo, if you pass in 0.1 this method will tell you (going from left-to-right in the histogram)\nwhat bin when summed into an accumulator caused the accumulator to cross 0.1. This is useful\nto determine min (with 0.1) and max (with 0.9) of a color distribution without outlier effects\nruining your results for adaptive color tracking."
+ },
+ "return": "image::Percentile object",
+ "maixpy": "maix.image.Histogram.get_percentile",
+ "py_doc": "Computes the CDF of the histogram channels and returns a image::Percentile object\n\nArgs:\n - percentile: the values of the histogram at the passed in percentile (0.0 - 1.0) (float).\nSo, if you pass in 0.1 this method will tell you (going from left-to-right in the histogram)\nwhat bin when summed into an accumulator caused the accumulator to cross 0.1. This is useful\nto determine min (with 0.1) and max (with 0.9) of a color distribution without outlier effects\nruining your results for adaptive color tracking.\n\n\nReturns: image::Percentile object\n"
+ },
+ "args": [
+ [
+ "float",
+ "percentile",
+ null
+ ]
+ ],
+ "ret_type": "image::Percentile",
+ "static": false,
+ "def": "image::Percentile get_percentile(float percentile)",
+ "py_def": "def get_percentile(self, percentile: float) -> Percentile"
+ },
+ "get_threshold": {
+ "type": "func",
+ "name": "get_threshold",
+ "doc": {
+ "brief": "Uses Otsu\u2019s Method to compute the optimal threshold values that split the histogram into two halves for each channel of the histogram and returns a image::Threshold object.",
+ "return": "image::Threshold object",
+ "maixpy": "maix.image.Histogram.get_threshold",
+ "py_doc": "Uses Otsu\u2019s Method to compute the optimal threshold values that split the histogram into two halves for each channel of the histogram and returns a image::Threshold object.\n\nReturns: image::Threshold object\n"
+ },
+ "args": [],
+ "ret_type": "image::Threshold",
+ "static": false,
+ "def": "image::Threshold get_threshold()",
+ "py_def": "def get_threshold(self) -> Threshold"
+ },
+ "get_statistics": {
+ "type": "func",
+ "name": "get_statistics",
+ "doc": {
+ "brief": "Computes the mean, median, mode, standard deviation, min, max, lower quartile, and upper quartile of each color channel in the histogram and returns a image::Statistics object.",
+ "return": "image::Statistics object",
+ "maixpy": "maix.image.Histogram.get_statistics",
+ "py_doc": "Computes the mean, median, mode, standard deviation, min, max, lower quartile, and upper quartile of each color channel in the histogram and returns a image::Statistics object.\n\nReturns: image::Statistics object\n"
+ },
+ "args": [],
+ "ret_type": "image::Statistics",
+ "static": false,
+ "def": "image::Statistics get_statistics()",
+ "py_def": "def get_statistics(self) -> Statistics"
+ }
+ },
+ "def": "class Histogram"
+ },
+ "LBPKeyPoint": {
+ "type": "class",
+ "name": "LBPKeyPoint",
+ "doc": {
+ "brief": "LBPKeyPoint class",
+ "maixpy": "maix.image.LBPKeyPoint",
+ "py_doc": "LBPKeyPoint class"
+ },
+ "members": {
+ "__init__": {
+ "type": "func",
+ "name": "LBPKeyPoint",
+ "doc": {
+ "brief": "LBPKeyPoint constructor",
+ "param": {
+ "data": "The data of the LBPKeyPoint"
+ },
+ "maixpy": "maix.image.LBPKeyPoint.__init__",
+ "py_doc": "LBPKeyPoint constructor\n\nArgs:\n - data: The data of the LBPKeyPoint\n"
+ },
+ "args": [
+ [
+ "std::valarray &",
+ "data",
+ null
+ ]
+ ],
+ "ret_type": null,
+ "static": false,
+ "def": "LBPKeyPoint(std::valarray &data)",
+ "py_def": "def __init__(self, data: list[int]) -> None"
+ }
+ },
+ "def": "class LBPKeyPoint"
+ },
+ "KeyPoint": {
+ "type": "class",
+ "name": "KeyPoint",
+ "doc": {
+ "brief": "KeyPoint class",
+ "maixpy": "maix.image.KeyPoint",
+ "py_doc": "KeyPoint class"
+ },
+ "members": {
+ "__init__": {
+ "type": "func",
+ "name": "KeyPoint",
+ "doc": {
+ "brief": "KeyPoint constructor",
+ "param": {
+ "x": "The x of the KeyPoint",
+ "y": "The y of the KeyPoint",
+ "score": "The score of the KeyPoint",
+ "octave": "The octave of the KeyPoint",
+ "angle": "The angle of the KeyPoint",
+ "matched": "The matched of the KeyPoint",
+ "desc": "The desc of the KeyPoint"
+ },
+ "maixpy": "maix.image.KeyPoint.__init__",
+ "py_doc": "KeyPoint constructor\n\nArgs:\n - x: The x of the KeyPoint\n - y: The y of the KeyPoint\n - score: The score of the KeyPoint\n - octave: The octave of the KeyPoint\n - angle: The angle of the KeyPoint\n - matched: The matched of the KeyPoint\n - desc: The desc of the KeyPoint\n"
+ },
+ "args": [
+ [
+ "uint16_t",
+ "x",
+ null
+ ],
+ [
+ "uint16_t",
+ "y",
+ null
+ ],
+ [
+ "uint16_t",
+ "score",
+ null
+ ],
+ [
+ "uint16_t",
+ "octave",
+ null
+ ],
+ [
+ "uint16_t",
+ "angle",
+ null
+ ],
+ [
+ "uint16_t",
+ "matched",
+ null
+ ],
+ [
+ "std::vector &",
+ "desc",
+ null
+ ]
+ ],
+ "ret_type": null,
+ "static": false,
+ "def": "KeyPoint(uint16_t x, uint16_t y, uint16_t score, uint16_t octave, uint16_t angle, uint16_t matched, std::vector &desc)",
+ "py_def": "def __init__(self, x: int, y: int, score: int, octave: int, angle: int, matched: int, desc: list[int]) -> None"
+ }
+ },
+ "def": "class KeyPoint"
+ },
+ "KPTMatch": {
+ "type": "class",
+ "name": "KPTMatch",
+ "doc": {
+ "brief": "KPTMatch class",
+ "maixpy": "maix.image.KPTMatch",
+ "py_doc": "KPTMatch class"
+ },
+ "members": {
+ "__init__": {
+ "type": "func",
+ "name": "KPTMatch",
+ "doc": {
+ "brief": "KPTMatch constructor",
+ "param": {
+ "cx": "The cx of the KPTMatch",
+ "cy": "The cy of the KPTMatch",
+ "x": "The x of the KPTMatch",
+ "y": "The y of the KPTMatch",
+ "w": "The w of the KPTMatch",
+ "h": "The h of the KPTMatch",
+ "score": "The score of the KPTMatch",
+ "theta": "The theta of the KPTMatch",
+ "match": "The match of the KPTMatch"
+ },
+ "maixpy": "maix.image.KPTMatch.__init__",
+ "py_doc": "KPTMatch constructor\n\nArgs:\n - cx: The cx of the KPTMatch\n - cy: The cy of the KPTMatch\n - x: The x of the KPTMatch\n - y: The y of the KPTMatch\n - w: The w of the KPTMatch\n - h: The h of the KPTMatch\n - score: The score of the KPTMatch\n - theta: The theta of the KPTMatch\n - match: The match of the KPTMatch\n"
+ },
+ "args": [
+ [
+ "int",
+ "cx",
+ null
+ ],
+ [
+ "int",
+ "cy",
+ null
+ ],
+ [
+ "int",
+ "x",
+ null
+ ],
+ [
+ "int",
+ "y",
+ null
+ ],
+ [
+ "int",
+ "w",
+ null
+ ],
+ [
+ "int",
+ "h",
+ null
+ ],
+ [
+ "int",
+ "score",
+ null
+ ],
+ [
+ "int",
+ "theta",
+ null
+ ],
+ [
+ "int",
+ "match",
+ null
+ ]
+ ],
+ "ret_type": null,
+ "static": false,
+ "def": "KPTMatch(int cx, int cy, int x, int y, int w, int h, int score, int theta, int match)",
+ "py_def": "def __init__(self, cx: int, cy: int, x: int, y: int, w: int, h: int, score: int, theta: int, match: int) -> None"
+ }
+ },
+ "def": "class KPTMatch"
+ },
+ "ORBKeyPoint": {
+ "type": "class",
+ "name": "ORBKeyPoint",
+ "doc": {
+ "brief": "ORBKeyPoint class",
+ "maixpy": "maix.image.ORBKeyPoint",
+ "py_doc": "ORBKeyPoint class"
+ },
+ "members": {
+ "__init__": {
+ "type": "func",
+ "name": "ORBKeyPoint",
+ "doc": {
+ "brief": "ORBKeyPoint constructor",
+ "param": {
+ "data": "The data of the ORBKeyPoint",
+ "threshold": "The threshold of the ORBKeyPoint",
+ "normalized": "The normalized of the ORBKeyPoint"
+ },
+ "maixpy": "maix.image.ORBKeyPoint.__init__",
+ "py_doc": "ORBKeyPoint constructor\n\nArgs:\n - data: The data of the ORBKeyPoint\n - threshold: The threshold of the ORBKeyPoint\n - normalized: The normalized of the ORBKeyPoint\n"
+ },
+ "args": [
+ [
+ "std::vector &",
+ "data",
+ null
+ ],
+ [
+ "int",
+ "threshold",
+ null
+ ],
+ [
+ "bool",
+ "normalized",
+ null
+ ]
+ ],
+ "ret_type": null,
+ "static": false,
+ "def": "ORBKeyPoint(std::vector &data, int threshold, bool normalized)",
+ "py_def": "def __init__(self, data: list[KeyPoint], threshold: int, normalized: bool) -> None"
+ },
+ "get_data": {
+ "type": "func",
+ "name": "get_data",
+ "doc": {
+ "brief": "get data of ORBKeyPoint",
+ "return": "return data of the ORBKeyPoint, type is std::vector",
+ "maixpy": "maix.image.ORBKeyPoint.get_data",
+ "py_doc": "get data of ORBKeyPoint\n\nReturns: return data of the ORBKeyPoint, type is std::vector\n"
+ },
+ "args": [],
+ "ret_type": "std::vector",
+ "static": false,
+ "def": "std::vector get_data()",
+ "py_def": "def get_data(self) -> list[KeyPoint]"
+ }
+ },
+ "def": "class ORBKeyPoint"
+ },
+ "HaarCascade": {
+ "type": "class",
+ "name": "HaarCascade",
+ "doc": {
+ "brief": "HaarCascade class",
+ "maixpy": "maix.image.HaarCascade",
+ "py_doc": "HaarCascade class"
+ },
+ "members": {
+ "__init__": {
+ "type": "func",
+ "name": "HaarCascade",
+ "doc": {
+ "brief": "HaarCascade constructor",
+ "param": {
+ "data": "The data of the HaarCascade",
+ "threshold": "The threshold of the HaarCascade",
+ "normalized": "The normalized of the HaarCascade"
+ },
+ "maixpy": "maix.image.HaarCascade.__init__",
+ "py_doc": "HaarCascade constructor\n\nArgs:\n - data: The data of the HaarCascade\n - threshold: The threshold of the HaarCascade\n - normalized: The normalized of the HaarCascade\n"
+ },
+ "args": [],
+ "ret_type": null,
+ "static": false,
+ "def": "HaarCascade()",
+ "py_def": "def __init__(self) -> None"
+ }
+ },
+ "def": "class HaarCascade"
+ },
+ "Color": {
+ "type": "class",
+ "name": "Color",
+ "doc": {
+ "brief": "Color class",
+ "maixpy": "maix.image.Color",
+ "py_doc": "Color class"
+ },
+ "members": {
+ "__init__": {
+ "type": "func",
+ "name": "Color",
+ "doc": {
+ "brief": "Color constructor",
+ "param": {
+ "alpha": "alpha channel, value range: 0 ~ 1"
+ },
+ "maixpy": "maix.image.Color.__init__",
+ "py_doc": "Color constructor\n\nArgs:\n - alpha: alpha channel, value range: 0 ~ 1\n"
+ },
+ "args": [
+ [
+ "uint8_t",
+ "ch1",
+ null
+ ],
+ [
+ "uint8_t",
+ "ch2",
+ "0"
+ ],
+ [
+ "uint8_t",
+ "ch3",
+ "0"
+ ],
+ [
+ "float",
+ "alpha",
+ "0"
+ ],
+ [
+ "image::Format",
+ "format",
+ "image::FMT_GRAYSCALE"
+ ]
+ ],
+ "ret_type": null,
+ "static": false,
+ "def": "Color(uint8_t ch1, uint8_t ch2 = 0, uint8_t ch3 = 0, float alpha = 0, image::Format format = image::FMT_GRAYSCALE)",
+ "py_def": "def __init__(self, ch1: int, ch2: int = 0, ch3: int = 0, alpha: float = 0, format: Format = ...) -> None"
+ },
+ "r": {
+ "type": "var",
+ "name": "r",
+ "doc": {
+ "brief": "Color red channel",
+ "maixpy": "maix.image.Color.r",
+ "py_doc": "Color red channel"
+ },
+ "value": null,
+ "static": false,
+ "readonly": false,
+ "def": "uint8_t r"
+ },
+ "g": {
+ "type": "var",
+ "name": "g",
+ "doc": {
+ "brief": "Color green channel",
+ "maixpy": "maix.image.Color.g",
+ "py_doc": "Color green channel"
+ },
+ "value": null,
+ "static": false,
+ "readonly": false,
+ "def": "uint8_t g"
+ },
+ "b": {
+ "type": "var",
+ "name": "b",
+ "doc": {
+ "brief": "Color blue channel",
+ "maixpy": "maix.image.Color.b",
+ "py_doc": "Color blue channel"
+ },
+ "value": null,
+ "static": false,
+ "readonly": false,
+ "def": "uint8_t b"
+ },
+ "alpha": {
+ "type": "var",
+ "name": "alpha",
+ "doc": {
+ "brief": "Color alpha channel, value from 0.0 to 1.0, float value",
+ "maixpy": "maix.image.Color.alpha",
+ "py_doc": "Color alpha channel, value from 0.0 to 1.0, float value"
+ },
+ "value": null,
+ "static": false,
+ "readonly": false,
+ "def": "float alpha"
+ },
+ "gray": {
+ "type": "var",
+ "name": "gray",
+ "doc": {
+ "brief": "Color gray channel",
+ "maixpy": "maix.image.Color.gray",
+ "py_doc": "Color gray channel"
+ },
+ "value": null,
+ "static": false,
+ "readonly": false,
+ "def": "uint8_t gray"
+ },
+ "format": {
+ "type": "var",
+ "name": "format",
+ "doc": {
+ "brief": "Color format",
+ "maixpy": "maix.image.Color.format",
+ "py_doc": "Color format"
+ },
+ "value": null,
+ "static": false,
+ "readonly": false,
+ "def": "image::Format format"
+ },
+ "hex": {
+ "type": "func",
+ "name": "hex",
+ "doc": {
+ "brief": "Get color's hex value",
+ "maixpy": "maix.image.Color.hex",
+ "py_doc": "Get color's hex value"
+ },
+ "args": [],
+ "ret_type": "uint32_t",
+ "static": false,
+ "def": "uint32_t hex()",
+ "py_def": "def hex(self) -> int"
+ },
+ "from_rgb": {
+ "type": "func",
+ "name": "from_rgb",
+ "doc": {
+ "brief": "Create Color object from RGB channels",
+ "maixpy": "maix.image.Color.from_rgb",
+ "py_doc": "Create Color object from RGB channels"
+ },
+ "args": [
+ [
+ "uint8_t",
+ "r",
+ null
+ ],
+ [
+ "uint8_t",
+ "g",
+ null
+ ],
+ [
+ "uint8_t",
+ "b",
+ null
+ ]
+ ],
+ "ret_type": "image::Color",
+ "static": true,
+ "def": "static image::Color from_rgb(uint8_t r, uint8_t g, uint8_t b)",
+ "py_def": "def from_rgb(r: int, g: int, b: int) -> Color"
+ },
+ "from_bgr": {
+ "type": "func",
+ "name": "from_bgr",
+ "doc": {
+ "brief": "Create Color object from BGR channels",
+ "maixpy": "maix.image.Color.from_bgr",
+ "py_doc": "Create Color object from BGR channels"
+ },
+ "args": [
+ [
+ "uint8_t",
+ "b",
+ null
+ ],
+ [
+ "uint8_t",
+ "g",
+ null
+ ],
+ [
+ "uint8_t",
+ "r",
+ null
+ ]
+ ],
+ "ret_type": "image::Color",
+ "static": true,
+ "def": "static image::Color from_bgr(uint8_t b, uint8_t g, uint8_t r)",
+ "py_def": "def from_bgr(b: int, g: int, r: int) -> Color"
+ },
+ "from_gray": {
+ "type": "func",
+ "name": "from_gray",
+ "doc": {
+ "brief": "Create Color object from gray channel",
+ "maixpy": "maix.image.Color.from_gray",
+ "py_doc": "Create Color object from gray channel"
+ },
+ "args": [
+ [
+ "uint8_t",
+ "gray",
+ null
+ ]
+ ],
+ "ret_type": "image::Color",
+ "static": true,
+ "def": "static image::Color from_gray(uint8_t gray)",
+ "py_def": "def from_gray(gray: int) -> Color"
+ },
+ "from_rgba": {
+ "type": "func",
+ "name": "from_rgba",
+ "doc": {
+ "brief": "Create Color object from RGBA channels",
+ "param": {
+ "alpha": "alpha channel, float value, value range: 0 ~ 1"
+ },
+ "maixpy": "maix.image.Color.from_rgba",
+ "py_doc": "Create Color object from RGBA channels\n\nArgs:\n - alpha: alpha channel, float value, value range: 0 ~ 1\n"
+ },
+ "args": [
+ [
+ "uint8_t",
+ "r",
+ null
+ ],
+ [
+ "uint8_t",
+ "g",
+ null
+ ],
+ [
+ "uint8_t",
+ "b",
+ null
+ ],
+ [
+ "float",
+ "alpha",
+ null
+ ]
+ ],
+ "ret_type": "image::Color",
+ "static": true,
+ "def": "static image::Color from_rgba(uint8_t r, uint8_t g, uint8_t b, float alpha)",
+ "py_def": "def from_rgba(r: int, g: int, b: int, alpha: float) -> Color"
+ },
+ "from_bgra": {
+ "type": "func",
+ "name": "from_bgra",
+ "doc": {
+ "brief": "Create Color object from BGRA channels",
+ "param": {
+ "alpha": "alpha channel, float value, value range: 0 ~ 1"
+ },
+ "maixpy": "maix.image.Color.from_bgra",
+ "py_doc": "Create Color object from BGRA channels\n\nArgs:\n - alpha: alpha channel, float value, value range: 0 ~ 1\n"
+ },
+ "args": [
+ [
+ "uint8_t",
+ "b",
+ null
+ ],
+ [
+ "uint8_t",
+ "g",
+ null
+ ],
+ [
+ "uint8_t",
+ "r",
+ null
+ ],
+ [
+ "float",
+ "alpha",
+ null
+ ]
+ ],
+ "ret_type": "image::Color",
+ "static": true,
+ "def": "static image::Color from_bgra(uint8_t b, uint8_t g, uint8_t r, float alpha)",
+ "py_def": "def from_bgra(b: int, g: int, r: int, alpha: float) -> Color"
+ },
+ "from_hex": {
+ "type": "func",
+ "name": "from_hex",
+ "doc": {
+ "brief": "Create Color object from hex value",
+ "param": {
+ "hex": "hex value, e.g. 0x0000FF00, lower address if first channel",
+ "format": "color format, @see image::Format"
+ },
+ "maixpy": "maix.image.Color.from_hex",
+ "py_doc": "Create Color object from hex value\n\nArgs:\n - hex: hex value, e.g. 0x0000FF00, lower address if first channel\n - format: color format, @see image::Format\n"
+ },
+ "args": [
+ [
+ "uint32_t",
+ "hex",
+ null
+ ],
+ [
+ "image::Format &",
+ "format",
+ null
+ ]
+ ],
+ "ret_type": "image::Color",
+ "static": true,
+ "def": "static image::Color from_hex(uint32_t hex, image::Format &format)",
+ "py_def": "def from_hex(hex: int, format: Format) -> Color"
+ },
+ "to_format": {
+ "type": "func",
+ "name": "to_format",
+ "doc": {
+ "brief": "Convert Color format",
+ "param": {
+ "format": "format want to convert to, @see image::Format, only support RGB888, BGR888, RGBA8888, BGRA8888, GRAYSCALE."
+ },
+ "maixpy": "maix.image.Color.to_format",
+ "py_doc": "Convert Color format\n\nArgs:\n - format: format want to convert to, @see image::Format, only support RGB888, BGR888, RGBA8888, BGRA8888, GRAYSCALE.\n"
+ },
+ "args": [
+ [
+ "const image::Format &",
+ "format",
+ null
+ ]
+ ],
+ "ret_type": "void",
+ "static": false,
+ "def": "void to_format(const image::Format &format)",
+ "py_def": "def to_format(self, format: Format) -> None"
+ },
+ "to_format2": {
+ "type": "func",
+ "name": "to_format2",
+ "doc": {
+ "brief": "Convert color format and return a new Color object",
+ "param": {
+ "format": "format want to convert to, @see image::Format, only support RGB888, BGR888, RGBA8888, BGRA8888, GRAYSCALE."
+ },
+ "return": "new Color object, you need to delete it manually in C++.",
+ "maixpy": "maix.image.Color.to_format2",
+ "py_doc": "Convert color format and return a new Color object\n\nArgs:\n - format: format want to convert to, @see image::Format, only support RGB888, BGR888, RGBA8888, BGRA8888, GRAYSCALE.\n\n\nReturns: new Color object, you need to delete it manually in C++.\n"
+ },
+ "args": [
+ [
+ "const image::Format &",
+ "format",
+ null
+ ]
+ ],
+ "ret_type": "image::Color*",
+ "static": false,
+ "def": "image::Color *to_format2(const image::Format &format)",
+ "py_def": "def to_format2(self, format: Format) -> Color"
+ }
+ },
+ "def": "class Color"
+ },
+ "COLOR_WHITE": {
+ "type": "var",
+ "name": "",
+ "doc": {
+ "brief": "Predefined color white",
+ "maixpy": "maix.image.COLOR_WHITE",
+ "py_doc": "Predefined color white"
+ },
+ "value": "image::Color::from_rgb(255, 255, 255)",
+ "static": false,
+ "readonly": true,
+ "def": "const image::Color COLOR_WHITE = image::Color::from_rgb(255, 255, 255)"
+ },
+ "COLOR_BLACK": {
+ "type": "var",
+ "name": "",
+ "doc": {
+ "brief": "Predefined color black",
+ "maixpy": "maix.image.COLOR_BLACK",
+ "py_doc": "Predefined color black"
+ },
+ "value": "image::Color::from_rgb(0, 0, 0)",
+ "static": false,
+ "readonly": true,
+ "def": "const image::Color COLOR_BLACK = image::Color::from_rgb(0, 0, 0)"
+ },
+ "COLOR_RED": {
+ "type": "var",
+ "name": "",
+ "doc": {
+ "brief": "Predefined color red",
+ "maixpy": "maix.image.COLOR_RED",
+ "py_doc": "Predefined color red"
+ },
+ "value": "image::Color::from_rgb(255, 0, 0)",
+ "static": false,
+ "readonly": true,
+ "def": "const image::Color COLOR_RED = image::Color::from_rgb(255, 0, 0)"
+ },
+ "COLOR_GREEN": {
+ "type": "var",
+ "name": "",
+ "doc": {
+ "brief": "Predefined color green",
+ "maixpy": "maix.image.COLOR_GREEN",
+ "py_doc": "Predefined color green"
+ },
+ "value": "image::Color::from_rgb(0, 255, 0)",
+ "static": false,
+ "readonly": true,
+ "def": "const image::Color COLOR_GREEN = image::Color::from_rgb(0, 255, 0)"
+ },
+ "COLOR_BLUE": {
+ "type": "var",
+ "name": "",
+ "doc": {
+ "brief": "Predefined color blue",
+ "maixpy": "maix.image.COLOR_BLUE",
+ "py_doc": "Predefined color blue"
+ },
+ "value": "image::Color::from_rgb(0, 0, 255)",
+ "static": false,
+ "readonly": true,
+ "def": "const image::Color COLOR_BLUE = image::Color::from_rgb(0, 0, 255)"
+ },
+ "COLOR_YELLOW": {
+ "type": "var",
+ "name": "",
+ "doc": {
+ "brief": "Predefined color yellow",
+ "maixpy": "maix.image.COLOR_YELLOW",
+ "py_doc": "Predefined color yellow"
+ },
+ "value": "image::Color::from_rgb(255, 255, 0)",
+ "static": false,
+ "readonly": true,
+ "def": "const image::Color COLOR_YELLOW = image::Color::from_rgb(255, 255, 0)"
+ },
+ "COLOR_PURPLE": {
+ "type": "var",
+ "name": "",
+ "doc": {
+ "brief": "Predefined color purple",
+ "maixpy": "maix.image.COLOR_PURPLE",
+ "py_doc": "Predefined color purple"
+ },
+ "value": "image::Color::from_rgb(143, 0, 255)",
+ "static": false,
+ "readonly": true,
+ "def": "const image::Color COLOR_PURPLE = image::Color::from_rgb(143, 0, 255)"
+ },
+ "COLOR_ORANGE": {
+ "type": "var",
+ "name": "",
+ "doc": {
+ "brief": "Predefined color orange",
+ "maixpy": "maix.image.COLOR_ORANGE",
+ "py_doc": "Predefined color orange"
+ },
+ "value": "image::Color::from_rgb(255, 127, 0)",
+ "static": false,
+ "readonly": true,
+ "def": "const image::Color COLOR_ORANGE = image::Color::from_rgb(255, 127, 0)"
+ },
+ "COLOR_GRAY": {
+ "type": "var",
+ "name": "",
+ "doc": {
+ "brief": "Predefined color gray",
+ "maixpy": "maix.image.COLOR_GRAY",
+ "py_doc": "Predefined color gray"
+ },
+ "value": "image::Color::from_rgb(127, 127, 127)",
+ "static": false,
+ "readonly": true,
+ "def": "const image::Color COLOR_GRAY = image::Color::from_rgb(127, 127, 127)"
+ },
+ "resize_map_pos": {
+ "type": "func",
+ "name": "resize_map_pos",
+ "doc": {
+ "brief": "map point position or rectangle position from one image size to another image size(resize)",
+ "param": {
+ "int": "h_out target image height",
+ "fit": "resize method, see maix.image.Fit",
+ "x": "original point x, or rectagle left-top point's x",
+ "y": "original point y, or rectagle left-top point's y",
+ "w": "original rectagle width, can be -1 if not use this arg, default -1.",
+ "h": "original rectagle height, can be -1 if not use this arg, default -1."
+ },
+ "return": "list type, [x, y] if map point, [x, y, w, h] if resize rectangle.",
+ "maixpy": "maix.image.resize_map_pos",
+ "py_doc": "map point position or rectangle position from one image size to another image size(resize)\n\nArgs:\n - int: h_out target image height\n - fit: resize method, see maix.image.Fit\n - x: original point x, or rectagle left-top point's x\n - y: original point y, or rectagle left-top point's y\n - w: original rectagle width, can be -1 if not use this arg, default -1.\n - h: original rectagle height, can be -1 if not use this arg, default -1.\n\n\nReturns: list type, [x, y] if map point, [x, y, w, h] if resize rectangle.\n"
+ },
+ "args": [
+ [
+ "int",
+ "w_in",
+ null
+ ],
+ [
+ "int",
+ "h_in",
+ null
+ ],
+ [
+ "int",
+ "w_out",
+ null
+ ],
+ [
+ "int",
+ "h_out",
+ null
+ ],
+ [
+ "image::Fit",
+ "fit",
+ null
+ ],
+ [
+ "int",
+ "x",
+ null
+ ],
+ [
+ "int",
+ "y",
+ null
+ ],
+ [
+ "int",
+ "w",
+ "-1"
+ ],
+ [
+ "int",
+ "h",
+ "-1"
+ ]
+ ],
+ "ret_type": "std::vector",
+ "static": false,
+ "def": "std::vector resize_map_pos(int w_in, int h_in, int w_out, int h_out, image::Fit fit, int x, int y, int w = -1, int h = -1)",
+ "overload": [
+ {
+ "type": "func",
+ "name": "resize_map_pos",
+ "doc": {
+ "brief": "map point position or rectangle position from this image size to another image size(resize)",
+ "param": {
+ "int": "h_out target image height",
+ "fit": "resize method, see maix.image.Fit",
+ "x": "original point x, or rectagle left-top point's x",
+ "y": "original point y, or rectagle left-top point's y",
+ "w": "original rectagle width, can be -1 if not use this arg, default -1.",
+ "h": "original rectagle height, can be -1 if not use this arg, default -1."
+ },
+ "return": "list type, [x, y] if map point, [x, y, w, h] if resize rectangle.",
+ "maixpy": "maix.image.resize_map_pos",
+ "py_doc": "map point position or rectangle position from this image size to another image size(resize)\n\nArgs:\n - int: h_out target image height\n - fit: resize method, see maix.image.Fit\n - x: original point x, or rectagle left-top point's x\n - y: original point y, or rectagle left-top point's y\n - w: original rectagle width, can be -1 if not use this arg, default -1.\n - h: original rectagle height, can be -1 if not use this arg, default -1.\n\n\nReturns: list type, [x, y] if map point, [x, y, w, h] if resize rectangle.\n"
+ },
+ "args": [
+ [
+ "int",
+ "w_out",
+ null
+ ],
+ [
+ "int",
+ "h_out",
+ null
+ ],
+ [
+ "image::Fit",
+ "fit",
+ null
+ ],
+ [
+ "int",
+ "x",
+ null
+ ],
+ [
+ "int",
+ "y",
+ null
+ ],
+ [
+ "int",
+ "w",
+ "-1"
+ ],
+ [
+ "int",
+ "h",
+ "-1"
+ ]
+ ],
+ "ret_type": "std::vector",
+ "static": false,
+ "def": "std::vector resize_map_pos(int w_out, int h_out, image::Fit fit, int x, int y, int w = -1, int h = -1)"
+ }
+ ],
+ "py_def": "def resize_map_pos(w_in: int, h_in: int, w_out: int, h_out: int, fit: Fit, x: int, y: int, w: int = -1, h: int = -1) -> list[int]"
+ },
+ "resize_map_pos_reverse": {
+ "type": "func",
+ "name": "resize_map_pos_reverse",
+ "doc": {
+ "brief": "reverse resize_map_pos method, when we call image.resize method resiz image 'a' to image 'b', we want to known the original position on 'a' whith a knew point on 'b'",
+ "param": {
+ "int": "h_out image height after resized",
+ "fit": "resize method, see maix.image.Fit",
+ "x": "point on resized image x, or rectagle left-top point's x",
+ "y": "original point y, or rectagle left-top point's y",
+ "w": "original rectagle width, can be -1 if not use this arg, default -1.",
+ "h": "original rectagle height, can be -1 if not use this arg, default -1."
+ },
+ "return": "list type, [x, y] if map point, [x, y, w, h] if resize rectangle.",
+ "maixpy": "maix.image.resize_map_pos_reverse",
+ "py_doc": "reverse resize_map_pos method, when we call image.resize method resiz image 'a' to image 'b', we want to known the original position on 'a' whith a knew point on 'b'\n\nArgs:\n - int: h_out image height after resized\n - fit: resize method, see maix.image.Fit\n - x: point on resized image x, or rectagle left-top point's x\n - y: original point y, or rectagle left-top point's y\n - w: original rectagle width, can be -1 if not use this arg, default -1.\n - h: original rectagle height, can be -1 if not use this arg, default -1.\n\n\nReturns: list type, [x, y] if map point, [x, y, w, h] if resize rectangle.\n"
+ },
+ "args": [
+ [
+ "int",
+ "w_in",
+ null
+ ],
+ [
+ "int",
+ "h_in",
+ null
+ ],
+ [
+ "int",
+ "w_out",
+ null
+ ],
+ [
+ "int",
+ "h_out",
+ null
+ ],
+ [
+ "image::Fit",
+ "fit",
+ null
+ ],
+ [
+ "int",
+ "x",
+ null
+ ],
+ [
+ "int",
+ "y",
+ null
+ ],
+ [
+ "int",
+ "w",
+ "-1"
+ ],
+ [
+ "int",
+ "h",
+ "-1"
+ ]
+ ],
+ "ret_type": "std::vector",
+ "static": false,
+ "def": "std::vector resize_map_pos_reverse(int w_in, int h_in, int w_out, int h_out, image::Fit fit, int x, int y, int w = -1, int h = -1)",
+ "py_def": "def resize_map_pos_reverse(w_in: int, h_in: int, w_out: int, h_out: int, fit: Fit, x: int, y: int, w: int = -1, h: int = -1) -> list[int]"
+ },
+ "Image": {
+ "type": "class",
+ "name": "Image",
+ "doc": {
+ "brief": "Image class",
+ "maixpy": "maix.image.Image",
+ "py_doc": "Image class"
+ },
+ "members": {
+ "__init__": {
+ "type": "func",
+ "name": "Image",
+ "doc": {
+ "brief": "Image constructor",
+ "param": {
+ "width": "image width, should > 0",
+ "height": "image height, should > 0",
+ "format": "image format @see image::Format"
+ },
+ "maixpy": "maix.image.Image.__init__",
+ "maixcdk": "maix.image.Image.Image",
+ "py_doc": "Image constructor\n\nArgs:\n - width: image width, should > 0\n - height: image height, should > 0\n - format: image format @see image::Format\n"
+ },
+ "args": [
+ [
+ "int",
+ "width",
+ null
+ ],
+ [
+ "int",
+ "height",
+ null
+ ],
+ [
+ "image::Format",
+ "format",
+ "image::Format::FMT_RGB888"
+ ]
+ ],
+ "ret_type": null,
+ "static": false,
+ "def": "Image(int width, int height, image::Format format = image::Format::FMT_RGB888)",
+ "py_def": "def __init__(self, width: int, height: int, format: Format = ...) -> None"
+ },
+ "format": {
+ "type": "func",
+ "name": "format",
+ "doc": {
+ "brief": "Get image's format",
+ "see": "image.Format",
+ "maixpy": "maix.image.Image.format",
+ "py_doc": "Get image's format"
+ },
+ "args": [],
+ "ret_type": "image::Format",
+ "static": false,
+ "def": "image::Format format()",
+ "py_def": "def format(self) -> Format"
+ },
+ "size": {
+ "type": "func",
+ "name": "size",
+ "doc": {
+ "brief": "Get image's size, [width, height]",
+ "maixpy": "maix.image.Image.size",
+ "py_doc": "Get image's size, [width, height]"
+ },
+ "args": [],
+ "ret_type": "image::Size",
+ "static": false,
+ "def": "image::Size size()",
+ "py_def": "def size(self) -> Size"
+ },
+ "data_size": {
+ "type": "func",
+ "name": "data_size",
+ "doc": {
+ "brief": "Get image's data size",
+ "maixpy": "maix.image.Image.data_size",
+ "py_doc": "Get image's data size"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int data_size()",
+ "py_def": "def data_size(self) -> int"
+ },
+ "width": {
+ "type": "func",
+ "name": "width",
+ "doc": {
+ "brief": "Get image's width",
+ "maixpy": "maix.image.Image.width",
+ "py_doc": "Get image's width"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int width()",
+ "py_def": "def width(self) -> int"
+ },
+ "height": {
+ "type": "func",
+ "name": "height",
+ "doc": {
+ "brief": "Get image's height",
+ "maixpy": "maix.image.Image.height",
+ "py_doc": "Get image's height"
+ },
+ "args": [],
+ "ret_type": "int",
+ "static": false,
+ "def": "int height()",
+ "py_def": "def height(self) -> int"
+ },
+ "data": {
+ "type": "func",
+ "name": "data",
+ "doc": {
+ "brief": "Get image's data pointer.\\nIn MaixPy is capsule object.",
+ "maixpy": "maix.image.Image.data",
+ "py_doc": "Get image's data pointer.\nIn MaixPy is capsule object."
+ },
+ "args": [],
+ "ret_type": "void*",
+ "static": false,
+ "def": "void *data()",
+ "py_def": "def data(self) -> capsule"
+ },
+ "__str__": {
+ "type": "func",
+ "name": "__str__",
+ "doc": {
+ "brief": "To string method",
+ "maixpy": "maix.image.Image.__str__",
+ "py_doc": "To string method"
+ },
+ "args": [],
+ "ret_type": "std::string",
+ "static": false,
+ "def": "std::string __str__()",
+ "py_def": "def __str__(self) -> str"
+ },
+ "to_str": {
+ "type": "func",
+ "name": "to_str",
+ "doc": {
+ "brief": "To string method",
+ "maixpy": "maix.image.Image.to_str",
+ "py_doc": "To string method"
+ },
+ "args": [],
+ "ret_type": "std::string",
+ "static": false,
+ "def": "std::string to_str()",
+ "py_def": "def to_str(self) -> str"
+ },
+ "get_pixel": {
+ "type": "func",
+ "name": "get_pixel",
+ "doc": {
+ "brief": "Get pixel of image",
+ "param": {
+ "x": "pixel's coordinate x. x must less than image's width",
+ "y": "pixel's coordinate y. y must less than image's height",
+ "rgbtuple": "switch return value method. rgbtuple decides whether to split the return or not. default is false."
+ },
+ "return": "pixel value,\nAccording to image format and rgbtuple, return different value:\nformat is FMT_RGB888, rgbtuple is true, return [R, G, B]; rgbtuple is false, return [RGB]\nforamt is FMT_BGR888, rgbtuple is true, return [B, G, R]; rgbtuple is false, return [BGR]\nformat is FMT_GRAYSCALE, return [GRAY];",
+ "maixpy": "maix.image.Image.get_pixel",
+ "py_doc": "Get pixel of image\n\nArgs:\n - x: pixel's coordinate x. x must less than image's width\n - y: pixel's coordinate y. y must less than image's height\n - rgbtuple: switch return value method. rgbtuple decides whether to split the return or not. default is false.\n\n\nReturns: pixel value,\nAccording to image format and rgbtuple, return different value:\nformat is FMT_RGB888, rgbtuple is true, return [R, G, B]; rgbtuple is false, return [RGB]\nforamt is FMT_BGR888, rgbtuple is true, return [B, G, R]; rgbtuple is false, return [BGR]\nformat is FMT_GRAYSCALE, return [GRAY];\n"
+ },
+ "args": [
+ [
+ "int",
+ "x",
+ null
+ ],
+ [
+ "int",
+ "y",
+ null
+ ],
+ [
+ "bool",
+ "rgbtuple",
+ "false"
+ ]
+ ],
+ "ret_type": "std::vector",
+ "static": false,
+ "def": "std::vector get_pixel(int x, int y, bool rgbtuple = false)",
+ "py_def": "def get_pixel(self, x: int, y: int, rgbtuple: bool = False) -> list[int]"
+ },
+ "set_pixel": {
+ "type": "func",
+ "name": "set_pixel",
+ "doc": {
+ "brief": "Set pixel of image",
+ "param": {
+ "x": "pixel's coordinate x. x must less than image's width",
+ "y": "pixel's coordinate y. y must less than image's height",
+ "pixel": "pixel value, according to image format and size of pixel, has different operation:\nformat is FMT_RGB888, pixel size must be 1 or 3, if size is 1, will split pixel[0] to [R, G, B]; if size is 3, will use pixel directly\nformat is FMT_BGR888, pixel size must be 1 or 3, if size is 1, will split pixel[0] to [B, G, R]; if size is 3, will use pixel directly\nformat is FMT_GRAYSCALE, pixel size must be 1, will use pixel directly"
+ },
+ "return": "error code, Err::ERR_NONE is ok, other is error",
+ "maixpy": "maix.image.Image.set_pixel",
+ "py_doc": "Set pixel of image\n\nArgs:\n - x: pixel's coordinate x. x must less than image's width\n - y: pixel's coordinate y. y must less than image's height\n - pixel: pixel value, according to image format and size of pixel, has different operation:\nformat is FMT_RGB888, pixel size must be 1 or 3, if size is 1, will split pixel[0] to [R, G, B]; if size is 3, will use pixel directly\nformat is FMT_BGR888, pixel size must be 1 or 3, if size is 1, will split pixel[0] to [B, G, R]; if size is 3, will use pixel directly\nformat is FMT_GRAYSCALE, pixel size must be 1, will use pixel directly\n\n\nReturns: error code, Err::ERR_NONE is ok, other is error\n"
+ },
+ "args": [
+ [
+ "int",
+ "x",
+ null
+ ],
+ [
+ "int",
+ "y",
+ null
+ ],
+ [
+ "std::vector",
+ "pixel",
+ null
+ ]
+ ],
+ "ret_type": "err::Err",
+ "static": false,
+ "def": "err::Err set_pixel(int x, int y, std::vector pixel)",
+ "py_def": "def set_pixel(self, x: int, y: int, pixel: list[int]) -> maix.err.Err"
+ },
+ "to_tensor": {
+ "type": "func",
+ "name": "to_tensor",
+ "doc": {
+ "brief": "Convert Image object to tensor::Tensor object",
+ "param": {
+ "chw": "if true, the shape of tensor is [C, H, W], else [H, W, C]",
+ "copy": "if true, will alloc memory for tensor data, else will use the memory of Image object"
+ },
+ "return": "tensor::Tensor object pointer, an allocated tensor object",
+ "maixpy": "maix.image.Image.to_tensor",
+ "py_doc": "Convert Image object to tensor::Tensor object\n\nArgs:\n - chw: if true, the shape of tensor is [C, H, W], else [H, W, C]\n - copy: if true, will alloc memory for tensor data, else will use the memory of Image object\n\n\nReturns: tensor::Tensor object pointer, an allocated tensor object\n"
+ },
+ "args": [
+ [
+ "bool",
+ "chw",
+ "false"
+ ],
+ [
+ "bool",
+ "copy",
+ "true"
+ ]
+ ],
+ "ret_type": "tensor::Tensor*",
+ "static": false,
+ "def": "tensor::Tensor *to_tensor(bool chw = false, bool copy = true)",
+ "py_def": "def to_tensor(self, chw: bool = False, copy: bool = True) -> maix.tensor.Tensor"
+ },
+ "to_bytes": {
+ "type": "func",
+ "name": "to_bytes",
+ "doc": {
+ "brief": "Get image's data and convert to array bytes",
+ "param": {
+ "copy": "if true, will alloc memory and copy data to new buffer,\nelse will use the memory of Image object, delete bytes object will not affect Image object\uff0c\nbut delete Image object will make bytes object invalid, it may cause program crash !!!!\nSo use this param carefully."
+ },
+ "return": "image's data bytes, need be delete by caller in C++.",
+ "maixpy": "maix.image.Image.to_bytes",
+ "py_doc": "Get image's data and convert to array bytes\n\nArgs:\n - copy: if true, will alloc memory and copy data to new buffer,\nelse will use the memory of Image object, delete bytes object will not affect Image object\uff0c\nbut delete Image object will make bytes object invalid, it may cause program crash !!!!\nSo use this param carefully.\n\n\nReturns: image's data bytes, need be delete by caller in C++.\n"
+ },
+ "args": [
+ [
+ "bool",
+ "copy",
+ "true"
+ ]
+ ],
+ "ret_type": "Bytes*",
+ "static": false,
+ "def": "Bytes *to_bytes(bool copy = true)",
+ "py_def": "def to_bytes(*args, **kwargs)"
+ },
+ "to_format": {
+ "type": "func",
+ "name": "to_format",
+ "doc": {
+ "brief": "Convert image to specific format",
+ "param": {
+ "format": "format want to convert to, @see image::Format, only support RGB888, BGR888, RGBA8888, BGRA8888, GRAYSCALE, JPEG."
+ },
+ "return": "new image object. Need be delete by caller in C++.",
+ "throw": "err.Exception, if two images' format not support, **or already the format**, will raise exception",
+ "maixpy": "maix.image.Image.to_format",
+ "py_doc": "Convert image to specific format\n\nArgs:\n - format: format want to convert to, @see image::Format, only support RGB888, BGR888, RGBA8888, BGRA8888, GRAYSCALE, JPEG.\n\n\nReturns: new image object. Need be delete by caller in C++.\n"
+ },
+ "args": [
+ [
+ "const image::Format &",
+ "format",
+ null
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *to_format(const image::Format &format)",
+ "py_def": "def to_format(self, format: Format) -> Image"
+ },
+ "to_jpeg": {
+ "type": "func",
+ "name": "to_jpeg",
+ "doc": {
+ "brief": "Convert image to jpeg",
+ "param": {
+ "quality": "the quality of jpg, default is 95. For MaixCAM supported range is (50, 100], if <= 50 will be fixed to 51."
+ },
+ "return": "new image object. Need be delete by caller in C++.",
+ "throw": "err.Exception, if two images' format not support, **or already the format**, will raise exception",
+ "maixpy": "maix.image.Image.to_jpeg",
+ "py_doc": "Convert image to jpeg\n\nArgs:\n - quality: the quality of jpg, default is 95. For MaixCAM supported range is (50, 100], if <= 50 will be fixed to 51.\n\n\nReturns: new image object. Need be delete by caller in C++.\n"
+ },
+ "args": [
+ [
+ "int",
+ "quality",
+ "95"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *to_jpeg(int quality = 95)",
+ "py_def": "def to_jpeg(self, quality: int = 95) -> Image"
+ },
+ "draw_image": {
+ "type": "func",
+ "name": "draw_image",
+ "doc": {
+ "brief": "Draw image on this image",
+ "param": {
+ "x": "left top corner of image point's coordinate x",
+ "y": "left top corner of image point's coordinate y",
+ "img": "image object to draw, the caller's channel must <= the args' channel,\ne.g. caller is RGB888, args is RGBA8888, will throw exception, but caller is RGBA8888, args is RGB888 or RGBA8888 is ok"
+ },
+ "return": "this image object self",
+ "maixpy": "maix.image.Image.draw_image",
+ "py_doc": "Draw image on this image\n\nArgs:\n - x: left top corner of image point's coordinate x\n - y: left top corner of image point's coordinate y\n - img: image object to draw, the caller's channel must <= the args' channel,\ne.g. caller is RGB888, args is RGBA8888, will throw exception, but caller is RGBA8888, args is RGB888 or RGBA8888 is ok\n\n\nReturns: this image object self\n"
+ },
+ "args": [
+ [
+ "int",
+ "x",
+ null
+ ],
+ [
+ "int",
+ "y",
+ null
+ ],
+ [
+ "image::Image &",
+ "img",
+ null
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *draw_image(int x, int y, image::Image &img)",
+ "py_def": "def draw_image(self, x: int, y: int, img: Image) -> Image"
+ },
+ "draw_rect": {
+ "type": "func",
+ "name": "draw_rect",
+ "doc": {
+ "brief": "Fill rectangle color to image",
+ "param": {
+ "x": "left top corner of rectangle point's coordinate x",
+ "y": "left top corner of rectangle point's coordinate y",
+ "w": "rectangle width",
+ "h": "rectangle height",
+ "color": "rectangle color",
+ "thickness": "rectangle thickness(line width), by default(value is 1), -1 means fill rectangle"
+ },
+ "return": "this image object self",
+ "maixpy": "maix.image.Image.draw_rect",
+ "py_doc": "Fill rectangle color to image\n\nArgs:\n - x: left top corner of rectangle point's coordinate x\n - y: left top corner of rectangle point's coordinate y\n - w: rectangle width\n - h: rectangle height\n - color: rectangle color\n - thickness: rectangle thickness(line width), by default(value is 1), -1 means fill rectangle\n\n\nReturns: this image object self\n"
+ },
+ "args": [
+ [
+ "int",
+ "x",
+ null
+ ],
+ [
+ "int",
+ "y",
+ null
+ ],
+ [
+ "int",
+ "w",
+ null
+ ],
+ [
+ "int",
+ "h",
+ null
+ ],
+ [
+ "const image::Color &",
+ "color",
+ null
+ ],
+ [
+ "int",
+ "thickness",
+ "1"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *draw_rect(int x, int y, int w, int h, const image::Color &color, int thickness = 1)",
+ "py_def": "def draw_rect(self, x: int, y: int, w: int, h: int, color: Color, thickness: int = 1) -> Image"
+ },
+ "draw_line": {
+ "type": "func",
+ "name": "draw_line",
+ "doc": {
+ "brief": "Draw line on image",
+ "param": {
+ "x1": "start point's coordinate x",
+ "y1": "start point's coordinate y",
+ "x2": "end point's coordinate x",
+ "y2": "end point's coordinate y",
+ "color": "line color @see image::Color",
+ "thickness": "line thickness(line width), by default(value is 1)"
+ },
+ "return": "this image object self",
+ "maixpy": "maix.image.Image.draw_line",
+ "py_doc": "Draw line on image\n\nArgs:\n - x1: start point's coordinate x\n - y1: start point's coordinate y\n - x2: end point's coordinate x\n - y2: end point's coordinate y\n - color: line color @see image::Color\n - thickness: line thickness(line width), by default(value is 1)\n\n\nReturns: this image object self\n"
+ },
+ "args": [
+ [
+ "int",
+ "x1",
+ null
+ ],
+ [
+ "int",
+ "y1",
+ null
+ ],
+ [
+ "int",
+ "x2",
+ null
+ ],
+ [
+ "int",
+ "y2",
+ null
+ ],
+ [
+ "const image::Color &",
+ "color",
+ null
+ ],
+ [
+ "int",
+ "thickness",
+ "1"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *draw_line(int x1, int y1, int x2, int y2, const image::Color &color, int thickness = 1)",
+ "py_def": "def draw_line(self, x1: int, y1: int, x2: int, y2: int, color: Color, thickness: int = 1) -> Image"
+ },
+ "draw_circle": {
+ "type": "func",
+ "name": "draw_circle",
+ "doc": {
+ "brief": "Draw circle on image",
+ "param": {
+ "x": "circle center point's coordinate x",
+ "y": "circle center point's coordinate y",
+ "radius": "circle radius",
+ "color": "circle color @see image::Color",
+ "thickness": "circle thickness(line width), default -1 means fill circle"
+ },
+ "return": "this image object self",
+ "maixpy": "maix.image.Image.draw_circle",
+ "py_doc": "Draw circle on image\n\nArgs:\n - x: circle center point's coordinate x\n - y: circle center point's coordinate y\n - radius: circle radius\n - color: circle color @see image::Color\n - thickness: circle thickness(line width), default -1 means fill circle\n\n\nReturns: this image object self\n"
+ },
+ "args": [
+ [
+ "int",
+ "x",
+ null
+ ],
+ [
+ "int",
+ "y",
+ null
+ ],
+ [
+ "int",
+ "radius",
+ null
+ ],
+ [
+ "const image::Color &",
+ "color",
+ null
+ ],
+ [
+ "int",
+ "thickness",
+ "1"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *draw_circle(int x, int y, int radius, const image::Color &color, int thickness = 1)",
+ "py_def": "def draw_circle(self, x: int, y: int, radius: int, color: Color, thickness: int = 1) -> Image"
+ },
+ "draw_ellipse": {
+ "type": "func",
+ "name": "draw_ellipse",
+ "doc": {
+ "brief": "Draw ellipse on image",
+ "param": {
+ "x": "ellipse center point's coordinate x",
+ "y": "ellipse center point's coordinate y",
+ "a": "ellipse major axis length",
+ "b": "ellipse minor axis length",
+ "angle": "ellipse rotation angle",
+ "start_angle": "ellipse start angle",
+ "end_angle": "ellipse end angle",
+ "color": "ellipse color @see image::Color",
+ "thickness": "ellipse thickness(line width), by default(value is 1), -1 means fill ellipse"
+ },
+ "return": "this image object self",
+ "maixpy": "maix.image.Image.draw_ellipse",
+ "py_doc": "Draw ellipse on image\n\nArgs:\n - x: ellipse center point's coordinate x\n - y: ellipse center point's coordinate y\n - a: ellipse major axis length\n - b: ellipse minor axis length\n - angle: ellipse rotation angle\n - start_angle: ellipse start angle\n - end_angle: ellipse end angle\n - color: ellipse color @see image::Color\n - thickness: ellipse thickness(line width), by default(value is 1), -1 means fill ellipse\n\n\nReturns: this image object self\n"
+ },
+ "args": [
+ [
+ "int",
+ "x",
+ null
+ ],
+ [
+ "int",
+ "y",
+ null
+ ],
+ [
+ "int",
+ "a",
+ null
+ ],
+ [
+ "int",
+ "b",
+ null
+ ],
+ [
+ "float",
+ "angle",
+ null
+ ],
+ [
+ "float",
+ "start_angle",
+ null
+ ],
+ [
+ "float",
+ "end_angle",
+ null
+ ],
+ [
+ "const image::Color &",
+ "color",
+ null
+ ],
+ [
+ "int",
+ "thickness",
+ "1"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *draw_ellipse(int x, int y, int a, int b, float angle, float start_angle, float end_angle, const image::Color &color, int thickness = 1)",
+ "py_def": "def draw_ellipse(self, x: int, y: int, a: int, b: int, angle: float, start_angle: float, end_angle: float, color: Color, thickness: int = 1) -> Image"
+ },
+ "draw_string": {
+ "type": "func",
+ "name": "draw_string",
+ "doc": {
+ "brief": "Draw text on image",
+ "param": {
+ "x": "text left top point's coordinate x",
+ "y": "text left top point's coordinate y",
+ "string": "text content",
+ "color": "text color @see image::Color, default is white",
+ "scale": "font scale, by default(value is 1)",
+ "thickness": "text thickness(line width), if negative, the glyph is filled, by default(value is -1)",
+ "wrap": "if true, will auto wrap text to next line if text width > image width, by default(value is true)"
+ },
+ "return": "this image object self",
+ "maixpy": "maix.image.Image.draw_string",
+ "py_doc": "Draw text on image\n\nArgs:\n - x: text left top point's coordinate x\n - y: text left top point's coordinate y\n - string: text content\n - color: text color @see image::Color, default is white\n - scale: font scale, by default(value is 1)\n - thickness: text thickness(line width), if negative, the glyph is filled, by default(value is -1)\n - wrap: if true, will auto wrap text to next line if text width > image width, by default(value is true)\n\n\nReturns: this image object self\n"
+ },
+ "args": [
+ [
+ "int",
+ "x",
+ null
+ ],
+ [
+ "int",
+ "y",
+ null
+ ],
+ [
+ "const std::string &",
+ "textstring",
+ null
+ ],
+ [
+ "const image::Color &",
+ "color",
+ "image::COLOR_WHITE"
+ ],
+ [
+ "float",
+ "scale",
+ "1"
+ ],
+ [
+ "int",
+ "thickness",
+ "-1"
+ ],
+ [
+ "bool",
+ "wrap",
+ "true"
+ ],
+ [
+ "int",
+ "wrap_space",
+ "4"
+ ],
+ [
+ "const std::string &",
+ "font",
+ "\"\""
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *draw_string(int x, int y, const std::string &textstring, const image::Color &color = image::COLOR_WHITE, float scale = 1, int thickness = -1,\n bool wrap = true, int wrap_space = 4, const std::string &font = \"\")",
+ "py_def": "def draw_string(self, x: int, y: int, textstring: str, color: Color = ..., scale: float = 1, thickness: int = -1, wrap: bool = True, wrap_space: int = 4, font: str = '') -> Image"
+ },
+ "draw_cross": {
+ "type": "func",
+ "name": "draw_cross",
+ "doc": {
+ "brief": "Draw cross on image",
+ "param": {
+ "x": "cross center point's coordinate x",
+ "y": "cross center point's coordinate y",
+ "color": "cross color @see image::Color",
+ "size": "how long the lines of the cross extend, by default(value is 5). So the line length is `2 * size + thickness`",
+ "thickness": "cross thickness(line width), by default(value is 1)"
+ },
+ "maixpy": "maix.image.Image.draw_cross",
+ "py_doc": "Draw cross on image\n\nArgs:\n - x: cross center point's coordinate x\n - y: cross center point's coordinate y\n - color: cross color @see image::Color\n - size: how long the lines of the cross extend, by default(value is 5). So the line length is `2 * size + thickness`\n - thickness: cross thickness(line width), by default(value is 1)\n"
+ },
+ "args": [
+ [
+ "int",
+ "x",
+ null
+ ],
+ [
+ "int",
+ "y",
+ null
+ ],
+ [
+ "const image::Color &",
+ "color",
+ null
+ ],
+ [
+ "int",
+ "size",
+ "5"
+ ],
+ [
+ "int",
+ "thickness",
+ "1"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *draw_cross(int x, int y, const image::Color &color, int size = 5, int thickness = 1)",
+ "py_def": "def draw_cross(self, x: int, y: int, color: Color, size: int = 5, thickness: int = 1) -> Image"
+ },
+ "draw_arrow": {
+ "type": "func",
+ "name": "draw_arrow",
+ "doc": {
+ "brief": "Draw arrow on image",
+ "param": {
+ "x0": "start coordinate of the arrow x0",
+ "y0": "start coordinate of the arrow y0",
+ "x1": "end coordinate of the arrow x1",
+ "y1": "end coordinate of the arrow y1",
+ "color": "cross color @see image::Color",
+ "thickness": "cross thickness(line width), by default(value is 1)"
+ },
+ "return": "this image object self",
+ "maixpy": "maix.image.Image.draw_arrow",
+ "py_doc": "Draw arrow on image\n\nArgs:\n - x0: start coordinate of the arrow x0\n - y0: start coordinate of the arrow y0\n - x1: end coordinate of the arrow x1\n - y1: end coordinate of the arrow y1\n - color: cross color @see image::Color\n - thickness: cross thickness(line width), by default(value is 1)\n\n\nReturns: this image object self\n"
+ },
+ "args": [
+ [
+ "int",
+ "x0",
+ null
+ ],
+ [
+ "int",
+ "y0",
+ null
+ ],
+ [
+ "int",
+ "x1",
+ null
+ ],
+ [
+ "int",
+ "y1",
+ null
+ ],
+ [
+ "const image::Color &",
+ "color",
+ null
+ ],
+ [
+ "int",
+ "thickness",
+ "1"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *draw_arrow(int x0, int y0, int x1, int y1, const image::Color &color, int thickness = 1)",
+ "py_def": "def draw_arrow(self, x0: int, y0: int, x1: int, y1: int, color: Color, thickness: int = 1) -> Image"
+ },
+ "draw_edges": {
+ "type": "func",
+ "name": "draw_edges",
+ "doc": {
+ "brief": "Draw edges on image",
+ "param": {
+ "corners": "edges, [[x0, y0], [x1, y1], [x2, y2], [x3, y3]]",
+ "color": "edges color @see image::Color",
+ "size": "the circle of radius size. TODO: support in the feature",
+ "thickness": "edges thickness(line width), by default(value is 1)",
+ "fill": "if true, will fill edges, by default(value is false)"
+ },
+ "return": "this image object self",
+ "maixpy": "maix.image.Image.draw_edges",
+ "py_doc": "Draw edges on image\n\nArgs:\n - corners: edges, [[x0, y0], [x1, y1], [x2, y2], [x3, y3]]\n - color: edges color @see image::Color\n - size: the circle of radius size. TODO: support in the feature\n - thickness: edges thickness(line width), by default(value is 1)\n - fill: if true, will fill edges, by default(value is false)\n\n\nReturns: this image object self\n"
+ },
+ "args": [
+ [
+ "std::vector>",
+ "corners",
+ null
+ ],
+ [
+ "const image::Color &",
+ "color",
+ null
+ ],
+ [
+ "int",
+ "size",
+ "0"
+ ],
+ [
+ "int",
+ "thickness",
+ "1"
+ ],
+ [
+ "bool",
+ "fill",
+ "false"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *draw_edges(std::vector> corners, const image::Color &color, int size = 0, int thickness = 1, bool fill = false)",
+ "py_def": "def draw_edges(self, corners: list[list[int]], color: Color, size: int = 0, thickness: int = 1, fill: bool = False) -> Image"
+ },
+ "draw_keypoints": {
+ "type": "func",
+ "name": "draw_keypoints",
+ "doc": {
+ "brief": "Draw keypoints on image",
+ "param": {
+ "keypoints": "keypoints, [x1, y1, x2, y2...] or [x, y, rotation_andle_in_degrees, x2, y2, rotation_andle_in_degrees2](TODO: rotation_andle_in_degrees support in the feature)",
+ "color": "keypoints color @see image::Color",
+ "size": "size of keypoints(radius)",
+ "thickness": "keypoints thickness(line width), by default(value is -1 means fill circle)",
+ "line_thickness": "line thickness, default 0 means not draw lines, > 0 will draw lines connect points."
+ },
+ "return": "this image object self",
+ "maixpy": "maix.image.Image.draw_keypoints",
+ "py_doc": "Draw keypoints on image\n\nArgs:\n - keypoints: keypoints, [x1, y1, x2, y2...] or [x, y, rotation_andle_in_degrees, x2, y2, rotation_andle_in_degrees2](TODO: rotation_andle_in_degrees support in the feature)\n - color: keypoints color @see image::Color\n - size: size of keypoints(radius)\n - thickness: keypoints thickness(line width), by default(value is -1 means fill circle)\n - line_thickness: line thickness, default 0 means not draw lines, > 0 will draw lines connect points.\n\n\nReturns: this image object self\n"
+ },
+ "args": [
+ [
+ "const std::vector &",
+ "keypoints",
+ null
+ ],
+ [
+ "const image::Color &",
+ "color",
+ null
+ ],
+ [
+ "int",
+ "size",
+ "4"
+ ],
+ [
+ "int",
+ "thickness",
+ "-1"
+ ],
+ [
+ "int",
+ "line_thickness",
+ "0"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *draw_keypoints(const std::vector &keypoints, const image::Color &color, int size = 4, int thickness = -1, int line_thickness = 0)",
+ "py_def": "def draw_keypoints(self, keypoints: list[int], color: Color, size: int = 4, thickness: int = -1, line_thickness: int = 0) -> Image"
+ },
+ "resize": {
+ "type": "func",
+ "name": "resize",
+ "doc": {
+ "brief": "Resize image, will create a new resized image object",
+ "param": {
+ "width": "new width, if value is -1, will use height to calculate aspect ratio",
+ "height": "new height, if value is -1, will use width to calculate aspect ratio",
+ "object_fit": "fill, contain, cover, by default is fill",
+ "method": "resize method, by default is bilinear"
+ },
+ "return": "Always return a new resized image object even size not change, So in C++ you should take care of the return value to avoid memory leak.\nAnd it's better to judge whether the size has changed before calling this function to make the program more efficient.\ne.g.\nif img->width() != width || img->height() != height:\nimg = img->resize(width, height);",
+ "maixpy": "maix.image.Image.resize",
+ "py_doc": "Resize image, will create a new resized image object\n\nArgs:\n - width: new width, if value is -1, will use height to calculate aspect ratio\n - height: new height, if value is -1, will use width to calculate aspect ratio\n - object_fit: fill, contain, cover, by default is fill\n - method: resize method, by default is bilinear\n\n\nReturns: Always return a new resized image object even size not change, So in C++ you should take care of the return value to avoid memory leak.\nAnd it's better to judge whether the size has changed before calling this function to make the program more efficient.\ne.g.\nif img->width() != width || img->height() != height:\nimg = img->resize(width, height);\n"
+ },
+ "args": [
+ [
+ "int",
+ "width",
+ null
+ ],
+ [
+ "int",
+ "height",
+ null
+ ],
+ [
+ "image::Fit",
+ "object_fit",
+ "image::Fit::FIT_FILL"
+ ],
+ [
+ "image::ResizeMethod",
+ "method",
+ "image::ResizeMethod::NEAREST"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *resize(int width, int height, image::Fit object_fit = image::Fit::FIT_FILL, image::ResizeMethod method = image::ResizeMethod::NEAREST)",
+ "py_def": "def resize(self, width: int, height: int, object_fit: Fit = ..., method: ResizeMethod = ...) -> Image"
+ },
+ "affine": {
+ "type": "func",
+ "name": "affine",
+ "doc": {
+ "brief": "Affine transform image, will create a new transformed image object",
+ "param": {
+ "src_points": "three source points, [x1, y1, x2, y2, x3, y3]",
+ "dst_points": "three destination points, [x1, y1, x2, y2, x3, y3]",
+ "width": "new width, if value is -1, will use height to calculate aspect ratio",
+ "height": "new height, if value is -1, will use width to calculate aspect ratio",
+ "method": "resize method, by default is bilinear"
+ },
+ "return": "new transformed image object",
+ "maixpy": "maix.image.Image.affine",
+ "py_doc": "Affine transform image, will create a new transformed image object\n\nArgs:\n - src_points: three source points, [x1, y1, x2, y2, x3, y3]\n - dst_points: three destination points, [x1, y1, x2, y2, x3, y3]\n - width: new width, if value is -1, will use height to calculate aspect ratio\n - height: new height, if value is -1, will use width to calculate aspect ratio\n - method: resize method, by default is bilinear\n\n\nReturns: new transformed image object\n"
+ },
+ "args": [
+ [
+ "std::vector",
+ "src_points",
+ null
+ ],
+ [
+ "std::vector",
+ "dst_points",
+ null
+ ],
+ [
+ "int",
+ "width",
+ "-1"
+ ],
+ [
+ "int",
+ "height",
+ "-1"
+ ],
+ [
+ "image::ResizeMethod",
+ "method",
+ "image::ResizeMethod::BILINEAR"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *affine(std::vector src_points, std::vector dst_points, int width = -1, int height = -1, image::ResizeMethod method = image::ResizeMethod::BILINEAR)",
+ "py_def": "def affine(self, src_points: list[int], dst_points: list[int], width: int = -1, height: int = -1, method: ResizeMethod = ...) -> Image"
+ },
+ "copy": {
+ "type": "func",
+ "name": "copy",
+ "doc": {
+ "brief": "Copy image, will create a new copied image object",
+ "return": "new copied image object",
+ "maixpy": "maix.image.Image.copy",
+ "py_doc": "Copy image, will create a new copied image object\n\nReturns: new copied image object\n"
+ },
+ "args": [],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *copy()",
+ "py_def": "def copy(self) -> Image"
+ },
+ "crop": {
+ "type": "func",
+ "name": "crop",
+ "doc": {
+ "brief": "Crop image, will create a new cropped image object",
+ "param": {
+ "x": "left top corner of crop rectangle point's coordinate x",
+ "y": "left top corner of crop rectangle point's coordinate y",
+ "w": "crop rectangle width",
+ "h": "crop rectangle height"
+ },
+ "return": "new cropped image object",
+ "maixpy": "maix.image.Image.crop",
+ "py_doc": "Crop image, will create a new cropped image object\n\nArgs:\n - x: left top corner of crop rectangle point's coordinate x\n - y: left top corner of crop rectangle point's coordinate y\n - w: crop rectangle width\n - h: crop rectangle height\n\n\nReturns: new cropped image object\n"
+ },
+ "args": [
+ [
+ "int",
+ "x",
+ null
+ ],
+ [
+ "int",
+ "y",
+ null
+ ],
+ [
+ "int",
+ "w",
+ null
+ ],
+ [
+ "int",
+ "h",
+ null
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *crop(int x, int y, int w, int h)",
+ "py_def": "def crop(self, x: int, y: int, w: int, h: int) -> Image"
+ },
+ "rotate": {
+ "type": "func",
+ "name": "rotate",
+ "doc": {
+ "brief": "Rotate image, will create a new rotated image object",
+ "param": {
+ "angle": "anti-clock wise rotate angle, if angle is 90 or 270, and width or height is -1, will swap width and height, or will throw exception",
+ "width": "new width, if value is -1, will use height to calculate aspect ratio",
+ "height": "new height, if value is -1, will use width to calculate aspect ratio",
+ "method": "resize method, by default is bilinear"
+ },
+ "return": "new rotated image object",
+ "maixpy": "maix.image.Image.rotate",
+ "py_doc": "Rotate image, will create a new rotated image object\n\nArgs:\n - angle: anti-clock wise rotate angle, if angle is 90 or 270, and width or height is -1, will swap width and height, or will throw exception\n - width: new width, if value is -1, will use height to calculate aspect ratio\n - height: new height, if value is -1, will use width to calculate aspect ratio\n - method: resize method, by default is bilinear\n\n\nReturns: new rotated image object\n"
+ },
+ "args": [
+ [
+ "float",
+ "angle",
+ null
+ ],
+ [
+ "int",
+ "width",
+ "-1"
+ ],
+ [
+ "int",
+ "height",
+ "-1"
+ ],
+ [
+ "image::ResizeMethod",
+ "method",
+ "image::ResizeMethod::BILINEAR"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *rotate(float angle, int width = -1, int height = -1, image::ResizeMethod method = image::ResizeMethod::BILINEAR)",
+ "py_def": "def rotate(self, angle: float, width: int = -1, height: int = -1, method: ResizeMethod = ...) -> Image"
+ },
+ "mean_pool": {
+ "type": "func",
+ "name": "mean_pool",
+ "doc": {
+ "brief": "Finds the mean of x_div * y_div squares in the image and returns the modified image composed of the mean of each square.",
+ "param": {
+ "x_div": "The width of the squares.",
+ "y_div": "The height of the squares.",
+ "copy": "Select whether to return a new image or modify the original image. default is false.\nIf true, returns a new image composed of the mean of each square; If false, returns the modified image composed of the mean of each square."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.mean_pool",
+ "py_doc": "Finds the mean of x_div * y_div squares in the image and returns the modified image composed of the mean of each square.\n\nArgs:\n - x_div: The width of the squares.\n - y_div: The height of the squares.\n - copy: Select whether to return a new image or modify the original image. default is false.\nIf true, returns a new image composed of the mean of each square; If false, returns the modified image composed of the mean of each square.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "int",
+ "x_div",
+ null
+ ],
+ [
+ "int",
+ "y_div",
+ null
+ ],
+ [
+ "bool",
+ "copy",
+ "false"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *mean_pool(int x_div, int y_div, bool copy = false)",
+ "py_def": "def mean_pool(self, x_div: int, y_div: int, copy: bool = False) -> Image"
+ },
+ "midpoint_pool": {
+ "type": "func",
+ "name": "midpoint_pool",
+ "doc": {
+ "brief": "Finds the midpoint of x_div * y_div squares in the image and returns the modified image composed of the mean of each square.",
+ "param": {
+ "x_div": "The width of the squares.",
+ "y_div": "The height of the squares.",
+ "bias": "The bias of the midpoint. default is 0.5.\nmidpoint value is equal to (max * bias + min * (1 - bias))",
+ "copy": "Select whether to return a new image or modify the original image. default is false.\nIf true, returns a new image composed of the midpoint of each square; If false, returns the modified image composed of the midpoint of each square."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.midpoint_pool",
+ "py_doc": "Finds the midpoint of x_div * y_div squares in the image and returns the modified image composed of the mean of each square.\n\nArgs:\n - x_div: The width of the squares.\n - y_div: The height of the squares.\n - bias: The bias of the midpoint. default is 0.5.\nmidpoint value is equal to (max * bias + min * (1 - bias))\n - copy: Select whether to return a new image or modify the original image. default is false.\nIf true, returns a new image composed of the midpoint of each square; If false, returns the modified image composed of the midpoint of each square.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "int",
+ "x_div",
+ null
+ ],
+ [
+ "int",
+ "y_div",
+ null
+ ],
+ [
+ "double",
+ "bias",
+ "0.5"
+ ],
+ [
+ "bool",
+ "copy",
+ "false"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *midpoint_pool(int x_div, int y_div, double bias = 0.5, bool copy = false)",
+ "py_def": "def midpoint_pool(self, x_div: int, y_div: int, bias: float = 0.5, copy: bool = False) -> Image"
+ },
+ "compress": {
+ "type": "func",
+ "name": "compress",
+ "doc": {
+ "brief": "JPEG compresses the image in place, the same as to_jpeg functioin, it's recommend to use to_jpeg instead.",
+ "param": {
+ "quality": "The quality of the compressed image. default is 95."
+ },
+ "return": "Returns the compressed JPEG image",
+ "maixpy": "maix.image.Image.compress",
+ "py_doc": "JPEG compresses the image in place, the same as to_jpeg functioin, it's recommend to use to_jpeg instead.\n\nArgs:\n - quality: The quality of the compressed image. default is 95.\n\n\nReturns: Returns the compressed JPEG image\n"
+ },
+ "args": [
+ [
+ "int",
+ "quality",
+ "95"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *compress(int quality = 95)",
+ "py_def": "def compress(self, quality: int = 95) -> Image"
+ },
+ "clear": {
+ "type": "func",
+ "name": "clear",
+ "doc": {
+ "brief": "Sets all pixels in the image to zero",
+ "param": {
+ "mask": "Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.clear",
+ "py_doc": "Sets all pixels in the image to zero\n\nArgs:\n - mask: Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "image::Image *",
+ "mask",
+ "nullptr"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *clear(image::Image *mask = nullptr)",
+ "py_def": "def clear(self, mask: Image = None) -> Image"
+ },
+ "mask_rectange": {
+ "type": "func",
+ "name": "mask_rectange",
+ "doc": {
+ "brief": "Zeros a rectangular part of the image. If no arguments are supplied this method zeros the center of the image.",
+ "param": {
+ "x": "The x coordinate of the top left corner of the rectangle.",
+ "y": "The y coordinate of the top left corner of the rectangle.",
+ "w": "The width of the rectangle.",
+ "h": "The height of the rectangle."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.mask_rectange",
+ "py_doc": "Zeros a rectangular part of the image. If no arguments are supplied this method zeros the center of the image.\n\nArgs:\n - x: The x coordinate of the top left corner of the rectangle.\n - y: The y coordinate of the top left corner of the rectangle.\n - w: The width of the rectangle.\n - h: The height of the rectangle.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "int",
+ "x",
+ "-1"
+ ],
+ [
+ "int",
+ "y",
+ "-1"
+ ],
+ [
+ "int",
+ "w",
+ "-1"
+ ],
+ [
+ "int",
+ "h",
+ "-1"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *mask_rectange(int x = -1, int y = -1, int w = -1, int h = -1)",
+ "py_def": "def mask_rectange(self, x: int = -1, y: int = -1, w: int = -1, h: int = -1) -> Image"
+ },
+ "mask_circle": {
+ "type": "func",
+ "name": "mask_circle",
+ "doc": {
+ "brief": "Zeros a circular part of the image. If no arguments are supplied this method zeros the center of the image.",
+ "param": {
+ "x": "The x coordinate of the center of the circle.",
+ "y": "The y coordinate of the center of the circle.",
+ "radius": "The radius of the circle."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.mask_circle",
+ "py_doc": "Zeros a circular part of the image. If no arguments are supplied this method zeros the center of the image.\n\nArgs:\n - x: The x coordinate of the center of the circle.\n - y: The y coordinate of the center of the circle.\n - radius: The radius of the circle.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "int",
+ "x",
+ "-1"
+ ],
+ [
+ "int",
+ "y",
+ "-1"
+ ],
+ [
+ "int",
+ "radius",
+ "-1"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *mask_circle(int x = -1, int y = -1, int radius = -1)",
+ "py_def": "def mask_circle(self, x: int = -1, y: int = -1, radius: int = -1) -> Image"
+ },
+ "mask_ellipse": {
+ "type": "func",
+ "name": "mask_ellipse",
+ "doc": {
+ "brief": "Zeros a ellipse part of the image. If no arguments are supplied this method zeros the center of the image.",
+ "param": {
+ "x": "The x coordinate of the center of the ellipse.",
+ "y": "The y coordinate of the center of the ellipse.",
+ "radius_x": "The radius of the ellipse in the x direction.",
+ "radius_y": "The radius of the ellipse in the y direction.",
+ "rotation_angle_in_degrees": "The rotation angle of the ellipse in degrees."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.mask_ellipse",
+ "py_doc": "Zeros a ellipse part of the image. If no arguments are supplied this method zeros the center of the image.\n\nArgs:\n - x: The x coordinate of the center of the ellipse.\n - y: The y coordinate of the center of the ellipse.\n - radius_x: The radius of the ellipse in the x direction.\n - radius_y: The radius of the ellipse in the y direction.\n - rotation_angle_in_degrees: The rotation angle of the ellipse in degrees.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "int",
+ "x",
+ "-1"
+ ],
+ [
+ "int",
+ "y",
+ "-1"
+ ],
+ [
+ "int",
+ "radius_x",
+ "-1"
+ ],
+ [
+ "int",
+ "radius_y",
+ "-1"
+ ],
+ [
+ "float",
+ "rotation_angle_in_degrees",
+ "0"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *mask_ellipse(int x = -1, int y = -1, int radius_x = -1, int radius_y = -1, float rotation_angle_in_degrees = 0)",
+ "py_def": "def mask_ellipse(self, x: int = -1, y: int = -1, radius_x: int = -1, radius_y: int = -1, rotation_angle_in_degrees: float = 0) -> Image"
+ },
+ "binary": {
+ "type": "func",
+ "name": "binary",
+ "doc": {
+ "brief": "Sets all pixels in the image to black or white depending on if the pixel is inside of a threshold in the threshold list thresholds or not.",
+ "note": "For GRAYSCALE format, Lmin and Lmax range is [0, 255]. For RGB888 format, Lmin and Lmax range is [0, 100].",
+ "param": {
+ "thresholds": "You can define multiple thresholds.\nFor GRAYSCALE format, you can use {{Lmin, Lmax}, ...} to define one or more thresholds.\nFor RGB888 format, you can use {{Lmin, Lmax, Amin, Amax, Bmin, Bmax}, ...} to define one or more thresholds.\nWhere the upper case L,A,B represent the L,A,B channels of the LAB image format, and min, max represent the minimum and maximum values of the corresponding channels.",
+ "invert": "If true, the thresholds will be inverted before the operation. default is false.",
+ "zero": "If zero is true, the image will be set the pixels within the threshold to 0, other pixels remain unchanged. If zero is false, the image will be set to black or white. default is false.",
+ "mask": "Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None.",
+ "to_bitmap": "If true, the image will be converted to a bitmap image before thresholding. default is false. TODO: support in the feature",
+ "copy": "Select whether to return a new image or modify the original image. default is false."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.binary",
+ "py_doc": "Sets all pixels in the image to black or white depending on if the pixel is inside of a threshold in the threshold list thresholds or not.\n\nArgs:\n - thresholds: You can define multiple thresholds.\nFor GRAYSCALE format, you can use {{Lmin, Lmax}, ...} to define one or more thresholds.\nFor RGB888 format, you can use {{Lmin, Lmax, Amin, Amax, Bmin, Bmax}, ...} to define one or more thresholds.\nWhere the upper case L,A,B represent the L,A,B channels of the LAB image format, and min, max represent the minimum and maximum values of the corresponding channels.\n - invert: If true, the thresholds will be inverted before the operation. default is false.\n - zero: If zero is true, the image will be set the pixels within the threshold to 0, other pixels remain unchanged. If zero is false, the image will be set to black or white. default is false.\n - mask: Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None.\n - to_bitmap: If true, the image will be converted to a bitmap image before thresholding. default is false. TODO: support in the feature\n - copy: Select whether to return a new image or modify the original image. default is false.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "std::vector>",
+ "thresholds",
+ "std::vector>()"
+ ],
+ [
+ "bool",
+ "invert",
+ "false"
+ ],
+ [
+ "bool",
+ "zero",
+ "false"
+ ],
+ [
+ "image::Image *",
+ "mask",
+ "nullptr"
+ ],
+ [
+ "bool",
+ "to_bitmap",
+ "false"
+ ],
+ [
+ "bool",
+ "copy",
+ "false"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *binary(std::vector> thresholds = std::vector>(), bool invert = false, bool zero = false, image::Image *mask = nullptr, bool to_bitmap = false, bool copy = false)",
+ "py_def": "def binary(self, thresholds: list[list[int]] = [], invert: bool = False, zero: bool = False, mask: Image = None, to_bitmap: bool = False, copy: bool = False) -> Image"
+ },
+ "invert": {
+ "type": "func",
+ "name": "invert",
+ "doc": {
+ "brief": "Inverts the image in place.",
+ "return": "Returns the image after the operation is completed",
+ "maixpy": "maix.image.Image.invert",
+ "py_doc": "Inverts the image in place.\n\nReturns: Returns the image after the operation is completed\n"
+ },
+ "args": [],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *invert()",
+ "py_def": "def invert(self) -> Image"
+ },
+ "b_and": {
+ "type": "func",
+ "name": "b_and",
+ "doc": {
+ "brief": "Performs a bitwise and operation between the image and the other image.",
+ "param": {
+ "other": "The other image should be an image and should be the same size as the image being operated on. TODO: support path?",
+ "mask": "Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.b_and",
+ "py_doc": "Performs a bitwise and operation between the image and the other image.\n\nArgs:\n - other: The other image should be an image and should be the same size as the image being operated on. TODO: support path?\n - mask: Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "image::Image *",
+ "other",
+ null
+ ],
+ [
+ "image::Image *",
+ "mask",
+ "nullptr"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *b_and(image::Image *other, image::Image *mask = nullptr)",
+ "py_def": "def b_and(self, other: Image, mask: Image = None) -> Image"
+ },
+ "b_nand": {
+ "type": "func",
+ "name": "b_nand",
+ "doc": {
+ "brief": "Performs a bitwise nand operation between the image and the other image.",
+ "param": {
+ "other": "The other image should be an image and should be the same size as the image being operated on. TODO: support path?",
+ "mask": "Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.b_nand",
+ "py_doc": "Performs a bitwise nand operation between the image and the other image.\n\nArgs:\n - other: The other image should be an image and should be the same size as the image being operated on. TODO: support path?\n - mask: Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "image::Image *",
+ "other",
+ null
+ ],
+ [
+ "image::Image *",
+ "mask",
+ "nullptr"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *b_nand(image::Image *other, image::Image *mask = nullptr)",
+ "py_def": "def b_nand(self, other: Image, mask: Image = None) -> Image"
+ },
+ "b_or": {
+ "type": "func",
+ "name": "b_or",
+ "doc": {
+ "brief": "Performs a bitwise or operation between the image and the other image.",
+ "param": {
+ "other": "The other image should be an image and should be the same size as the image being operated on. TODO: support path?",
+ "mask": "Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.b_or",
+ "py_doc": "Performs a bitwise or operation between the image and the other image.\n\nArgs:\n - other: The other image should be an image and should be the same size as the image being operated on. TODO: support path?\n - mask: Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "image::Image *",
+ "other",
+ null
+ ],
+ [
+ "image::Image *",
+ "mask",
+ "nullptr"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *b_or(image::Image *other, image::Image *mask = nullptr)",
+ "py_def": "def b_or(self, other: Image, mask: Image = None) -> Image"
+ },
+ "b_nor": {
+ "type": "func",
+ "name": "b_nor",
+ "doc": {
+ "brief": "Performs a bitwise nor operation between the image and the other image.",
+ "param": {
+ "other": "The other image should be an image and should be the same size as the image being operated on. TODO: support path?",
+ "mask": "Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.b_nor",
+ "py_doc": "Performs a bitwise nor operation between the image and the other image.\n\nArgs:\n - other: The other image should be an image and should be the same size as the image being operated on. TODO: support path?\n - mask: Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "image::Image *",
+ "other",
+ null
+ ],
+ [
+ "image::Image *",
+ "mask",
+ "nullptr"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *b_nor(image::Image *other, image::Image *mask = nullptr)",
+ "py_def": "def b_nor(self, other: Image, mask: Image = None) -> Image"
+ },
+ "b_xor": {
+ "type": "func",
+ "name": "b_xor",
+ "doc": {
+ "brief": "Performs a bitwise xor operation between the image and the other image.",
+ "param": {
+ "other": "The other image should be an image and should be the same size as the image being operated on. TODO: support path?",
+ "mask": "Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.b_xor",
+ "py_doc": "Performs a bitwise xor operation between the image and the other image.\n\nArgs:\n - other: The other image should be an image and should be the same size as the image being operated on. TODO: support path?\n - mask: Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "image::Image *",
+ "other",
+ null
+ ],
+ [
+ "image::Image *",
+ "mask",
+ "nullptr"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *b_xor(image::Image *other, image::Image *mask = nullptr)",
+ "py_def": "def b_xor(self, other: Image, mask: Image = None) -> Image"
+ },
+ "b_xnor": {
+ "type": "func",
+ "name": "b_xnor",
+ "doc": {
+ "brief": "Performs a bitwise xnor operation between the image and the other image.",
+ "param": {
+ "other": "The other image should be an image and should be the same size as the image being operated on. TODO: support path?",
+ "mask": "Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.b_xnor",
+ "py_doc": "Performs a bitwise xnor operation between the image and the other image.\n\nArgs:\n - other: The other image should be an image and should be the same size as the image being operated on. TODO: support path?\n - mask: Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "image::Image *",
+ "other",
+ null
+ ],
+ [
+ "image::Image *",
+ "mask",
+ "nullptr"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *b_xnor(image::Image *other, image::Image *mask = nullptr)",
+ "py_def": "def b_xnor(self, other: Image, mask: Image = None) -> Image"
+ },
+ "awb": {
+ "type": "func",
+ "name": "awb",
+ "doc": {
+ "brief": "Performs an auto white balance operation on the image. TODO: support in the feature",
+ "param": {
+ "max": "if True uses the white-patch algorithm instead. default is false."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.awb",
+ "py_doc": "Performs an auto white balance operation on the image. TODO: support in the feature\n\nArgs:\n - max: if True uses the white-patch algorithm instead. default is false.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "bool",
+ "max",
+ "false"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *awb(bool max = false)",
+ "py_def": "def awb(self, max: bool = False) -> Image"
+ },
+ "ccm": {
+ "type": "func",
+ "name": "ccm",
+ "doc": {
+ "brief": "Multiples the passed (3x3) or (4x3) floating-point color-correction-matrix with the image.\\nnote: Grayscale format is not support.",
+ "param": {
+ "matrix": "The color correction matrix to use. 3x3 or 4x3 matrix.\nWeights may either be positive or negative, and the sum of each column in the 3x3 matrix should generally be 1.\nexample:\n{\n1, 0, 0,\n0, 1, 0,\n0, 0, 1,\n}\nWhere the last row of the 4x3 matrix is an offset per color channel. If you add an offset you may wish to make the\nweights sum to less than 1 to account for the offset.\nexample:\n{\n1, 0, 0,\n0, 1, 0,\n0, 0, 1,\n0, 0, 0,\n}"
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.ccm",
+ "py_doc": "Multiples the passed (3x3) or (4x3) floating-point color-correction-matrix with the image.\nnote: Grayscale format is not support.\n\nArgs:\n - matrix: The color correction matrix to use. 3x3 or 4x3 matrix.\nWeights may either be positive or negative, and the sum of each column in the 3x3 matrix should generally be 1.\nexample:\n{\n1, 0, 0,\n0, 1, 0,\n0, 0, 1,\n}\nWhere the last row of the 4x3 matrix is an offset per color channel. If you add an offset you may wish to make the\nweights sum to less than 1 to account for the offset.\nexample:\n{\n1, 0, 0,\n0, 1, 0,\n0, 0, 1,\n0, 0, 0,\n}\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "std::vector &",
+ "matrix",
+ null
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *ccm(std::vector &matrix)",
+ "py_def": "def ccm(self, matrix: list[float]) -> Image"
+ },
+ "gamma": {
+ "type": "func",
+ "name": "gamma",
+ "doc": {
+ "brief": "Quickly changes the image gamma, contrast, and brightness. Create a array whose size is usually 255,\\nand use the parameters gamma, contrast, and brightness to calculate the value of the array, and then map the\\nimage pixel value through the value of the array.\\nThe calculation method for array is: array[array_idx] = (powf((array_idx / 255.0), (1 / gamma)) * contrast + brightness) * scale,\\n`powf` is a function used to calculate floating point power.\\n`array` is the array used for mapping.\\n`array_idx` is the index of the array, the maximum value is determined according to the image format, usually 255.\\n`scale` is a constant, the value is determined by the image format, usually 255.\\nMapping method:\\nAssume that a pixel value in the image is 128, then map the pixel value to the value of array[128]\\nUsers can adjust the value of the array through the gamma, contrast, and brightness parameters.",
+ "param": {
+ "gamma": "The contrast gamma greater than 1.0 makes the image darker in a non-linear manner while less than 1.0 makes the image brighter. default is 1.0.",
+ "contrast": "The contrast value greater than 1.0 makes the image brighter in a linear manner while less than 1.0 makes the image darker. default is 1.0.",
+ "brightness": "The brightness value greater than 0.0 makes the image brighter in a constant manner while less than 0.0 makes the image darker. default is 0.0."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.gamma",
+ "py_doc": "Quickly changes the image gamma, contrast, and brightness. Create a array whose size is usually 255,\nand use the parameters gamma, contrast, and brightness to calculate the value of the array, and then map the\nimage pixel value through the value of the array.\nThe calculation method for array is: array[array_idx] = (powf((array_idx / 255.0), (1 / gamma)) * contrast + brightness) * scale,\n`powf` is a function used to calculate floating point power.\n`array` is the array used for mapping.\n`array_idx` is the index of the array, the maximum value is determined according to the image format, usually 255.\n`scale` is a constant, the value is determined by the image format, usually 255.\nMapping method:\nAssume that a pixel value in the image is 128, then map the pixel value to the value of array[128]\nUsers can adjust the value of the array through the gamma, contrast, and brightness parameters.\n\nArgs:\n - gamma: The contrast gamma greater than 1.0 makes the image darker in a non-linear manner while less than 1.0 makes the image brighter. default is 1.0.\n - contrast: The contrast value greater than 1.0 makes the image brighter in a linear manner while less than 1.0 makes the image darker. default is 1.0.\n - brightness: The brightness value greater than 0.0 makes the image brighter in a constant manner while less than 0.0 makes the image darker. default is 0.0.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "double",
+ "gamma",
+ "1.0"
+ ],
+ [
+ "double",
+ "contrast",
+ "1.0"
+ ],
+ [
+ "double",
+ "brightness",
+ "0.0"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *gamma(double gamma = 1.0, double contrast = 1.0, double brightness = 0.0)",
+ "py_def": "def gamma(self, gamma: float = 1.0, contrast: float = 1.0, brightness: float = 0.0) -> Image"
+ },
+ "gamma_corr": {
+ "type": "func",
+ "name": "gamma_corr",
+ "doc": {
+ "brief": "Alias for Image.gamma.",
+ "param": {
+ "gamma": "The contrast gamma greater than 1.0 makes the image darker in a non-linear manner while less than 1.0 makes the image brighter. default is 1.0.",
+ "contrast": "The contrast value greater than 1.0 makes the image brighter in a linear manner while less than 1.0 makes the image darker. default is 1.0.",
+ "brightness": "The brightness value greater than 0.0 makes the image brighter in a constant manner while less than 0.0 makes the image darker. default is 0.0."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.gamma_corr",
+ "py_doc": "Alias for Image.gamma.\n\nArgs:\n - gamma: The contrast gamma greater than 1.0 makes the image darker in a non-linear manner while less than 1.0 makes the image brighter. default is 1.0.\n - contrast: The contrast value greater than 1.0 makes the image brighter in a linear manner while less than 1.0 makes the image darker. default is 1.0.\n - brightness: The brightness value greater than 0.0 makes the image brighter in a constant manner while less than 0.0 makes the image darker. default is 0.0.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "double",
+ "gamma",
+ null
+ ],
+ [
+ "double",
+ "contrast",
+ "1.0"
+ ],
+ [
+ "double",
+ "brightness",
+ "0.0"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *gamma_corr(double gamma, double contrast = 1.0, double brightness = 0.0)",
+ "py_def": "def gamma_corr(self, gamma: float, contrast: float = 1.0, brightness: float = 0.0) -> Image"
+ },
+ "negate": {
+ "type": "func",
+ "name": "negate",
+ "doc": {
+ "brief": "Flips (numerically inverts) all pixels values in an image",
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.negate",
+ "py_doc": "Flips (numerically inverts) all pixels values in an image\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *negate()",
+ "py_def": "def negate(self) -> Image"
+ },
+ "replace": {
+ "type": "func",
+ "name": "replace",
+ "doc": {
+ "brief": "Replaces all pixels in the image with the corresponding pixels in the other image.",
+ "param": {
+ "other": "The other image should be an image and should be the same size as the image being operated on.",
+ "hmirror": "If true, the image will be horizontally mirrored before the operation. default is false.",
+ "vflip": "If true, the image will be vertically flipped before the operation. default is false.",
+ "transpose": "If true, the image can be used to rotate 90 degrees or 270 degrees.\nhmirror = false, vflip = false, transpose = false, the image will not be rotated.\nhmirror = false, vflip = true, transpose = true, the image will be rotated 90 degrees.\nhmirror = true, vflip = true, transpose = false, the image will be rotated 180 degrees.\nhmirror = true, vflip = false, transpose = true, the image will be rotated 270 degrees.",
+ "mask": "Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.replace",
+ "py_doc": "Replaces all pixels in the image with the corresponding pixels in the other image.\n\nArgs:\n - other: The other image should be an image and should be the same size as the image being operated on.\n - hmirror: If true, the image will be horizontally mirrored before the operation. default is false.\n - vflip: If true, the image will be vertically flipped before the operation. default is false.\n - transpose: If true, the image can be used to rotate 90 degrees or 270 degrees.\nhmirror = false, vflip = false, transpose = false, the image will not be rotated.\nhmirror = false, vflip = true, transpose = true, the image will be rotated 90 degrees.\nhmirror = true, vflip = true, transpose = false, the image will be rotated 180 degrees.\nhmirror = true, vflip = false, transpose = true, the image will be rotated 270 degrees.\n - mask: Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "image::Image *",
+ "other",
+ "nullptr"
+ ],
+ [
+ "bool",
+ "hmirror",
+ "false"
+ ],
+ [
+ "bool",
+ "vflip",
+ "false"
+ ],
+ [
+ "bool",
+ "transpose",
+ "false"
+ ],
+ [
+ "image::Image *",
+ "mask",
+ "nullptr"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *replace(image::Image *other = nullptr, bool hmirror = false, bool vflip = false, bool transpose = false, image::Image *mask = nullptr)",
+ "py_def": "def replace(self, other: Image = None, hmirror: bool = False, vflip: bool = False, transpose: bool = False, mask: Image = None) -> Image"
+ },
+ "set": {
+ "type": "func",
+ "name": "set",
+ "doc": {
+ "brief": "Alias for Image::replace.",
+ "param": {
+ "other": "The other image should be an image and should be the same size as the image being operated on.",
+ "hmirror": "If true, the image will be horizontally mirrored before the operation. default is false.",
+ "vflip": "If true, the image will be vertically flipped before the operation. default is false.",
+ "mask": "Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.set",
+ "py_doc": "Alias for Image::replace.\n\nArgs:\n - other: The other image should be an image and should be the same size as the image being operated on.\n - hmirror: If true, the image will be horizontally mirrored before the operation. default is false.\n - vflip: If true, the image will be vertically flipped before the operation. default is false.\n - mask: Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "image::Image *",
+ "other",
+ null
+ ],
+ [
+ "bool",
+ "hmirror",
+ "false"
+ ],
+ [
+ "bool",
+ "vflip",
+ "false"
+ ],
+ [
+ "bool",
+ "transpose",
+ "false"
+ ],
+ [
+ "image::Image *",
+ "mask",
+ "nullptr"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *set(image::Image *other, bool hmirror = false, bool vflip = false, bool transpose = false, image::Image *mask = nullptr)",
+ "py_def": "def set(self, other: Image, hmirror: bool = False, vflip: bool = False, transpose: bool = False, mask: Image = None) -> Image"
+ },
+ "add": {
+ "type": "func",
+ "name": "add",
+ "doc": {
+ "brief": "Adds the other image to the image.",
+ "param": {
+ "other": "The other image should be an image and should be the same size as the image being operated on. TODO: support path?",
+ "mask": "Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.add",
+ "py_doc": "Adds the other image to the image.\n\nArgs:\n - other: The other image should be an image and should be the same size as the image being operated on. TODO: support path?\n - mask: Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "image::Image *",
+ "other",
+ null
+ ],
+ [
+ "image::Image *",
+ "mask",
+ "nullptr"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *add(image::Image *other, image::Image *mask = nullptr)",
+ "py_def": "def add(self, other: Image, mask: Image = None) -> Image"
+ },
+ "sub": {
+ "type": "func",
+ "name": "sub",
+ "doc": {
+ "brief": "Subtracts the other image from the image.",
+ "param": {
+ "other": "The other image should be an image and should be the same size as the image being operated on. TODO: support path?",
+ "reverse": "If true, the image will be reversed before the operation. default is false.",
+ "mask": "Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.sub",
+ "py_doc": "Subtracts the other image from the image.\n\nArgs:\n - other: The other image should be an image and should be the same size as the image being operated on. TODO: support path?\n - reverse: If true, the image will be reversed before the operation. default is false.\n - mask: Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "image::Image *",
+ "other",
+ null
+ ],
+ [
+ "bool",
+ "reverse",
+ "false"
+ ],
+ [
+ "image::Image *",
+ "mask",
+ "nullptr"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *sub(image::Image *other, bool reverse = false, image::Image *mask = nullptr)",
+ "py_def": "def sub(self, other: Image, reverse: bool = False, mask: Image = None) -> Image"
+ },
+ "mul": {
+ "type": "func",
+ "name": "mul",
+ "doc": {
+ "brief": "Multiplies the image by the other image.\\nNote: This method is meant for image blending and cannot multiply the pixels in the image by a scalar like 2.",
+ "param": {
+ "other": "The other image should be an image and should be the same size as the image being operated on. TODO: support path?",
+ "invert": "If true, the image will be change the multiplication operation from a*b to 1/((1/a)*(1/b)).\nIn particular, this lightens the image instead of darkening it (e.g. multiply versus burn operations). default is false.",
+ "mask": "Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.mul",
+ "py_doc": "Multiplies the image by the other image.\nNote: This method is meant for image blending and cannot multiply the pixels in the image by a scalar like 2.\n\nArgs:\n - other: The other image should be an image and should be the same size as the image being operated on. TODO: support path?\n - invert: If true, the image will be change the multiplication operation from a*b to 1/((1/a)*(1/b)).\nIn particular, this lightens the image instead of darkening it (e.g. multiply versus burn operations). default is false.\n - mask: Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "image::Image *",
+ "other",
+ null
+ ],
+ [
+ "bool",
+ "invert",
+ "false"
+ ],
+ [
+ "image::Image *",
+ "mask",
+ "nullptr"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *mul(image::Image *other, bool invert = false, image::Image *mask = nullptr)",
+ "py_def": "def mul(self, other: Image, invert: bool = False, mask: Image = None) -> Image"
+ },
+ "div": {
+ "type": "func",
+ "name": "div",
+ "doc": {
+ "brief": "Divides the image by the other image.\\nThis method is meant for image blending and cannot divide the pixels in the image by a scalar like 2.",
+ "param": {
+ "other": "The other image should be an image and should be the same size as the image being operated on. TODO: support path?",
+ "invert": "If true, the image will be change the division direction from a/b to b/a. default is false.",
+ "mod": "If true, the image will be change the division operation to the modulus operation. default is false.",
+ "mask": "Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.div",
+ "py_doc": "Divides the image by the other image.\nThis method is meant for image blending and cannot divide the pixels in the image by a scalar like 2.\n\nArgs:\n - other: The other image should be an image and should be the same size as the image being operated on. TODO: support path?\n - invert: If true, the image will be change the division direction from a/b to b/a. default is false.\n - mod: If true, the image will be change the division operation to the modulus operation. default is false.\n - mask: Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "image::Image *",
+ "other",
+ null
+ ],
+ [
+ "bool",
+ "invert",
+ "false"
+ ],
+ [
+ "bool",
+ "mod",
+ "false"
+ ],
+ [
+ "image::Image *",
+ "mask",
+ "nullptr"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *div(image::Image *other, bool invert = false, bool mod = false, image::Image *mask = nullptr)",
+ "py_def": "def div(self, other: Image, invert: bool = False, mod: bool = False, mask: Image = None) -> Image"
+ },
+ "min": {
+ "type": "func",
+ "name": "min",
+ "doc": {
+ "brief": "Caculate the minimum of each pixel in the image and the other image.",
+ "param": {
+ "other": "The other image should be an image and should be the same size as the image being operated on.",
+ "mask": "Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.min",
+ "py_doc": "Caculate the minimum of each pixel in the image and the other image.\n\nArgs:\n - other: The other image should be an image and should be the same size as the image being operated on.\n - mask: Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "image::Image *",
+ "other",
+ null
+ ],
+ [
+ "image::Image *",
+ "mask",
+ "nullptr"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *min(image::Image *other, image::Image *mask = nullptr)",
+ "py_def": "def min(self, other: Image, mask: Image = None) -> Image"
+ },
+ "max": {
+ "type": "func",
+ "name": "max",
+ "doc": {
+ "brief": "Caculate the maximum of each pixel in the image and the other image.",
+ "param": {
+ "other": "The other image should be an image and should be the same size as the image being operated on.",
+ "mask": "Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.max",
+ "py_doc": "Caculate the maximum of each pixel in the image and the other image.\n\nArgs:\n - other: The other image should be an image and should be the same size as the image being operated on.\n - mask: Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "image::Image *",
+ "other",
+ null
+ ],
+ [
+ "image::Image *",
+ "mask",
+ "nullptr"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *max(image::Image *other, image::Image *mask = nullptr)",
+ "py_def": "def max(self, other: Image, mask: Image = None) -> Image"
+ },
+ "difference": {
+ "type": "func",
+ "name": "difference",
+ "doc": {
+ "brief": "Caculate the absolute value of the difference between each pixel in the image and the other image.",
+ "param": {
+ "other": "The other image should be an image and should be the same size as the image being operated on.",
+ "mask": "Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.difference",
+ "py_doc": "Caculate the absolute value of the difference between each pixel in the image and the other image.\n\nArgs:\n - other: The other image should be an image and should be the same size as the image being operated on.\n - mask: Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "image::Image *",
+ "other",
+ null
+ ],
+ [
+ "image::Image *",
+ "mask",
+ "nullptr"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *difference(image::Image *other, image::Image *mask = nullptr)",
+ "py_def": "def difference(self, other: Image, mask: Image = None) -> Image"
+ },
+ "blend": {
+ "type": "func",
+ "name": "blend",
+ "doc": {
+ "brief": "Blends the image with the other image.\\nres = alpha * this_img / 256 + (256 - alpha) * other_img / 256",
+ "param": {
+ "other": "The other image should be an image and should be the same size as the image being operated on.",
+ "alpha": "The alpha value of the blend, the value range is [0, 256],default is 128.",
+ "mask": "Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.blend",
+ "py_doc": "Blends the image with the other image.\nres = alpha * this_img / 256 + (256 - alpha) * other_img / 256\n\nArgs:\n - other: The other image should be an image and should be the same size as the image being operated on.\n - alpha: The alpha value of the blend, the value range is [0, 256],default is 128.\n - mask: Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "image::Image *",
+ "other",
+ null
+ ],
+ [
+ "int",
+ "alpha",
+ "128"
+ ],
+ [
+ "image::Image *",
+ "mask",
+ "nullptr"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *blend(image::Image *other, int alpha = 128, image::Image *mask = nullptr)",
+ "py_def": "def blend(self, other: Image, alpha: int = 128, mask: Image = None) -> Image"
+ },
+ "histeq": {
+ "type": "func",
+ "name": "histeq",
+ "doc": {
+ "brief": "Runs the histogram equalization algorithm on the image.",
+ "param": {
+ "adaptive": "If true, an adaptive histogram equalization method will be run on the image instead which as generally better results than non-adaptive histogram qualization but a longer run time. default is false.",
+ "clip_limit": "Provides a way to limit the contrast of the adaptive histogram qualization. Use a small value for this, like 10, to produce good histogram equalized contrast limited images. default is -1.",
+ "mask": "Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.histeq",
+ "py_doc": "Runs the histogram equalization algorithm on the image.\n\nArgs:\n - adaptive: If true, an adaptive histogram equalization method will be run on the image instead which as generally better results than non-adaptive histogram qualization but a longer run time. default is false.\n - clip_limit: Provides a way to limit the contrast of the adaptive histogram qualization. Use a small value for this, like 10, to produce good histogram equalized contrast limited images. default is -1.\n - mask: Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "bool",
+ "adaptive",
+ "false"
+ ],
+ [
+ "int",
+ "clip_limit",
+ "-1"
+ ],
+ [
+ "image::Image *",
+ "mask",
+ "nullptr"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *histeq(bool adaptive = false, int clip_limit = -1, image::Image *mask = nullptr)",
+ "py_def": "def histeq(self, adaptive: bool = False, clip_limit: int = -1, mask: Image = None) -> Image"
+ },
+ "mean": {
+ "type": "func",
+ "name": "mean",
+ "doc": {
+ "brief": "Standard mean blurring filter using a box filter.\\nThe parameters offset and invert are valid when threshold is True.",
+ "param": {
+ "size": "Kernel size. The actual kernel size is ((size * 2) + 1) * ((size * 2) + 1). Use 1(3x3 kernel), 2(5x5 kernel).",
+ "threshold": "If true, which will enable adaptive thresholding of the image which sets pixels to white or black based on a pixel\u2019s brightness in relation to the brightness of the kernel of pixels around them.\ndefault is false.",
+ "offset": "The larger the offset value, the lower brightness pixels on the original image will be set to white. default is 0.",
+ "invert": "If true, the image will be inverted before the operation. default is false.",
+ "mask": "Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.mean",
+ "py_doc": "Standard mean blurring filter using a box filter.\nThe parameters offset and invert are valid when threshold is True.\n\nArgs:\n - size: Kernel size. The actual kernel size is ((size * 2) + 1) * ((size * 2) + 1). Use 1(3x3 kernel), 2(5x5 kernel).\n - threshold: If true, which will enable adaptive thresholding of the image which sets pixels to white or black based on a pixel\u2019s brightness in relation to the brightness of the kernel of pixels around them.\ndefault is false.\n - offset: The larger the offset value, the lower brightness pixels on the original image will be set to white. default is 0.\n - invert: If true, the image will be inverted before the operation. default is false.\n - mask: Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "int",
+ "size",
+ null
+ ],
+ [
+ "bool",
+ "threshold",
+ "false"
+ ],
+ [
+ "int",
+ "offset",
+ "0"
+ ],
+ [
+ "bool",
+ "invert",
+ "false"
+ ],
+ [
+ "image::Image *",
+ "mask",
+ "nullptr"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *mean(int size, bool threshold = false, int offset = 0, bool invert = false, image::Image *mask = nullptr)",
+ "py_def": "def mean(self, size: int, threshold: bool = False, offset: int = 0, invert: bool = False, mask: Image = None) -> Image"
+ },
+ "median": {
+ "type": "func",
+ "name": "median",
+ "doc": {
+ "brief": "Runs the median filter on the image. The median filter is the best filter for smoothing surfaces while preserving edges but it is very slow.",
+ "param": {
+ "size": "Kernel size. The actual kernel size is ((size * 2) + 1) * ((size * 2) + 1). Use 1(3x3 kernel), 2(5x5 kernel).",
+ "percentile": "This parameter controls the percentile of the value used in the kernel. You can set this to 0 for a min filter, 0.25 for a lower quartile filter, 0.75 for an upper quartile filter, and 1.0 for a max filter. default is 0.5.",
+ "threshold": "If true, which will enable adaptive thresholding of the image which sets pixels to white or black based on a pixel\u2019s brightness in relation to the brightness of the kernel of pixels around them.\ndefault is false.",
+ "offset": "The larger the offset value, the lower brightness pixels on the original image will be set to white. default is 0.",
+ "invert": "If true, the image will be inverted before the operation. default is false.",
+ "mask": "Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.median",
+ "py_doc": "Runs the median filter on the image. The median filter is the best filter for smoothing surfaces while preserving edges but it is very slow.\n\nArgs:\n - size: Kernel size. The actual kernel size is ((size * 2) + 1) * ((size * 2) + 1). Use 1(3x3 kernel), 2(5x5 kernel).\n - percentile: This parameter controls the percentile of the value used in the kernel. You can set this to 0 for a min filter, 0.25 for a lower quartile filter, 0.75 for an upper quartile filter, and 1.0 for a max filter. default is 0.5.\n - threshold: If true, which will enable adaptive thresholding of the image which sets pixels to white or black based on a pixel\u2019s brightness in relation to the brightness of the kernel of pixels around them.\ndefault is false.\n - offset: The larger the offset value, the lower brightness pixels on the original image will be set to white. default is 0.\n - invert: If true, the image will be inverted before the operation. default is false.\n - mask: Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "int",
+ "size",
+ null
+ ],
+ [
+ "double",
+ "percentile",
+ "0.5"
+ ],
+ [
+ "bool",
+ "threshold",
+ "false"
+ ],
+ [
+ "int",
+ "offset",
+ "0"
+ ],
+ [
+ "bool",
+ "invert",
+ "false"
+ ],
+ [
+ "image::Image *",
+ "mask",
+ "nullptr"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *median(int size, double percentile = 0.5, bool threshold = false, int offset = 0, bool invert = false, image::Image *mask = nullptr)",
+ "py_def": "def median(self, size: int, percentile: float = 0.5, threshold: bool = False, offset: int = 0, invert: bool = False, mask: Image = None) -> Image"
+ },
+ "mode": {
+ "type": "func",
+ "name": "mode",
+ "doc": {
+ "brief": "Runs the mode filter on the image by replacing each pixel with the mode of their neighbors.",
+ "param": {
+ "size": "Kernel size. The actual kernel size is ((size * 2) + 1) * ((size * 2) + 1). Use 1(3x3 kernel), 2(5x5 kernel).",
+ "threshold": "If true, which will enable adaptive thresholding of the image which sets pixels to white or black based on a pixel\u2019s brightness in relation to the brightness of the kernel of pixels around them.\ndefault is false.",
+ "offset": "The larger the offset value, the lower brightness pixels on the original image will be set to white. default is 0.",
+ "invert": "If true, the image will be inverted before the operation. default is false.",
+ "mask": "Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.mode",
+ "py_doc": "Runs the mode filter on the image by replacing each pixel with the mode of their neighbors.\n\nArgs:\n - size: Kernel size. The actual kernel size is ((size * 2) + 1) * ((size * 2) + 1). Use 1(3x3 kernel), 2(5x5 kernel).\n - threshold: If true, which will enable adaptive thresholding of the image which sets pixels to white or black based on a pixel\u2019s brightness in relation to the brightness of the kernel of pixels around them.\ndefault is false.\n - offset: The larger the offset value, the lower brightness pixels on the original image will be set to white. default is 0.\n - invert: If true, the image will be inverted before the operation. default is false.\n - mask: Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "int",
+ "size",
+ null
+ ],
+ [
+ "bool",
+ "threshold",
+ "false"
+ ],
+ [
+ "int",
+ "offset",
+ "0"
+ ],
+ [
+ "bool",
+ "invert",
+ "false"
+ ],
+ [
+ "image::Image *",
+ "mask",
+ "nullptr"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *mode(int size, bool threshold = false, int offset = 0, bool invert = false, image::Image *mask = nullptr)",
+ "py_def": "def mode(self, size: int, threshold: bool = False, offset: int = 0, invert: bool = False, mask: Image = None) -> Image"
+ },
+ "midpoint": {
+ "type": "func",
+ "name": "midpoint",
+ "doc": {
+ "brief": "Runs the midpoint filter on the image.This filter finds the midpoint (max * bias + min * (1 - bias)) of each pixel neighborhood in the image.",
+ "param": {
+ "size": "Kernel size. The actual kernel size is ((size * 2) + 1) * ((size * 2) + 1). Use 1(3x3 kernel), 2(5x5 kernel).",
+ "bias": "The bias of the midpoint. default is 0.5.",
+ "threshold": "If true, which will enable adaptive thresholding of the image which sets pixels to white or black based on a pixel\u2019s brightness in relation to the brightness of the kernel of pixels around them.\ndefault is false.",
+ "offset": "The larger the offset value, the lower brightness pixels on the original image will be set to white. default is 0.",
+ "invert": "If true, the image will be inverted before the operation. default is false.",
+ "mask": "Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.midpoint",
+ "py_doc": "Runs the midpoint filter on the image.This filter finds the midpoint (max * bias + min * (1 - bias)) of each pixel neighborhood in the image.\n\nArgs:\n - size: Kernel size. The actual kernel size is ((size * 2) + 1) * ((size * 2) + 1). Use 1(3x3 kernel), 2(5x5 kernel).\n - bias: The bias of the midpoint. default is 0.5.\n - threshold: If true, which will enable adaptive thresholding of the image which sets pixels to white or black based on a pixel\u2019s brightness in relation to the brightness of the kernel of pixels around them.\ndefault is false.\n - offset: The larger the offset value, the lower brightness pixels on the original image will be set to white. default is 0.\n - invert: If true, the image will be inverted before the operation. default is false.\n - mask: Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "int",
+ "size",
+ null
+ ],
+ [
+ "double",
+ "bias",
+ "0.5"
+ ],
+ [
+ "bool",
+ "threshold",
+ "false"
+ ],
+ [
+ "int",
+ "offset",
+ "0"
+ ],
+ [
+ "bool",
+ "invert",
+ "false"
+ ],
+ [
+ "image::Image *",
+ "mask",
+ "nullptr"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *midpoint(int size, double bias = 0.5, bool threshold = false, int offset = 0, bool invert = false, image::Image *mask = nullptr)",
+ "py_def": "def midpoint(self, size: int, bias: float = 0.5, threshold: bool = False, offset: int = 0, invert: bool = False, mask: Image = None) -> Image"
+ },
+ "morph": {
+ "type": "func",
+ "name": "morph",
+ "doc": {
+ "brief": "Convolves the image by a filter kernel. This allows you to do general purpose convolutions on an image.",
+ "param": {
+ "size": "Kernel size. The actual kernel size is ((size * 2) + 1) * ((size * 2) + 1). Use 1(3x3 kernel), 2(5x5 kernel).",
+ "kernel": "The kernel used for convolution. The kernel should be a list of lists of numbers. The kernel should be the same size as the actual kernel size.",
+ "mul": "This parameter is used to multiply the convolved pixel results. default is auto.",
+ "add": "This parameter is the value to be added to each convolution pixel result. default is 0.0.",
+ "threshold": "If true, which will enable adaptive thresholding of the image which sets pixels to white or black based on a pixel\u2019s brightness in relation to the brightness of the kernel of pixels around them.\ndefault is false.",
+ "offset": "The larger the offset value, the lower brightness pixels on the original image will be set to white. default is 0.",
+ "invert": "If true, the image will be inverted before the operation. default is false.",
+ "mask": "Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.morph",
+ "py_doc": "Convolves the image by a filter kernel. This allows you to do general purpose convolutions on an image.\n\nArgs:\n - size: Kernel size. The actual kernel size is ((size * 2) + 1) * ((size * 2) + 1). Use 1(3x3 kernel), 2(5x5 kernel).\n - kernel: The kernel used for convolution. The kernel should be a list of lists of numbers. The kernel should be the same size as the actual kernel size.\n - mul: This parameter is used to multiply the convolved pixel results. default is auto.\n - add: This parameter is the value to be added to each convolution pixel result. default is 0.0.\n - threshold: If true, which will enable adaptive thresholding of the image which sets pixels to white or black based on a pixel\u2019s brightness in relation to the brightness of the kernel of pixels around them.\ndefault is false.\n - offset: The larger the offset value, the lower brightness pixels on the original image will be set to white. default is 0.\n - invert: If true, the image will be inverted before the operation. default is false.\n - mask: Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "int",
+ "size",
+ null
+ ],
+ [
+ "std::vector",
+ "kernel",
+ null
+ ],
+ [
+ "float",
+ "mul",
+ "-1"
+ ],
+ [
+ "float",
+ "add",
+ "0.0"
+ ],
+ [
+ "bool",
+ "threshold",
+ "false"
+ ],
+ [
+ "int",
+ "offset",
+ "0"
+ ],
+ [
+ "bool",
+ "invert",
+ "false"
+ ],
+ [
+ "image::Image *",
+ "mask",
+ "nullptr"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *morph(int size, std::vector kernel, float mul = -1, float add = 0.0, bool threshold = false, int offset = 0, bool invert = false, image::Image *mask = nullptr)",
+ "py_def": "def morph(self, size: int, kernel: list[int], mul: float = -1, add: float = 0.0, threshold: bool = False, offset: int = 0, invert: bool = False, mask: Image = None) -> Image"
+ },
+ "gaussian": {
+ "type": "func",
+ "name": "gaussian",
+ "doc": {
+ "brief": "Convolves the image by a smoothing guassian kernel.",
+ "param": {
+ "size": "Kernel size. The actual kernel size is ((size * 2) + 1) * ((size * 2) + 1). Use 1(3x3 kernel), 2(5x5 kernel).",
+ "unsharp": "If true, this method will perform an unsharp mask operation instead of gaussian filtering operation, this improves the clarity of image edges. default is false.",
+ "mul": "This parameter is used to multiply the convolved pixel results. default is auto.",
+ "add": "This parameter is the value to be added to each convolution pixel result. default is 0.0.",
+ "threshold": "If true, which will enable adaptive thresholding of the image which sets pixels to white or black based on a pixel\u2019s brightness in relation to the brightness of the kernel of pixels around them.\ndefault is false.",
+ "offset": "The larger the offset value, the lower brightness pixels on the original image will be set to white. default is 0.",
+ "invert": "If true, the image will be inverted before the operation. default is false.",
+ "mask": "Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.gaussian",
+ "py_doc": "Convolves the image by a smoothing guassian kernel.\n\nArgs:\n - size: Kernel size. The actual kernel size is ((size * 2) + 1) * ((size * 2) + 1). Use 1(3x3 kernel), 2(5x5 kernel).\n - unsharp: If true, this method will perform an unsharp mask operation instead of gaussian filtering operation, this improves the clarity of image edges. default is false.\n - mul: This parameter is used to multiply the convolved pixel results. default is auto.\n - add: This parameter is the value to be added to each convolution pixel result. default is 0.0.\n - threshold: If true, which will enable adaptive thresholding of the image which sets pixels to white or black based on a pixel\u2019s brightness in relation to the brightness of the kernel of pixels around them.\ndefault is false.\n - offset: The larger the offset value, the lower brightness pixels on the original image will be set to white. default is 0.\n - invert: If true, the image will be inverted before the operation. default is false.\n - mask: Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "int",
+ "size",
+ null
+ ],
+ [
+ "bool",
+ "unsharp",
+ "false"
+ ],
+ [
+ "float",
+ "mul",
+ "-1"
+ ],
+ [
+ "float",
+ "add",
+ "0.0"
+ ],
+ [
+ "bool",
+ "threshold",
+ "false"
+ ],
+ [
+ "int",
+ "offset",
+ "0"
+ ],
+ [
+ "bool",
+ "invert",
+ "false"
+ ],
+ [
+ "image::Image *",
+ "mask",
+ "nullptr"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *gaussian(int size, bool unsharp = false, float mul = -1, float add = 0.0, bool threshold = false, int offset = 0, bool invert = false, image::Image *mask = nullptr)",
+ "py_def": "def gaussian(self, size: int, unsharp: bool = False, mul: float = -1, add: float = 0.0, threshold: bool = False, offset: int = 0, invert: bool = False, mask: Image = None) -> Image"
+ },
+ "laplacian": {
+ "type": "func",
+ "name": "laplacian",
+ "doc": {
+ "brief": "Convolves the image by a edge detecting laplacian kernel.",
+ "param": {
+ "size": "Kernel size. The actual kernel size is ((size * 2) + 1) * ((size * 2) + 1). Use 1(3x3 kernel), 2(5x5 kernel).",
+ "sharpen": "If True, this method will sharpen the image instead of an unthresholded edge detection image. Then increase the kernel size to improve image clarity. default is false.",
+ "mul": "This parameter is used to multiply the convolved pixel results. default is auto.",
+ "add": "This parameter is the value to be added to each convolution pixel result. default is 0.0.",
+ "threshold": "If true, which will enable adaptive thresholding of the image which sets pixels to white or black based on a pixel\u2019s brightness in relation to the brightness of the kernel of pixels around them.\ndefault is false.",
+ "offset": "The larger the offset value, the lower brightness pixels on the original image will be set to white. default is 0.",
+ "invert": "If true, the image will be inverted before the operation. default is false.",
+ "mask": "Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.laplacian",
+ "py_doc": "Convolves the image by a edge detecting laplacian kernel.\n\nArgs:\n - size: Kernel size. The actual kernel size is ((size * 2) + 1) * ((size * 2) + 1). Use 1(3x3 kernel), 2(5x5 kernel).\n - sharpen: If True, this method will sharpen the image instead of an unthresholded edge detection image. Then increase the kernel size to improve image clarity. default is false.\n - mul: This parameter is used to multiply the convolved pixel results. default is auto.\n - add: This parameter is the value to be added to each convolution pixel result. default is 0.0.\n - threshold: If true, which will enable adaptive thresholding of the image which sets pixels to white or black based on a pixel\u2019s brightness in relation to the brightness of the kernel of pixels around them.\ndefault is false.\n - offset: The larger the offset value, the lower brightness pixels on the original image will be set to white. default is 0.\n - invert: If true, the image will be inverted before the operation. default is false.\n - mask: Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "int",
+ "size",
+ null
+ ],
+ [
+ "bool",
+ "sharpen",
+ "false"
+ ],
+ [
+ "float",
+ "mul",
+ "-1"
+ ],
+ [
+ "float",
+ "add",
+ "0.0"
+ ],
+ [
+ "bool",
+ "threshold",
+ "false"
+ ],
+ [
+ "int",
+ "offset",
+ "0"
+ ],
+ [
+ "bool",
+ "invert",
+ "false"
+ ],
+ [
+ "image::Image *",
+ "mask",
+ "nullptr"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *laplacian(int size, bool sharpen = false, float mul = -1, float add = 0.0, bool threshold = false, int offset = 0, bool invert = false, image::Image *mask = nullptr)",
+ "py_def": "def laplacian(self, size: int, sharpen: bool = False, mul: float = -1, add: float = 0.0, threshold: bool = False, offset: int = 0, invert: bool = False, mask: Image = None) -> Image"
+ },
+ "bilateral": {
+ "type": "func",
+ "name": "bilateral",
+ "doc": {
+ "brief": "Convolves the image by a bilateral filter.",
+ "param": {
+ "size": "Kernel size. The actual kernel size is ((size * 2) + 1) * ((size * 2) + 1). Use 1(3x3 kernel), 2(5x5 kernel).",
+ "color_sigma": "Controls how closely colors are matched using the bilateral filter. default is 0.1.",
+ "space_sigma": "Controls how closely pixels space-wise are blurred with each other. default is 1.",
+ "threshold": "If true, which will enable adaptive thresholding of the image which sets pixels to white or black based on a pixel\u2019s brightness in relation to the brightness of the kernel of pixels around them.\ndefault is false.",
+ "offset": "The larger the offset value, the lower brightness pixels on the original image will be set to white. default is 0.",
+ "invert": "If true, the image will be inverted before the operation. default is false.",
+ "mask": "Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.bilateral",
+ "py_doc": "Convolves the image by a bilateral filter.\n\nArgs:\n - size: Kernel size. The actual kernel size is ((size * 2) + 1) * ((size * 2) + 1). Use 1(3x3 kernel), 2(5x5 kernel).\n - color_sigma: Controls how closely colors are matched using the bilateral filter. default is 0.1.\n - space_sigma: Controls how closely pixels space-wise are blurred with each other. default is 1.\n - threshold: If true, which will enable adaptive thresholding of the image which sets pixels to white or black based on a pixel\u2019s brightness in relation to the brightness of the kernel of pixels around them.\ndefault is false.\n - offset: The larger the offset value, the lower brightness pixels on the original image will be set to white. default is 0.\n - invert: If true, the image will be inverted before the operation. default is false.\n - mask: Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "int",
+ "size",
+ null
+ ],
+ [
+ "double",
+ "color_sigma",
+ "0.1"
+ ],
+ [
+ "double",
+ "space_sigma",
+ "1"
+ ],
+ [
+ "bool",
+ "threshold",
+ "false"
+ ],
+ [
+ "int",
+ "offset",
+ "0"
+ ],
+ [
+ "bool",
+ "invert",
+ "false"
+ ],
+ [
+ "image::Image *",
+ "mask",
+ "nullptr"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *bilateral(int size, double color_sigma = 0.1, double space_sigma = 1, bool threshold = false, int offset = 0, bool invert = false, image::Image *mask = nullptr)",
+ "py_def": "def bilateral(self, size: int, color_sigma: float = 0.1, space_sigma: float = 1, threshold: bool = False, offset: int = 0, invert: bool = False, mask: Image = None) -> Image"
+ },
+ "linpolar": {
+ "type": "func",
+ "name": "linpolar",
+ "doc": {
+ "brief": "Re-project\u2019s and image from cartessian coordinates to linear polar coordinates.",
+ "param": {
+ "reverse": "If true, the image will be reverse polar transformed. default is false."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.linpolar",
+ "py_doc": "Re-project\u2019s and image from cartessian coordinates to linear polar coordinates.\n\nArgs:\n - reverse: If true, the image will be reverse polar transformed. default is false.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "bool",
+ "reverse",
+ "false"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *linpolar(bool reverse = false)",
+ "py_def": "def linpolar(self, reverse: bool = False) -> Image"
+ },
+ "logpolar": {
+ "type": "func",
+ "name": "logpolar",
+ "doc": {
+ "brief": "Re-project\u2019s and image from cartessian coordinates to log polar coordinates.",
+ "param": {
+ "reverse": "If true, the image will be reverse polar transformed. default is false."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.logpolar",
+ "py_doc": "Re-project\u2019s and image from cartessian coordinates to log polar coordinates.\n\nArgs:\n - reverse: If true, the image will be reverse polar transformed. default is false.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "bool",
+ "reverse",
+ "false"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *logpolar(bool reverse = false)",
+ "py_def": "def logpolar(self, reverse: bool = False) -> Image"
+ },
+ "lens_corr": {
+ "type": "func",
+ "name": "lens_corr",
+ "doc": {
+ "brief": "Performs a lens correction operation on the image. TODO: support in the feature",
+ "param": {
+ "strength": "The strength of the lens correction. default is 1.8.",
+ "zoom": "The zoom of the lens correction. default is 1.0.",
+ "x_corr": "The x correction of the lens correction. default is 0.0.",
+ "y_corr": "The y correction of the lens correction. default is 0.0."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.lens_corr",
+ "py_doc": "Performs a lens correction operation on the image. TODO: support in the feature\n\nArgs:\n - strength: The strength of the lens correction. default is 1.8.\n - zoom: The zoom of the lens correction. default is 1.0.\n - x_corr: The x correction of the lens correction. default is 0.0.\n - y_corr: The y correction of the lens correction. default is 0.0.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "double",
+ "strength",
+ "1.8"
+ ],
+ [
+ "double",
+ "zoom",
+ "1.0"
+ ],
+ [
+ "double",
+ "x_corr",
+ "0.0"
+ ],
+ [
+ "double",
+ "y_corr",
+ "0.0"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *lens_corr(double strength = 1.8, double zoom = 1.0, double x_corr = 0.0, double y_corr = 0.0)",
+ "py_def": "def lens_corr(self, strength: float = 1.8, zoom: float = 1.0, x_corr: float = 0.0, y_corr: float = 0.0) -> Image"
+ },
+ "rotation_corr": {
+ "type": "func",
+ "name": "rotation_corr",
+ "doc": {
+ "brief": "Performs a rotation correction operation on the image. TODO: support in the feature",
+ "param": {
+ "x_rotation": "The x rotation of the rotation correction. default is 0.0.",
+ "y_rotation": "The y rotation of the rotation correction. default is 0.0.",
+ "z_rotation": "The z rotation of the rotation correction. default is 0.0.",
+ "x_translation": "The x translation of the rotation correction. default is 0.0.",
+ "y_translation": "The y translation of the rotation correction. default is 0.0.",
+ "zoom": "The zoom of the rotation correction. default is 1.0.",
+ "fov": "The fov of the rotation correction. default is 60.0.",
+ "corners": "The corners of the rotation correction. default is None."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.rotation_corr",
+ "py_doc": "Performs a rotation correction operation on the image. TODO: support in the feature\n\nArgs:\n - x_rotation: The x rotation of the rotation correction. default is 0.0.\n - y_rotation: The y rotation of the rotation correction. default is 0.0.\n - z_rotation: The z rotation of the rotation correction. default is 0.0.\n - x_translation: The x translation of the rotation correction. default is 0.0.\n - y_translation: The y translation of the rotation correction. default is 0.0.\n - zoom: The zoom of the rotation correction. default is 1.0.\n - fov: The fov of the rotation correction. default is 60.0.\n - corners: The corners of the rotation correction. default is None.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "double",
+ "x_rotation",
+ "0.0"
+ ],
+ [
+ "double",
+ "y_rotation",
+ "0.0"
+ ],
+ [
+ "double",
+ "z_rotation",
+ "0.0"
+ ],
+ [
+ "double",
+ "x_translation",
+ "0.0"
+ ],
+ [
+ "double",
+ "y_translation",
+ "0.0"
+ ],
+ [
+ "double",
+ "zoom",
+ "1.0"
+ ],
+ [
+ "double",
+ "fov",
+ "60.0"
+ ],
+ [
+ "std::vector",
+ "corners",
+ "std::vector()"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *rotation_corr(double x_rotation = 0.0, double y_rotation = 0.0, double z_rotation = 0.0, double x_translation = 0.0, double y_translation = 0.0, double zoom = 1.0, double fov = 60.0, std::vector corners = std::vector())",
+ "py_def": "def rotation_corr(self, x_rotation: float = 0.0, y_rotation: float = 0.0, z_rotation: float = 0.0, x_translation: float = 0.0, y_translation: float = 0.0, zoom: float = 1.0, fov: float = 60.0, corners: list[float] = []) -> Image"
+ },
+ "get_histogram": {
+ "type": "func",
+ "name": "get_histogram",
+ "doc": {
+ "brief": "Computes the normalized histogram on all color channels and returns a image::Histogram object.",
+ "note": "For GRAYSCALE format, Lmin and Lmax range is [0, 255]. For RGB888 format, Lmin and Lmax range is [0, 100].",
+ "param": {
+ "thresholds": "You can define multiple thresholds.\nFor GRAYSCALE format, you can use {{Lmin, Lmax}, ...} to define one or more thresholds.\nFor RGB888 format, you can use {{Lmin, Lmax, Amin, Amax, Bmin, Bmax}, ...} to define one or more thresholds.\nWhere the upper case L,A,B represent the L,A,B channels of the LAB image format, and min, max represent the minimum and maximum values of the corresponding channels.",
+ "invert": "If true, the thresholds will be inverted before the operation. default is false.",
+ "roi": "The region of interest, input in the format of (x, y, w, h), x and y are the coordinates of the upper left corner, w and h are the width and height of roi.\ndefault is None, means whole image.",
+ "bins": "The number of bins to use for the histogram.\nIn GRAYSCALE format, setting range is [2, 256], default is 100.\nIn RGB888 format, setting range is [2, 100], default is 100.",
+ "l_bins": "The number of bins to use for the l channel of the histogram. Only valid in RGB888 format.\nIf an invalid value is set, bins will be used instead. The setting range is [2, 100], default is 100.",
+ "a_bins": "The number of bins to use for the a channel of the histogram.\nOnly valid in RGB888 format.The setting range is [2, 256], default is 256.",
+ "b_bins": "The number of bins to use for the b channel of the histogram.\nOnly valid in RGB888 format. The setting range is [2, 256], default is 256.",
+ "difference": "difference may be set to an image object to cause this method to operate on the difference image between the current image and the difference image object.\ndefault is None."
+ },
+ "return": "Returns image::Histogram object",
+ "maixpy": "maix.image.Image.get_histogram",
+ "py_doc": "Computes the normalized histogram on all color channels and returns a image::Histogram object.\n\nArgs:\n - thresholds: You can define multiple thresholds.\nFor GRAYSCALE format, you can use {{Lmin, Lmax}, ...} to define one or more thresholds.\nFor RGB888 format, you can use {{Lmin, Lmax, Amin, Amax, Bmin, Bmax}, ...} to define one or more thresholds.\nWhere the upper case L,A,B represent the L,A,B channels of the LAB image format, and min, max represent the minimum and maximum values of the corresponding channels.\n - invert: If true, the thresholds will be inverted before the operation. default is false.\n - roi: The region of interest, input in the format of (x, y, w, h), x and y are the coordinates of the upper left corner, w and h are the width and height of roi.\ndefault is None, means whole image.\n - bins: The number of bins to use for the histogram.\nIn GRAYSCALE format, setting range is [2, 256], default is 100.\nIn RGB888 format, setting range is [2, 100], default is 100.\n - l_bins: The number of bins to use for the l channel of the histogram. Only valid in RGB888 format.\nIf an invalid value is set, bins will be used instead. The setting range is [2, 100], default is 100.\n - a_bins: The number of bins to use for the a channel of the histogram.\nOnly valid in RGB888 format.The setting range is [2, 256], default is 256.\n - b_bins: The number of bins to use for the b channel of the histogram.\nOnly valid in RGB888 format. The setting range is [2, 256], default is 256.\n - difference: difference may be set to an image object to cause this method to operate on the difference image between the current image and the difference image object.\ndefault is None.\n\n\nReturns: Returns image::Histogram object\n"
+ },
+ "args": [
+ [
+ "std::vector>",
+ "thresholds",
+ "std::vector>()"
+ ],
+ [
+ "bool",
+ "invert",
+ "false"
+ ],
+ [
+ "std::vector",
+ "roi",
+ "std::vector()"
+ ],
+ [
+ "int",
+ "bins",
+ "-1"
+ ],
+ [
+ "int",
+ "l_bins",
+ "100"
+ ],
+ [
+ "int",
+ "a_bins",
+ "256"
+ ],
+ [
+ "int",
+ "b_bins",
+ "256"
+ ],
+ [
+ "image::Image *",
+ "difference",
+ "nullptr"
+ ]
+ ],
+ "ret_type": "image::Histogram",
+ "static": false,
+ "def": "image::Histogram get_histogram(std::vector> thresholds = std::vector>(), bool invert = false, std::vector roi = std::vector(), int bins = -1, int l_bins = 100, int a_bins = 256, int b_bins = 256, image::Image *difference = nullptr)",
+ "py_def": "def get_histogram(self, thresholds: list[list[int]] = [], invert: bool = False, roi: list[int] = [], bins: int = -1, l_bins: int = 100, a_bins: int = 256, b_bins: int = 256, difference: Image = None) -> Histogram"
+ },
+ "get_statistics": {
+ "type": "func",
+ "name": "get_statistics",
+ "doc": {
+ "brief": "Gets the statistics of the image. TODO: support in the feature",
+ "note": "For GRAYSCALE format, Lmin and Lmax range is [0, 255]. For RGB888 format, Lmin and Lmax range is [0, 100].",
+ "param": {
+ "thresholds": "You can define multiple thresholds.\nFor GRAYSCALE format, you can use {{Lmin, Lmax}, ...} to define one or more thresholds.\nFor RGB888 format, you can use {{Lmin, Lmax, Amin, Amax, Bmin, Bmax}, ...} to define one or more thresholds.\nWhere the upper case L,A,B represent the L,A,B channels of the LAB image format, and min, max represent the minimum and maximum values of the corresponding channels.",
+ "invert": "If true, the image will be inverted before the operation. default is false.",
+ "roi": "The region of interest, input in the format of (x, y, w, h), x and y are the coordinates of the upper left corner, w and h are the width and height of roi.\ndefault is None, means whole image.",
+ "bins": "The number of bins to use for the statistics. default is -1.",
+ "l_bins": "The number of bins to use for the l channel of the statistics. default is -1.",
+ "a_bins": "The number of bins to use for the a channel of the statistics. default is -1.",
+ "b_bins": "The number of bins to use for the b channel of the statistics. default is -1.",
+ "difference": "The difference image to use for the statistics. default is None."
+ },
+ "return": "Returns the statistics of the image",
+ "maixpy": "maix.image.Image.get_statistics",
+ "py_doc": "Gets the statistics of the image. TODO: support in the feature\n\nArgs:\n - thresholds: You can define multiple thresholds.\nFor GRAYSCALE format, you can use {{Lmin, Lmax}, ...} to define one or more thresholds.\nFor RGB888 format, you can use {{Lmin, Lmax, Amin, Amax, Bmin, Bmax}, ...} to define one or more thresholds.\nWhere the upper case L,A,B represent the L,A,B channels of the LAB image format, and min, max represent the minimum and maximum values of the corresponding channels.\n - invert: If true, the image will be inverted before the operation. default is false.\n - roi: The region of interest, input in the format of (x, y, w, h), x and y are the coordinates of the upper left corner, w and h are the width and height of roi.\ndefault is None, means whole image.\n - bins: The number of bins to use for the statistics. default is -1.\n - l_bins: The number of bins to use for the l channel of the statistics. default is -1.\n - a_bins: The number of bins to use for the a channel of the statistics. default is -1.\n - b_bins: The number of bins to use for the b channel of the statistics. default is -1.\n - difference: The difference image to use for the statistics. default is None.\n\n\nReturns: Returns the statistics of the image\n"
+ },
+ "args": [
+ [
+ "std::vector>",
+ "thresholds",
+ "std::vector>()"
+ ],
+ [
+ "bool",
+ "invert",
+ "false"
+ ],
+ [
+ "std::vector",
+ "roi",
+ "std::vector()"
+ ],
+ [
+ "int",
+ "bins",
+ "-1"
+ ],
+ [
+ "int",
+ "l_bins",
+ "-1"
+ ],
+ [
+ "int",
+ "a_bins",
+ "-1"
+ ],
+ [
+ "int",
+ "b_bins",
+ "-1"
+ ],
+ [
+ "image::Image *",
+ "difference",
+ "nullptr"
+ ]
+ ],
+ "ret_type": "image::Statistics",
+ "static": false,
+ "def": "image::Statistics get_statistics(std::vector> thresholds = std::vector>(), bool invert = false, std::vector roi = std::vector(), int bins = -1, int l_bins = -1, int a_bins = -1, int b_bins = -1, image::Image *difference = nullptr)",
+ "py_def": "def get_statistics(self, thresholds: list[list[int]] = [], invert: bool = False, roi: list[int] = [], bins: int = -1, l_bins: int = -1, a_bins: int = -1, b_bins: int = -1, difference: Image = None) -> Statistics"
+ },
+ "get_regression": {
+ "type": "func",
+ "name": "get_regression",
+ "doc": {
+ "brief": "Gets the regression of the image.",
+ "note": "For GRAYSCALE format, Lmin and Lmax range is [0, 255]. For RGB888 format, Lmin and Lmax range is [0, 100].",
+ "param": {
+ "thresholds": "You can define multiple thresholds.\nFor GRAYSCALE format, you can use {{Lmin, Lmax}, ...} to define one or more thresholds.\nFor RGB888 format, you can use {{Lmin, Lmax, Amin, Amax, Bmin, Bmax}, ...} to define one or more thresholds.\nWhere the upper case L,A,B represent the L,A,B channels of the LAB image format, and min, max represent the minimum and maximum values of the corresponding channels.",
+ "invert": "If true, the image will be inverted before the operation. default is false.",
+ "roi": "The region of interest, input in the format of (x, y, w, h), x and y are the coordinates of the upper left corner, w and h are the width and height of roi.\ndefault is None, means whole image.",
+ "x_stride": "The x stride to use for the regression. default is 2.",
+ "y_stride": "The y stride to use for the regression. default is 1.",
+ "area_threshold": "The area threshold to use for the regression. default is 10.",
+ "pixels_threshold": "The pixels threshold to use for the regression. default is 10.",
+ "robust": "If true, the regression will be robust. default is false."
+ },
+ "return": "Returns the regression of the image",
+ "maixpy": "maix.image.Image.get_regression",
+ "py_doc": "Gets the regression of the image.\n\nArgs:\n - thresholds: You can define multiple thresholds.\nFor GRAYSCALE format, you can use {{Lmin, Lmax}, ...} to define one or more thresholds.\nFor RGB888 format, you can use {{Lmin, Lmax, Amin, Amax, Bmin, Bmax}, ...} to define one or more thresholds.\nWhere the upper case L,A,B represent the L,A,B channels of the LAB image format, and min, max represent the minimum and maximum values of the corresponding channels.\n - invert: If true, the image will be inverted before the operation. default is false.\n - roi: The region of interest, input in the format of (x, y, w, h), x and y are the coordinates of the upper left corner, w and h are the width and height of roi.\ndefault is None, means whole image.\n - x_stride: The x stride to use for the regression. default is 2.\n - y_stride: The y stride to use for the regression. default is 1.\n - area_threshold: The area threshold to use for the regression. default is 10.\n - pixels_threshold: The pixels threshold to use for the regression. default is 10.\n - robust: If true, the regression will be robust. default is false.\n\n\nReturns: Returns the regression of the image\n"
+ },
+ "args": [
+ [
+ "std::vector>",
+ "thresholds",
+ "std::vector>()"
+ ],
+ [
+ "bool",
+ "invert",
+ "false"
+ ],
+ [
+ "std::vector",
+ "roi",
+ "std::vector()"
+ ],
+ [
+ "int",
+ "x_stride",
+ "2"
+ ],
+ [
+ "int",
+ "y_stride",
+ "1"
+ ],
+ [
+ "int",
+ "area_threshold",
+ "10"
+ ],
+ [
+ "int",
+ "pixels_threshold",
+ "10"
+ ],
+ [
+ "bool",
+ "robust",
+ "false"
+ ]
+ ],
+ "ret_type": "std::vector",
+ "static": false,
+ "def": "std::vector get_regression(std::vector> thresholds = std::vector>(), bool invert = false, std::vector roi = std::vector(), int x_stride = 2, int y_stride = 1, int area_threshold = 10, int pixels_threshold = 10, bool robust = false)",
+ "py_def": "def get_regression(self, thresholds: list[list[int]] = [], invert: bool = False, roi: list[int] = [], x_stride: int = 2, y_stride: int = 1, area_threshold: int = 10, pixels_threshold: int = 10, robust: bool = False) -> list[Line]"
+ },
+ "save": {
+ "type": "func",
+ "name": "save",
+ "doc": {
+ "brief": "Save image to file",
+ "param": {
+ "path": "file path",
+ "quality": "image quality, by default(value is 95), support jpeg and png format"
+ },
+ "return": "error code, err::ERR_NONE is ok, other is error",
+ "maixpy": "maix.image.Image.save",
+ "py_doc": "Save image to file\n\nArgs:\n - path: file path\n - quality: image quality, by default(value is 95), support jpeg and png format\n\n\nReturns: error code, err::ERR_NONE is ok, other is error\n"
+ },
+ "args": [
+ [
+ "const char *",
+ "path",
+ null
+ ],
+ [
+ "int",
+ "quality",
+ "95"
+ ]
+ ],
+ "ret_type": "err::Err",
+ "static": false,
+ "def": "err::Err save(const char *path, int quality = 95)",
+ "py_def": "def save(self, path: str, quality: int = 95) -> maix.err.Err"
+ },
+ "flood_fill": {
+ "type": "func",
+ "name": "flood_fill",
+ "doc": {
+ "brief": "Flood fills a region of the image starting from location x, y.",
+ "param": {
+ "x": "The x coordinate of the seed point.",
+ "y": "The y coordinate of the seed point.",
+ "seed_threshold": "The seed_threshold value controls how different any pixel in the fill area may be from the original starting pixel. default is 0.05.",
+ "floating_threshold": "The floating_threshold value controls how different any pixel in the fill area may be from any neighbor pixels. default is 0.05.",
+ "color": "The color to fill the region with. default is white.",
+ "invert": "If true, the image will be inverted before the operation. default is false.",
+ "clear_background": "If true, the background will be cleared before the operation. default is false.",
+ "mask": "Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None. FIXME: the mask image works abnormally"
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.flood_fill",
+ "py_doc": "Flood fills a region of the image starting from location x, y.\n\nArgs:\n - x: The x coordinate of the seed point.\n - y: The y coordinate of the seed point.\n - seed_threshold: The seed_threshold value controls how different any pixel in the fill area may be from the original starting pixel. default is 0.05.\n - floating_threshold: The floating_threshold value controls how different any pixel in the fill area may be from any neighbor pixels. default is 0.05.\n - color: The color to fill the region with. default is white.\n - invert: If true, the image will be inverted before the operation. default is false.\n - clear_background: If true, the background will be cleared before the operation. default is false.\n - mask: Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None. FIXME: the mask image works abnormally\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "int",
+ "x",
+ null
+ ],
+ [
+ "int",
+ "y",
+ null
+ ],
+ [
+ "float",
+ "seed_threshold",
+ "0.05"
+ ],
+ [
+ "float",
+ "floating_threshold",
+ "0.05"
+ ],
+ [
+ "image::Color",
+ "color",
+ "image::COLOR_WHITE"
+ ],
+ [
+ "bool",
+ "invert",
+ "false"
+ ],
+ [
+ "bool",
+ "clear_background",
+ "false"
+ ],
+ [
+ "image::Image *",
+ "mask",
+ "nullptr"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *flood_fill(int x, int y, float seed_threshold = 0.05, float floating_threshold = 0.05, image::Color color = image::COLOR_WHITE, bool invert = false, bool clear_background = false, image::Image *mask = nullptr)",
+ "py_def": "def flood_fill(self, x: int, y: int, seed_threshold: float = 0.05, floating_threshold: float = 0.05, color: Color = ..., invert: bool = False, clear_background: bool = False, mask: Image = None) -> Image"
+ },
+ "erode": {
+ "type": "func",
+ "name": "erode",
+ "doc": {
+ "brief": "Erodes the image in place.",
+ "param": {
+ "size": "Kernel size. The actual kernel size is ((size * 2) + 1) * ((size * 2) + 1). Use 1(3x3 kernel), 2(5x5 kernel).",
+ "threshold": "The number of pixels in the kernel that are not 0. If it is less than or equal to the threshold, set the center pixel to black. default is (kernel_size - 1).",
+ "mask": "Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.erode",
+ "py_doc": "Erodes the image in place.\n\nArgs:\n - size: Kernel size. The actual kernel size is ((size * 2) + 1) * ((size * 2) + 1). Use 1(3x3 kernel), 2(5x5 kernel).\n - threshold: The number of pixels in the kernel that are not 0. If it is less than or equal to the threshold, set the center pixel to black. default is (kernel_size - 1).\n - mask: Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "int",
+ "size",
+ null
+ ],
+ [
+ "int",
+ "threshold",
+ "-1"
+ ],
+ [
+ "image::Image *",
+ "mask",
+ "nullptr"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *erode(int size, int threshold = -1, image::Image *mask = nullptr)",
+ "py_def": "def erode(self, size: int, threshold: int = -1, mask: Image = None) -> Image"
+ },
+ "dilate": {
+ "type": "func",
+ "name": "dilate",
+ "doc": {
+ "brief": "Dilates the image in place.",
+ "param": {
+ "size": "Kernel size. The actual kernel size is ((size * 2) + 1) * ((size * 2) + 1). Use 1(3x3 kernel), 2(5x5 kernel).",
+ "threshold": "The number of pixels in the kernel that are not 0. If it is greater than or equal to the threshold, set the center pixel to white. default is 0.",
+ "mask": "Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.dilate",
+ "py_doc": "Dilates the image in place.\n\nArgs:\n - size: Kernel size. The actual kernel size is ((size * 2) + 1) * ((size * 2) + 1). Use 1(3x3 kernel), 2(5x5 kernel).\n - threshold: The number of pixels in the kernel that are not 0. If it is greater than or equal to the threshold, set the center pixel to white. default is 0.\n - mask: Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "int",
+ "size",
+ null
+ ],
+ [
+ "int",
+ "threshold",
+ "0"
+ ],
+ [
+ "image::Image *",
+ "mask",
+ "nullptr"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *dilate(int size, int threshold = 0, image::Image *mask = nullptr)",
+ "py_def": "def dilate(self, size: int, threshold: int = 0, mask: Image = None) -> Image"
+ },
+ "open": {
+ "type": "func",
+ "name": "open",
+ "doc": {
+ "brief": "Performs erosion and dilation on an image in order.",
+ "param": {
+ "size": "Kernel size. The actual kernel size is ((size * 2) + 1) * ((size * 2) + 1). Use 1(3x3 kernel), 2(5x5 kernel).",
+ "threshold": "As the threshold for erosion and dilation, the actual threshold for erosion is (kernel_size - 1 - threshold), the actual threshold for dialation is threshold. default is 0.",
+ "mask": "Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.open",
+ "py_doc": "Performs erosion and dilation on an image in order.\n\nArgs:\n - size: Kernel size. The actual kernel size is ((size * 2) + 1) * ((size * 2) + 1). Use 1(3x3 kernel), 2(5x5 kernel).\n - threshold: As the threshold for erosion and dilation, the actual threshold for erosion is (kernel_size - 1 - threshold), the actual threshold for dialation is threshold. default is 0.\n - mask: Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "int",
+ "size",
+ null
+ ],
+ [
+ "int",
+ "threshold",
+ "0"
+ ],
+ [
+ "image::Image *",
+ "mask",
+ "nullptr"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *open(int size, int threshold = 0, image::Image *mask = nullptr)",
+ "py_def": "def open(self, size: int, threshold: int = 0, mask: Image = None) -> Image"
+ },
+ "close": {
+ "type": "func",
+ "name": "close",
+ "doc": {
+ "brief": "Performs dilation and erosion on an image in order.",
+ "param": {
+ "size": "Kernel size. The actual kernel size is ((size * 2) + 1) * ((size * 2) + 1). Use 1(3x3 kernel), 2(5x5 kernel).",
+ "threshold": "As the threshold for erosion and dilation, the actual threshold for erosion is (kernel_size - 1 - threshold), the actual threshold for dialation is threshold. default is 0.",
+ "mask": "Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.close",
+ "py_doc": "Performs dilation and erosion on an image in order.\n\nArgs:\n - size: Kernel size. The actual kernel size is ((size * 2) + 1) * ((size * 2) + 1). Use 1(3x3 kernel), 2(5x5 kernel).\n - threshold: As the threshold for erosion and dilation, the actual threshold for erosion is (kernel_size - 1 - threshold), the actual threshold for dialation is threshold. default is 0.\n - mask: Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "int",
+ "size",
+ null
+ ],
+ [
+ "int",
+ "threshold",
+ "0"
+ ],
+ [
+ "image::Image *",
+ "mask",
+ "nullptr"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *close(int size, int threshold = 0, image::Image *mask = nullptr)",
+ "py_def": "def close(self, size: int, threshold: int = 0, mask: Image = None) -> Image"
+ },
+ "top_hat": {
+ "type": "func",
+ "name": "top_hat",
+ "doc": {
+ "brief": "Returns the image difference of the image and Image.open()\u2019ed image.",
+ "param": {
+ "size": "Kernel size. The actual kernel size is ((size * 2) + 1) * ((size * 2) + 1). Use 1(3x3 kernel), 2(5x5 kernel).",
+ "threshold": "As the threshold for open method. default is 0.",
+ "mask": "Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.top_hat",
+ "py_doc": "Returns the image difference of the image and Image.open()\u2019ed image.\n\nArgs:\n - size: Kernel size. The actual kernel size is ((size * 2) + 1) * ((size * 2) + 1). Use 1(3x3 kernel), 2(5x5 kernel).\n - threshold: As the threshold for open method. default is 0.\n - mask: Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "int",
+ "size",
+ null
+ ],
+ [
+ "int",
+ "threshold",
+ "0"
+ ],
+ [
+ "image::Image *",
+ "mask",
+ "nullptr"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *top_hat(int size, int threshold = 0, image::Image *mask = nullptr)",
+ "py_def": "def top_hat(self, size: int, threshold: int = 0, mask: Image = None) -> Image"
+ },
+ "black_hat": {
+ "type": "func",
+ "name": "black_hat",
+ "doc": {
+ "brief": "Returns the image difference of the image and Image.close()\u2019ed image.",
+ "param": {
+ "size": "Kernel size. The actual kernel size is ((size * 2) + 1) * ((size * 2) + 1). Use 1(3x3 kernel), 2(5x5 kernel).",
+ "threshold": "As the threshold for close method. default is 0.",
+ "mask": "Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None."
+ },
+ "return": "Returns the image after the operation is completed.",
+ "maixpy": "maix.image.Image.black_hat",
+ "py_doc": "Returns the image difference of the image and Image.close()\u2019ed image.\n\nArgs:\n - size: Kernel size. The actual kernel size is ((size * 2) + 1) * ((size * 2) + 1). Use 1(3x3 kernel), 2(5x5 kernel).\n - threshold: As the threshold for close method. default is 0.\n - mask: Mask is another image to use as a pixel level mask for the operation. The mask should be an image with just black or white pixels and should be the same size as the image being operated on.\nOnly pixels set in the mask are modified. default is None.\n\n\nReturns: Returns the image after the operation is completed.\n"
+ },
+ "args": [
+ [
+ "int",
+ "size",
+ null
+ ],
+ [
+ "int",
+ "threshold",
+ "0"
+ ],
+ [
+ "image::Image *",
+ "mask",
+ "nullptr"
+ ]
+ ],
+ "ret_type": "image::Image*",
+ "static": false,
+ "def": "image::Image *black_hat(int size, int threshold = 0, image::Image *mask = nullptr)",
+ "py_def": "def black_hat(self, size: int, threshold: int = 0, mask: Image = None) -> Image"
+ },
+ "find_blobs": {
+ "type": "func",
+ "name": "find_blobs",
+ "doc": {
+ "brief": "Finds all blobs in the image and returns a list of image.Blob class which describe each Blob.\\nPlease see the image.Blob object more more information.",
+ "note": "For GRAYSCALE format, Lmin and Lmax range is [0, 255]. For RGB888 format, Lmin and Lmax range is [0, 100].",
+ "param": {
+ "thresholds": "You can define multiple thresholds.\nFor GRAYSCALE format, you can use {{Lmin, Lmax}, ...} to define one or more thresholds.\nFor RGB888 format, you can use {{Lmin, Lmax, Amin, Amax, Bmin, Bmax}, ...} to define one or more thresholds.\nWhere the upper case L,A,B represent the L,A,B channels of the LAB image format, and min, max represent the minimum and maximum values of the corresponding channels.",
+ "invert": "if true, will invert thresholds before find blobs, default is false",
+ "roi": "The region of interest, input in the format of (x, y, w, h), x and y are the coordinates of the upper left corner, w and h are the width and height of roi.\ndefault is None, means whole image.",
+ "x_stride": "x stride is the number of x pixels to skip when doing the hough transform. default is 2",
+ "y_stride": "y_stride is the number of y pixels to skip when doing the hough transform. default is 1",
+ "area_threshold": "area threshold, if the blob area is smaller than area_threshold, the blob is not returned, default is 10",
+ "pixels_threshold": "pixels threshold, if the blob pixels is smaller than area_threshold, the blob is not returned,, default is 10.\nwhen x_stride and y_stride is equal to 1, pixels_threshold is equivalent to area_threshold",
+ "merge": "if True merges all not filtered out blobs whos bounding rectangles intersect each other. default is false",
+ "margin": "margin can be used to increase or decrease the size of the bounding rectangles for blobs during the intersection test.\nFor example, with a margin of 1 blobs whos bounding rectangles are 1 pixel away from each other will be merged. default is 0",
+ "x_hist_bins_max": "if set to non-zero populates a histogram buffer in each blob object with an x_histogram projection of all columns in the object. This value then sets the number of bins for that projection.",
+ "y_hist_bins_max": "if set to non-zero populates a histogram buffer in each blob object with an y_histogram projection of all rows in the object. This value then sets the number of bins for that projection."
+ },
+ "return": "Return the blob when found blobs, format is (blob1, blob2, ...), you can use blob class methods to do more operations.",
+ "maixpy": "maix.image.Image.find_blobs",
+ "py_doc": "Finds all blobs in the image and returns a list of image.Blob class which describe each Blob.\nPlease see the image.Blob object more more information.\n\nArgs:\n - thresholds: You can define multiple thresholds.\nFor GRAYSCALE format, you can use {{Lmin, Lmax}, ...} to define one or more thresholds.\nFor RGB888 format, you can use {{Lmin, Lmax, Amin, Amax, Bmin, Bmax}, ...} to define one or more thresholds.\nWhere the upper case L,A,B represent the L,A,B channels of the LAB image format, and min, max represent the minimum and maximum values of the corresponding channels.\n - invert: if true, will invert thresholds before find blobs, default is false\n - roi: The region of interest, input in the format of (x, y, w, h), x and y are the coordinates of the upper left corner, w and h are the width and height of roi.\ndefault is None, means whole image.\n - x_stride: x stride is the number of x pixels to skip when doing the hough transform. default is 2\n - y_stride: y_stride is the number of y pixels to skip when doing the hough transform. default is 1\n - area_threshold: area threshold, if the blob area is smaller than area_threshold, the blob is not returned, default is 10\n - pixels_threshold: pixels threshold, if the blob pixels is smaller than area_threshold, the blob is not returned,, default is 10.\nwhen x_stride and y_stride is equal to 1, pixels_threshold is equivalent to area_threshold\n - merge: if True merges all not filtered out blobs whos bounding rectangles intersect each other. default is false\n - margin: margin can be used to increase or decrease the size of the bounding rectangles for blobs during the intersection test.\nFor example, with a margin of 1 blobs whos bounding rectangles are 1 pixel away from each other will be merged. default is 0\n - x_hist_bins_max: if set to non-zero populates a histogram buffer in each blob object with an x_histogram projection of all columns in the object. This value then sets the number of bins for that projection.\n - y_hist_bins_max: if set to non-zero populates a histogram buffer in each blob object with an y_histogram projection of all rows in the object. This value then sets the number of bins for that projection.\n\n\nReturns: Return the blob when found blobs, format is (blob1, blob2, ...), you can use blob class methods to do more operations.\n"
+ },
+ "args": [
+ [
+ "std::vector>",
+ "thresholds",
+ "std::vector>()"
+ ],
+ [
+ "bool",
+ "invert",
+ "false"
+ ],
+ [
+ "std::vector",
+ "roi",
+ "std::vector()"
+ ],
+ [
+ "int",
+ "x_stride",
+ "2"
+ ],
+ [
+ "int",
+ "y_stride",
+ "1"
+ ],
+ [
+ "int",
+ "area_threshold",
+ "10"
+ ],
+ [
+ "int",
+ "pixels_threshold",
+ "10"
+ ],
+ [
+ "bool",
+ "merge",
+ "false"
+ ],
+ [
+ "int",
+ "margin",
+ "0"
+ ],
+ [
+ "int",
+ "x_hist_bins_max",
+ "0"
+ ],
+ [
+ "int",
+ "y_hist_bins_max",
+ "0"
+ ]
+ ],
+ "ret_type": "std::vector",
+ "static": false,
+ "def": "std::vector find_blobs(std::vector> thresholds = std::vector>(), bool invert = false, std::vector roi = std::vector(), int x_stride = 2, int y_stride = 1, int area_threshold = 10, int pixels_threshold = 10, bool merge = false, int margin = 0, int x_hist_bins_max = 0, int y_hist_bins_max = 0)",
+ "py_def": "def find_blobs(self, thresholds: list[list[int]] = [], invert: bool = False, roi: list[int] = [], x_stride: int = 2, y_stride: int = 1, area_threshold: int = 10, pixels_threshold: int = 10, merge: bool = False, margin: int = 0, x_hist_bins_max: int = 0, y_hist_bins_max: int = 0) -> list[Blob]"
+ },
+ "find_lines": {
+ "type": "func",
+ "name": "find_lines",
+ "doc": {
+ "brief": "Find lines in image",
+ "param": {
+ "roi": "The region of interest, input in the format of (x, y, w, h), x and y are the coordinates of the upper left corner, w and h are the width and height of roi.\ndefault is None, means whole image.",
+ "x_stride": "x stride is the number of x pixels to skip when doing the hough transform. default is 2",
+ "y_stride": "y_stride is the number of y pixels to skip when doing the hough transform. default is 1",
+ "threshold": "threshold threshold controls what lines are detected from the hough transform. Only lines with a magnitude greater than or equal to threshold are returned.\nThe right value of threshold for your application is image dependent. default is 1000.",
+ "theta_margin": "theta_margin controls the merging of detected lines. default is 25.",
+ "rho_margin": "rho_margin controls the merging of detected lines. default is 25."
+ },
+ "return": "Return the line when found lines, format is (line1, line2, ...), you can use line class methods to do more operations",
+ "maixpy": "maix.image.Image.find_lines",
+ "py_doc": "Find lines in image\n\nArgs:\n - roi: The region of interest, input in the format of (x, y, w, h), x and y are the coordinates of the upper left corner, w and h are the width and height of roi.\ndefault is None, means whole image.\n - x_stride: x stride is the number of x pixels to skip when doing the hough transform. default is 2\n - y_stride: y_stride is the number of y pixels to skip when doing the hough transform. default is 1\n - threshold: threshold threshold controls what lines are detected from the hough transform. Only lines with a magnitude greater than or equal to threshold are returned.\nThe right value of threshold for your application is image dependent. default is 1000.\n - theta_margin: theta_margin controls the merging of detected lines. default is 25.\n - rho_margin: rho_margin controls the merging of detected lines. default is 25.\n\n\nReturns: Return the line when found lines, format is (line1, line2, ...), you can use line class methods to do more operations\n"
+ },
+ "args": [
+ [
+ "std::vector",
+ "roi",
+ "std::vector()"
+ ],
+ [
+ "int",
+ "x_stride",
+ "2"
+ ],
+ [
+ "int",
+ "y_stride",
+ "1"
+ ],
+ [
+ "double",
+ "threshold",
+ "1000"
+ ],
+ [
+ "double",
+ "theta_margin",
+ "25"
+ ],
+ [
+ "double",
+ "rho_margin",
+ "25"
+ ]
+ ],
+ "ret_type": "std::vector",
+ "static": false,
+ "def": "std::vector find_lines(std::vector roi = std::vector(), int x_stride = 2, int y_stride = 1, double threshold = 1000, double theta_margin = 25, double rho_margin = 25)",
+ "py_def": "def find_lines(self, roi: list[int] = [], x_stride: int = 2, y_stride: int = 1, threshold: float = 1000, theta_margin: float = 25, rho_margin: float = 25) -> list[Line]"
+ },
+ "find_line_segments": {
+ "type": "func",
+ "name": "find_line_segments",
+ "doc": {
+ "brief": "Finds all line segments in the image.",
+ "param": {
+ "roi": "The region of interest, input in the format of (x, y, w, h), x and y are the coordinates of the upper left corner, w and h are the width and height of roi.\ndefault is None, means whole image.",
+ "merge_distance": "The maximum distance between two lines to merge them. default is 0.",
+ "max_theta_difference": "The maximum difference between two lines to merge them. default is 15."
+ },
+ "return": "Return the line when found lines, format is (line1, line2, ...), you can use line class methods to do more operations",
+ "maixpy": "maix.image.Image.find_line_segments",
+ "py_doc": "Finds all line segments in the image.\n\nArgs:\n - roi: The region of interest, input in the format of (x, y, w, h), x and y are the coordinates of the upper left corner, w and h are the width and height of roi.\ndefault is None, means whole image.\n - merge_distance: The maximum distance between two lines to merge them. default is 0.\n - max_theta_difference: The maximum difference between two lines to merge them. default is 15.\n\n\nReturns: Return the line when found lines, format is (line1, line2, ...), you can use line class methods to do more operations\n"
+ },
+ "args": [
+ [
+ "std::vector",
+ "roi",
+ "std::vector()"
+ ],
+ [
+ "int",
+ "merge_distance",
+ "0"
+ ],
+ [
+ "int",
+ "max_theta_difference",
+ "15"
+ ]
+ ],
+ "ret_type": "std::vector",
+ "static": false,
+ "def": "std::vector find_line_segments(std::vector roi = std::vector(), int merge_distance = 0, int max_theta_difference = 15)",
+ "py_def": "def find_line_segments(self, roi: list[int] = [], merge_distance: int = 0, max_theta_difference: int = 15) -> list[Line]"
+ },
+ "find_circles": {
+ "type": "func",
+ "name": "find_circles",
+ "doc": {
+ "brief": "Find circles in image",
+ "param": {
+ "roi": "The region of interest, input in the format of (x, y, w, h), x and y are the coordinates of the upper left corner, w and h are the width and height of roi.\ndefault is None, means whole image.",
+ "x_stride": "x stride is the number of x pixels to skip when doing the hough transform. default is 2",
+ "y_stride": "y_stride is the number of y pixels to skip when doing the hough transform. default is 1",
+ "threshold": "threshold controls what circles are detected from the hough transform. Only circles with a magnitude greater than or equal to threshold are returned.\nThe right value of threshold for your application is image dependent.",
+ "x_margin": "x_margin controls the merging of detected circles. Circles which are x_margin, y_margin, and r_margin pixels apart are merged. default is 10",
+ "y_margin": "y_margin controls the merging of detected circles. Circles which are x_margin, y_margin, and r_margin pixels apart are merged. default is 10",
+ "r_margin": "r_margin controls the merging of detected circles. Circles which are x_margin, y_margin, and r_margin pixels apart are merged. default is 10",
+ "r_min": "r_min controls the minimum circle radius detected. Increase this to speed up the algorithm. default is 2",
+ "r_max": "r_max controls the maximum circle radius detected. Decrease this to speed up the algorithm. default is min(roi.w / 2, roi.h / 2)",
+ "r_step": "r_step controls how to step the radius detection by. default is 2."
+ },
+ "return": "Return the circle when found circles, format is (circle1, circle2, ...), you can use circle class methods to do more operations",
+ "maixpy": "maix.image.Image.find_circles",
+ "py_doc": "Find circles in image\n\nArgs:\n - roi: The region of interest, input in the format of (x, y, w, h), x and y are the coordinates of the upper left corner, w and h are the width and height of roi.\ndefault is None, means whole image.\n - x_stride: x stride is the number of x pixels to skip when doing the hough transform. default is 2\n - y_stride: y_stride is the number of y pixels to skip when doing the hough transform. default is 1\n - threshold: threshold controls what circles are detected from the hough transform. Only circles with a magnitude greater than or equal to threshold are returned.\nThe right value of threshold for your application is image dependent.\n - x_margin: x_margin controls the merging of detected circles. Circles which are x_margin, y_margin, and r_margin pixels apart are merged. default is 10\n - y_margin: y_margin controls the merging of detected circles. Circles which are x_margin, y_margin, and r_margin pixels apart are merged. default is 10\n - r_margin: r_margin controls the merging of detected circles. Circles which are x_margin, y_margin, and r_margin pixels apart are merged. default is 10\n - r_min: r_min controls the minimum circle radius detected. Increase this to speed up the algorithm. default is 2\n - r_max: r_max controls the maximum circle radius detected. Decrease this to speed up the algorithm. default is min(roi.w / 2, roi.h / 2)\n - r_step: r_step controls how to step the radius detection by. default is 2.\n\n\nReturns: Return the circle when found circles, format is (circle1, circle2, ...), you can use circle class methods to do more operations\n"
+ },
+ "args": [
+ [
+ "std::vector",
+ "roi",
+ "std::vector()"
+ ],
+ [
+ "int",
+ "x_stride",
+ "2"
+ ],
+ [
+ "int",
+ "y_stride",
+ "1"
+ ],
+ [
+ "int",
+ "threshold",
+ "2000"
+ ],
+ [
+ "int",
+ "x_margin",
+ "10"
+ ],
+ [
+ "int",
+ "y_margin",
+ "10"
+ ],
+ [
+ "int",
+ "r_margin",
+ "10"
+ ],
+ [
+ "int",
+ "r_min",
+ "2"
+ ],
+ [
+ "int",
+ "r_max",
+ "-1"
+ ],
+ [
+ "int",
+ "r_step",
+ "2"
+ ]
+ ],
+ "ret_type": "std::vector",
+ "static": false,
+ "def": "std::vector find_circles(std::vector roi = std::vector(), int x_stride = 2, int y_stride = 1, int threshold = 2000, int x_margin = 10, int y_margin = 10, int r_margin = 10, int r_min = 2, int r_max = -1, int r_step = 2)",
+ "py_def": "def find_circles(self, roi: list[int] = [], x_stride: int = 2, y_stride: int = 1, threshold: int = 2000, x_margin: int = 10, y_margin: int = 10, r_margin: int = 10, r_min: int = 2, r_max: int = -1, r_step: int = 2) -> list[Circle]"
+ },
+ "find_rects": {
+ "type": "func",
+ "name": "find_rects",
+ "doc": {
+ "brief": "Finds all rects in the image.",
+ "param": {
+ "roi": "The region of interest, input in the format of (x, y, w, h), x and y are the coordinates of the upper left corner, w and h are the width and height of roi.\ndefault is None, means whole image.",
+ "threshold": "The threshold to use for the rects. default is 10000."
+ },
+ "return": "Returns the rects of the image",
+ "maixpy": "maix.image.Image.find_rects",
+ "py_doc": "Finds all rects in the image.\n\nArgs:\n - roi: The region of interest, input in the format of (x, y, w, h), x and y are the coordinates of the upper left corner, w and h are the width and height of roi.\ndefault is None, means whole image.\n - threshold: The threshold to use for the rects. default is 10000.\n\n\nReturns: Returns the rects of the image\n"
+ },
+ "args": [
+ [
+ "std::vector",
+ "roi",
+ "std::vector()"
+ ],
+ [
+ "int",
+ "threshold",
+ "10000"
+ ]
+ ],
+ "ret_type": "std::vector",
+ "static": false,
+ "def": "std::vector find_rects(std::vector roi = std::vector(), int threshold = 10000)",
+ "py_def": "def find_rects(self, roi: list[int] = [], threshold: int = 10000) -> list[Rect]"
+ },
+ "find_qrcodes": {
+ "type": "func",
+ "name": "find_qrcodes",
+ "doc": {
+ "brief": "Finds all qrcodes in the image.",
+ "param": {
+ "roi": "The region of interest, input in the format of (x, y, w, h), x and y are the coordinates of the upper left corner, w and h are the width and height of roi.\ndefault is None, means whole image."
+ },
+ "return": "Returns the qrcodes of the image",
+ "maixpy": "maix.image.Image.find_qrcodes",
+ "py_doc": "Finds all qrcodes in the image.\n\nArgs:\n - roi: The region of interest, input in the format of (x, y, w, h), x and y are the coordinates of the upper left corner, w and h are the width and height of roi.\ndefault is None, means whole image.\n\n\nReturns: Returns the qrcodes of the image\n"
+ },
+ "args": [
+ [
+ "std::vector",
+ "roi",
+ "std::vector()"
+ ]
+ ],
+ "ret_type": "std::vector