VECTOR_INNER_PRODUCT_CVIP

vector_inner_product_cvip() - calculates the normalized vector inner product similarity metric between two feature vectors

Contents

SYNTAX

d =  vector_inner_product_cvip( vector1, vector2)

Input Parameters include :

Output Parameter include :

DESCRIPTION

This function calculates the normalized vector inner product between the two input feature vector. The vector inner product is a similarity measure used to assess the amount of similarity between two feature vectors.

The vector inner product is defined for vectors x and y as:

$$x \cdot y = \frac{\sum_{i=1}^n x_i y_i}{\big ( \sum_{i=1}^n x_i^2 \big)^{1/2} \cdot \big( \sum_{i=1}^n y_i^2 \big)^{1/2}} $$

REFERENCE

1. Scott E Umbaugh. DIGITAL IMAGE PROCESSING AND ANALYSIS: Applications with MATLAB and CVIPtools, 3rd Edition.

EXAMPLE

% Input vectors

 vector1 = [1 3 4 2];

 vector2 = [-3 3.2 sqrt(2) pi];

% calling function

 d =  vector_inner_product_cvip( vector1, vector2)
d =

    0.6069

CREDITS

Author: Mehrdad Alvandipour, March 2017
Copyright © 2017-2018 Scott E Umbaugh
For updates visit CVIP Toolbox Website