Image Action Set

Example 13.40 Applying a Threshold Using the processImages Action

Applying a Threshold Using the processImages Action

This example is not available for the CAS language.

Applying a Threshold Using the processImages Action

This example is not available for the Lua programming language.

Applying a Threshold Using the processImages Action

The following Python code uses the THRESHOLD function in the processImages action and the TO_ZERO method to convert pixel values that are below the threshold value to black pixels of all images in the imgs input table and writes the resulting images into the imgsOut output table. This code assumes that the imgs table is loaded in advance.

s.image.processImages(
    casout={'name':'imgsOut'},
    imagefunctions=[
        {'options':{
            'functiontype':'THRESHOLD',
            'type':'TO_ZERO',
            'value':80
        }}
    ],
    table={'name':'imgs'}
)

Figure 13.29 shows the original image, and Figure 13.30 shows the processed image.

Figure 29: Original Image

Original Image


Figure 30: Processed Image

Processed Image


Applying a Threshold Using the processImages Action

This example is not available for the R programming language.

Last updated: June 07, 2018