Coordinate System

<< Click to Display Table of Contents >>

Navigation:  Image Manager > CVB Technology > Common Image Model >

Coordinate System

 

Coordinate System

Normally the coordinate system of an image is fixed by the image itself. The origin is at the top left corner.
The x axis extends along the top of the image, and the y axis extends down the left side.
The unit of measure is one pixel.

 

In many applications a flexible coordinate system can be a helpful tool.
The coordinate system in CVB consists of the origin and a matrix defining the linear transformation of the image.

A linear transformation can be described by a matrix A where:

 

AppendixF2

 

The matrix A acts on any vector according to the equation:

A<x, y> = <x', y'> = <x*a11 + y*a12, x*a21 + y*a22>

Since each pixel in an image can be considered as a vector <x, y>, the matrix A acts on each pixel according to equation I, thus accomplishing linear transformation.

 

For example, the matrix A defined below acts on an image by doubling its height and doubling its width (a scaling factor of two).

 

AppendixF3

 

So, any pixel <x,y> in the image is transformed into the pixel <x', y'> where, by equation I:

<x', y'> = <x*2 + y*0, x*0 + y*2> = <2x, 2y>

Consider the pixel <50, 80>: A<50, 80> = <2*50, 2*80>

The unit of measure becomes 1/2 pixel rather than one, thus increasing the virtual size of the image to 200% of its actual size.

 

There is no need for an application to support the coordinate system but it is often nice to have such a tool.

This calculates the position of a point P (without CS) to a position in the image CS system:

P' = P * CS + Origin