Linear algebra
Computer vision tools and techniques are highly dependent on linear algebraic operations. We will use see an explanation of basic to advanced operations that are required in developing CV applications.
Vectors
In a 2D plane, vectors are denoted as a point

.
In this case, the magnitude of p
is denoted as

and is given by the following:

In Python, a vector is denoted by a one-dimensional array, as follows:
p = [1, 2, 3]
Here, the common properties required are length of the vector and magnitude of the vector, which is given as follows:
print(len(p)) >>> 3
Common vector operations are as follows:
- Addition
- Subtraction
- Vector multiplication
- Vector norm
- Orthogonality
Addition
Let's say there are two vectors denoted as follows:
v1 = np.array([2, 3, 4, 5]) v2 = np.array([4, 5, 6, 7])
The resulting vector is the element-wise sum, as follows:
print(v1 + v2) >>> array([ 6, 8, 10, 12])
Subtraction
Subtraction is similar to addition; instead of the element-wise sum, we compute the element...