An arithmetic transform changes the value of an image pixel and it is applied point to point, whereas a geometrical transform changes the position of the image pixels. Thus, points in an image get a new position in the output image without changing their intensity values. Examples of arithmetic transforms may be addition, subtraction, and division between images. Examples of geometrical transforms are scaling, translation, and rotation of images. More complex transformations are to solve the barrel and cushion deformations of an image produced by an optical lens.
In OpenCV, there are several functions to perform arithmetic and geometrical transforms. Here we show two examples for image addition and perspective transformation by means of the functions addWeighted
and warpPerspective
respectively.