PadType

Padding types are used in the image processing functions.

class sasviya.cv.cvenums.PadType
PAD_CONSTANT

Pads the image by using a specified constant value. For example, if the border pixel values are [abcdefgh], and the specified constant value is x, the padding looks like [xxxxxx|abcdefgh|xxxxxx].

PAD_REFLECT

Pads the image by mirroring the edge pixels. For example, if the border pixel values are [abcdefgh], the padding looks like [fedcba|abcdefgh|hgfedc].

PAD_REFLECT101

Pads the image by mirroring its border pixels without repeating the last pixel. For example, if the border pixel values are [abcdefgh], the padding looks like [gfedcb|abcdefgh|gfedcb].

PAD_REPLICATE

Pads the image by replicating the pixel values from the edge. For example, if the border pixel values are [abcdefgh], the padding looks like [aaaaaa|abcdefgh|hhhhhhh].

PAD_WRAP

Pads the image by wrapping around its border pixels, such that the pixels from the opposite edge are used to fill the padding. For example, if the border pixel values are [abcdefgh], the padding looks like [cdefgh|abcdefgh|abcdef].

Last updated: August 12, 2026