Back to Aurora Vision Library website

You are here: Start » Function Reference » Profile » Profile Metrics » ProfileCorrelation

ProfileCorrelation


Header: AVL.h
Namespace: avl
Module: FoundationPro

Computes the correlation between two sub-profiles.

Syntax

C++
C#
 
void avl::ProfileCorrelation
(
	const avl::Profile& inProfile1,
	int inStart1,
	const avl::Profile& inProfile2,
	int inStart2,
	atl::Optional<int> inLength,
	float& outCorrelation,
	atl::Optional<float&> outCovariance = atl::NIL,
	avl::Profile& diagProfile1,
	avl::Profile& diagProfile2
)

Parameters

Name Type Range Default Description
Input value inProfile1 const Profile& First input profile
Input value inStart1 int 0 - Start of the first sub-profile of interest
Input value inProfile2 const Profile& Second input profile
Input value inStart2 int 0 - Start of the second sub-profile of interest
Input value inLength Optional<int> 0 - NIL Length of the sub-profiles of interest
Output value outCorrelation float& Pearson correlation coefficient
Output value outCovariance Optional<float&> NIL
Diagnostic input diagProfile1 Profile& First sub-profile of interest
Diagnostic input diagProfile2 Profile& Second sub-profile of interest

Optional Outputs

The computation of following outputs can be switched off by passing value atl::NIL to these parameters: outCovariance.

Read more about Optional Outputs.

Hardware Acceleration

This operation is optimized for AVX2 technology.

This operation is optimized for NEON technology.

Errors

List of possible exceptions:

Error type Description
DomainError At least two element sub-profiles are required in ProfileCorrelation.
DomainError Empty profiles on input in ProfileCorrelation.
DomainError First sub-profile is out of range in ProfileCorrelation.
DomainError Second sub-profile is out of range in ProfileCorrelation.