Flags
cv2.IMREAD_GRAYSCALE
or0
: Loads image in grayscale modecv2.IMREAD_COLOR
or1
: Loads a color image. Any transparency of image will be neglected. It is the default flag.cv2.IMREAD_UNCHANGED
or-1
: Loads image as such including alpha channel.
Imread
: Documentation linkImreadModes
: Documentation link
[[187 203 237 ... 227 233 215]
[158 167 200 ... 217 226 197]
[144 134 135 ... 213 224 191]
...
[ 54 53 54 ... 40 40 41]
[ 55 52 53 ... 39 39 40]
[ 56 53 53 ... 38 39 40]]
Image size (H, W) is: (1525, 1526)
Data type of image is: uint8
matrix size (H, W) is: (1525, 1526)
np.sum:Computes the sum
of array elements over a specified axis.
np.mean: Computes the arithmetic mean along the specified axis.
np.max: Computes the maximum of array elements along a
specified axis.
np.min: Computes the minimum of array elements along a specified
axis.
np.prod: Computes the product of array elements over a
specified axis.
np.std: Computes the standard deviation
along the specified axis.
np.var: Computes the variance
along the specified axis.
np.argmax: Returns the indices of
the maximum values along an axis.
np.argmin: Returns the
indices of the minimum values along an axis.
np.median:
Computes the median along the specified axis.
np.percentile:
Computes the q-th percentile of the data along the specified axis.
np.cumsum: Computes the cumulative sum of array elements along a
specified axis.
np.cumprod: Computes the cumulative product
of array elements along a specified axis.
np.linalg.norm:
Computes the vector or matrix norm.
Average of matrix elements: 91.7139703070279
Variance of matrix elements: 4259.920145633649