jacinle.image.imgproc#

Classes

Functions

brightness(img, alpha)

center_crop(img, target_shape)

center crop

clip(img)

clip_decorator(func)

contrast(img, alpha)

crop(image, l, t, w, h[, extra_crop])

dimshuffle(img, shuffle_type)

grayscale(img)

leftup_crop(img, target_shape)

left-up crop

resize(img, size[, interpolation])

resize_minmax(img, min_dim[, max_dim, ...])

resize_scale(img, scale[, interpolation])

resize_scale_wh(img, scale_wh[, interpolation])

resize_wh(img, size_wh[, interpolation])

saturation(img, alpha)

Class ShuffleType

class ShuffleType[source]#

Bases: JacEnum

__new__(value)#
classmethod assert_valid(value)#

Assert if the value is a valid choice.

classmethod choice_names()#

Returns the list of the name of all possible choices.

classmethod choice_objs()#

Returns the list of the object of all possible choices.

classmethod choice_values()#

Returns the list of the value of all possible choices.

classmethod from_string(value)#
Parameters:

value (str | JacEnum)

Return type:

JacEnum

classmethod is_valid(value)#

Check if the value is a valid choice.

classmethod type_name()#

Return the type name of the enum.

CHANNEL_FIRST = 'channel_first'#
CHANNEL_LAST = 'channel_last'#

Functions

brightness(img, alpha)[source]#
center_crop(img, target_shape)[source]#

center crop

clip(img)[source]#
clip_decorator(func)[source]#
contrast(img, alpha)[source]#
crop(image, l, t, w, h, extra_crop=None)[source]#
dimshuffle(img, shuffle_type)[source]#
grayscale(img)[source]#
leftup_crop(img, target_shape)[source]#

left-up crop

resize(img, size, interpolation='LINEAR')[source]#
resize_minmax(img, min_dim, max_dim=None, interpolation='LINEAR')[source]#
resize_scale(img, scale, interpolation='LINEAR')[source]#
resize_scale_wh(img, scale_wh, interpolation='LINEAR')[source]#
resize_wh(img, size_wh, interpolation='LINEAR')[source]#
saturation(img, alpha)[source]#