Back to Aurora Vision Library website

You are here: Start » Function Reference » Profile » Profile Local Transforms » ConvolveProfile

ConvolveProfile


Header: AVL.h
Namespace: avl
Module: FoundationPro

Applies a user-defined convolution to a profile.

Syntax

C++
C#
 
void avl::ConvolveProfile
(
	const avl::Profile& inProfile,
	atl::Optional<const avl::Range&> inRange,
	const atl::Array<float>& inMask,
	bool inNormalizeMaskValues,
	atl::Optional<int> inMaskOrigin,
	avl::Profile& outProfile
)

Parameters

Name Type Default Description
Input value inProfile const Profile& Profile to be processed
Input value inRange Optional<const Range&> NIL
Input value inMask const Array<float>& Convolution kernel mask that will be applied to the profile
Input value inNormalizeMaskValues bool False If set to true, the kernel mask will be normalized so that its values sum up to one
Input value inMaskOrigin Optional<int> NIL Index of the kernel mask element that will be aligned against the profile values
Output value outProfile Profile& Output profile

Description

The operation computes each value as a convolution of inProfile and inMask values. Values which mask exceeds profile dimension are set to zero.

Errors

List of possible exceptions:

Error type Description
DomainError Convolution mask is empty in ConvolveProfile.
DomainError Mask origin exceeds dimensions of convolution mask in ConvolveProfile.
DomainError Normalization of kernel mask which values add up to zero was requested in ConvolveProfile.
DomainError Range exceeds the input profile in ConvolveProfile.