Calculation of y-movement

<< Click to Display Table of Contents >>

Navigation:  Examples > Image processing > Color tracker >

Calculation of y-movement

Previous pageReturn to chapter overviewNext page

The Image information gives the height and width of the image. The width is used to calculate the distance of work piece (a) to the image center.

The x-coordinate of the image center is at width / 2. Thee Constant provides the divisor.

By Subtraction of the x-coordinate of work piece (a) from half the image width we get the distance of work piece (a) to the image center.

colortracker_example_transferfunction1

The Transfer function translates distance to image center in pixel to control point for the y-movement.

back to example