Back to FabImage Library website
You are here: Start » Function Reference » Profile » Profile Metrics » ProfileCorrelation

ProfileCorrelation
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | FoundationPro |
Computes the correlation between two sub-profiles.
Syntax
C++
C#
void fil::ProfileCorrelation ( const fil::Profile& inProfile1, int inStart1, const fil::Profile& inProfile2, int inStart2, ftl::Optional<int> inLength, float& outCorrelation, ftl::Optional<float&> outCovariance = ftl::NIL, fil::Profile& diagProfile1, fil::Profile& diagProfile2 )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() |
inProfile1 | const Profile& | First input profile | ||
![]() |
inStart1 | int | 0 - ![]() |
Start of the first sub-profile of interest | |
![]() |
inProfile2 | const Profile& | Second input profile | ||
![]() |
inStart2 | int | 0 - ![]() |
Start of the second sub-profile of interest | |
![]() |
inLength | Optional<int> | 0 - ![]() |
NIL | Length of the sub-profiles of interest |
![]() |
outCorrelation | float& | Pearson correlation coefficient | ||
![]() |
outCovariance | Optional<float&> | NIL | ||
![]() |
diagProfile1 | Profile& | First sub-profile of interest | ||
![]() |
diagProfile2 | Profile& | Second sub-profile of interest |
Optional Outputs
The computation of following outputs can be switched off by passing value ftl::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. |