Image Action Set
Normalizing Images Using the processImages Action
This example is not available for the CAS programming language.
Normalizing Images Using the processImages Action
This example is not available for the Lua programming language.
Normalizing Images Using the processImages 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 NORMALIZE function in the processImages action and the MINMAX method to normalize the pixel values of all images in the imgs input table to [50,200] (by default, pixel values range from 0 to 255) and writes the resulting images into the imgsOut output table. This code assumes the imgs table is loaded in advance.
s.image.processImages(
casout={'name':'imgsOut'},
imagefunctions=[
{'options':{
'functiontype':'NORMALIZE',
'type':'MINMAX',
'alpha':50,
'beta':200
}}
],
table={'name':'imgs'}
)
Figure 39 shows the original image, and Figure 40 shows the processed image.
Figure 39: Original Image

Figure 40: Processed Image

Normalizing Images Using the processImages Action
This example is not available for the R programming language.