Image Action Set

Mutate without Creating a Patch Using the augmentImages Action

This example is not available for the CAS programming language.

Mutate without Creating a Patch Using the augmentImages Action

This example is not available for the Lua programming language.

Mutate without Creating a Patch Using the augmentImages Action

This section contains Python code. For more information about coding in Python, see Getting Started with SAS Viya for Python and SAS Viya: System Programming Guide.

The following Python code uses the augmentImages action to mutate the original image without creating any patches from it:

s.image.augmentImages(
    casout={'name':'imgsOut'},
    croplist=[
        {
            'usewholeimage':True,
            'mutations':{
                'verticalflip':True,
                'sharpen':True,
                'colorjittering':True,
                'rotateright':{
                    'type':'ANGLE_CONSTANT'
                    'angle':15
                },
                'invertpixels':True,
                'lighten':{
                    'type':'GAMMA_CONSTANT',
                    'gamma':100
                },
                'pyramidup':True,
                'pyramiddown':True,
                'rotateleft':{
                    'type':'ANGLE_CONSTANT'
                    'angle':15
                },
                'colorshifting':True,
                'horizontalflip':True,
                'darken':{
                    'type':'GAMMA_CONSTANT',
                    'gamma':0.001
                },
            }
        }
    ],
    table={'name':'imgs'}
)
Mutate without Creating a Patch Using the augmentImages Action

This example is not available for the R programming language.

Last updated: September 15, 2022