OriginLab Corporation - Scientific Graphing and Data Analysis Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis

imgFlip

Contents

Menu Information

Flip

Brief Information

Flip the image horizontally or vertically

Command Line Usage

1. imgFlip d:=horizontal;

2. imgFlip d:=vertical img:=mat(1) oimg:=mat(2);

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Direction d

Input

int

horizontal

Specifies whether to flip the image horizontally or vertically.

Option list

  • horizontal:Horizontal
Flips the image horizontally.
  • vertical:Vertical
Flips the image vertically.
Input Matrix img

Input

Image

<active>

Specifies the image to be manipulated. The default input is the active image.

Output Image oimg

Output

Image

<input>

Specifies the output image. By default, the output image is the same as the input image.

See the syntax here.

Description

This function flips a specified image either horizontally or vertically.

Examples

In this example, we use the imgFlip function to flip the input image horizontally:

  1. Create a new matrix and import car.bmp under \Samples\Image Processing and Analysis folder into it.
  2. When the input image is active, select Image: Geometric Transform: Flip: Horizontal Flip.

A new image is created. As you can see, the image have been flipped horizontally.

Image:imgFlip_help_English_files_image002.jpg
Image:imgFlip_help_English_files_image004.jpg
The original image
The output image


Algorithm

The computation uses L_FlipBitmap() and L_ReverseBitmap() function from LEADTOOLS Main API. Please refer to the LEADTOOLS Main API Help file, Version 14 and read the L_FlipBitmap and L_ReverseBitmap topics.

References

LEADTOOLS Main API Help file, Version 14

Related X-Functions

imgRotate