ImgArray.constructor
Declaration
constructor({height=256,
width=256,channel=3,lazy=false,dtype='float32'}={})
Function Description
contruction function of ImgArray, create an ImgArray object,with
parameters height, width, channel, lazy and dtype.
Parameter Description
- height: height of the image, default is 256.
- width: width of the image, default is 256.
- channel: channel of the image, default is 3.
-
lazy: whether to skip allocating the memory when initiating
ImageArray, default is false. when lazy is false, the default element
value is 0.
-
dtype: the element type of ImgArray, dtype can be one of 'float32',
'uint8','uint16','int32','uint32','cuint8', default is 'float32'.
dtype 'float32' are currently tested well,other types are not tested.
The ImgArray.dtypenames property can get all supported types.
Demons
Demo1
create a ImgArray and show it as matrix.
Code
Result
Demo2
create a ImgArray and show it as Image.
Code
Result