Flip - Maple Help

ImageTools

 Flip
 flip an image horizontally or vertically

 Calling Sequence Flip( img, dir, opts )

Parameters

 img - Image; input image dir - name; one of horizontal or vertical, direction of the flip opts - (optional) equation(s) of the form option = value; specify options for the Flip command

Options

 • inplace = truefalse
 Specifies whether the operation is performed in-place. This can be used to avoid allocating memory. The inplace option cannot be used with the output option. The default is false.
 • output = Image
 Specifies a data structure into which the output is written. This can be used to avoid allocating memory. The size and number of layers must match that of the input. The dimensions of the output image are adjusted so that the row and column indices match the input. The default is NULL.

Description

 • The Flip command flips an image either horizontally or vertically.
 • The img parameter specifies the image.
 • The dir parameter specifies the direction of the flip. Two directions are supported: horizontal and vertical. A horizontal flip exchanges the columns of the image so that those originally on the left are now on the right, and vice-versa. A vertical flip exchanges the rows of the image so that those originally on the top are now on the bottom, and vice-versa.
 • Row and column indices are preserved.

Examples

 > $\mathrm{with}\left(\mathrm{ImageTools}\right):$
 > $\mathrm{img}≔\mathrm{Create}\left(100,200,\left(r,c\right)→{ⅇ}^{-\frac{r+c}{200.}}\right):$
 > $\mathrm{Embed}\left(\mathrm{img}\right)$

 > $\mathrm{i_h}≔\mathrm{Flip}\left(\mathrm{img},\mathrm{horizontal}\right):$
 > $\mathrm{i_v}≔\mathrm{Flip}\left(\mathrm{img},\mathrm{vertical}\right):$
 > $\mathrm{Embed}\left(\left[\mathrm{i_h},\mathrm{i_v}\right]\right)$