Rate This Document
Findability
Accuracy
Completeness
Readability

MorphSetMode

Sets the mask processing mode for advanced morphological operations.

The function interface declaration is as follows:

HmppResult HMPPI_MorphSetMode(int32_t mode, HmppiMorphAdvPolicy* policy);

Parameters

Parameter

Description

Value Range

Input/Output

mode

Mask processing mode

Possible values are:

  • 0: Sets the pixel threshold greater than 0 before the second black-hat or top-hat operation.
  • 1: Does not invert the mask.
  • 4: Does not set a threshold for the black-hat or top-hat operation.

Input

policy

Pointer to the HmppiMorphAdvPolicy structure

The value cannot be NULL.

Input/Output

Return Value

  • Success: HMPP_STS_NO_ERR
  • Failure: An error code is returned.

Error Codes

Error Code

Description

HMPP_STS_NULL_PTR_ERR

Any of the specified pointers is NULL.

HMPP_STS_NOT_SUPPORTED_MODE_ERR

The value of mode is not 0, 1, or 4.