All images are gray, RGB, or RGBA.
In a uint array, each element is in \([0,255].\)
In a float array, each element is in \([0,1].\)
flip_hor(x)
\(x\) is an image.
Flips \(x\) horizontally.
flip_vert(x)
\(x\) is an image.
Flips \(x\) vertically.
to_float(x)
\(x\) is a uint array.
Returns \(x/255\) cast to float.
to_uint(x)
\(x\) is a float array.
Returns \(255x\) cast to uint.
comps(x)
\(x\) is an image.
Returns the number of components in \(x.\)
1 = gray, 3 = RGB, 4 = RGBA.
to_bgr(x)
\(x\) is an image.
Converts \(x\) to BGR.
read(path)
path is a string.
Read image.
write(x,path)
\(x\) is an image.
path is a string.
Write image.
show(x)
\(x\) is an image.
Show image.