Shortcuts

mmcv.image

IO

imfrombytes

Read an image from bytes.

imread

Read an image.

imwrite

Write image to file.

use_backend

Select a backend for image decoding.

Color Space

bgr2gray

Convert a BGR image to grayscale image.

bgr2hls

Convert a BGR image to HLS

bgr2hsv

Convert a BGR image to HSV

bgr2rgb

Convert a BGR image to RGB

bgr2ycbcr

Convert a BGR image to YCbCr image.

gray2bgr

Convert a grayscale image to BGR image.

gray2rgb

Convert a grayscale image to RGB image.

hls2bgr

Convert a HLS image to BGR

hsv2bgr

Convert a HSV image to BGR

imconvert

Convert an image from the src colorspace to dst colorspace.

rgb2bgr

Convert a RGB image to BGR

rgb2gray

Convert a RGB image to grayscale image.

rgb2ycbcr

Convert a RGB image to YCbCr image.

ycbcr2bgr

Convert a YCbCr image to BGR image.

ycbcr2rgb

Convert a YCbCr image to RGB image.

Geometric

cutout

Randomly cut out a rectangle from the original img.

imcrop

Crop image patches.

imflip

Flip an image horizontally or vertically.

impad

Pad the given image to a certain shape or pad on all sides with specified padding mode and padding value.

impad_to_multiple

Pad an image to ensure each edge to be multiple to some number.

imrescale

Resize image while keeping the aspect ratio.

imresize

Resize image to a given size.

imresize_like

Resize image to the same size of a given image.

imresize_to_multiple

Resize image according to a given size or scale factor and then rounds up the the resized or rescaled image size to the nearest value that can be divided by the divisor.

imrotate

Rotate an image.

imshear

Shear an image.

imtranslate

Translate an image.

rescale_size

Calculate the new size to be rescaled to.

Photometric

adjust_brightness

Adjust image brightness.

adjust_color

It blends the source image and its gray image:

adjust_contrast

Adjust image contrast.

adjust_hue

Adjust hue of an image.

adjust_lighting

AlexNet-style PCA jitter.

adjust_sharpness

Adjust image sharpness.

auto_contrast

Auto adjust image contrast.

clahe

Use CLAHE method to process the image.

imdenormalize

imequalize

Equalize the image histogram.

iminvert

Invert (negate) an image.

imnormalize

Normalize an image with mean and std.

lut_transform

Transform array by look-up table.

posterize

Posterize an image (reduce the number of bits for each color channel)

solarize

Solarize an image (invert all pixel values above a threshold)

Miscellaneous

tensor2imgs

Convert tensor to 3-channel images or 1-channel gray images.

Read the Docs v: 2.x
Versions
master
latest
2.x
1.x
v1.7.0
v1.6.2
v1.6.1
v1.6.0
v1.5.3
v1.5.2_a
v1.5.1
v1.5.0
v1.4.8
v1.4.7
v1.4.6
v1.4.5
v1.4.4
v1.4.3
v1.4.2
v1.4.1
v1.4.0
v1.3.18
v1.3.17
v1.3.16
v1.3.15
v1.3.14
v1.3.13
v1.3.12
v1.3.11
v1.3.10
v1.3.9
v1.3.8
v1.3.7
v1.3.6
v1.3.5
v1.3.4
v1.3.3
v1.3.2
v1.3.1
v1.3.0
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.