IC Imaging Control ActiveX

Rotate Flip Filter

Rotate Flip Filter

The Rotate Flip filter allows image data to be flipped and rotated in steps of 90 degrees.

Using the Rotate Flip Filter

The Rotate Flip filter is loaded by an application using the following code:

Dim RotateFlipFilter As FrameFilter
Set RotateFlipFilter = ICImagingControl1.FrameFilterCreateString("Rotate Flip", "stdfilters.ftf")

Parameters

The part of the image that is copied to the destination frame is determined by four filter parameters:

Rotation Angle
This parameter sets the rotation angle.
Available angles are:
  • 90°
  • 180°
  • 270°
Please note that this parameter can only be changed in steps of 180° when live mode is running. Otherwise, the changes would alter the output video format.
Flip V
This parameter determines whether the image should be flipped vertically. As it is a boolean parameter, valid values are true and false. The setting of the flip parameters does not cause a video format change. Thus, they can be set regardless of whether the live video is running or not.
Flip H
This parameter determines whether the image should be flipped horizontally. As it is a boolean parameter, valid values are true and false. The setting of the flip parameters does not cause a video format change. Thus, they can be set regardless of whether the live video is running or not.

Property Dialog

The rotation angle and flipping modes can be specified in the filter's property dialog:

image

Programmatically Access the Parameters

If the parameters should be set by an application, following source code can be used:

Dim angle As Long
Dim newAngle As Long
Dim flipVertical As Boolean
Dim flipHorizontal As Boolean

' Retrieve the current parameter settings:
angle = RotateFlipFilter.Parameter("Rotation Angle")
flipVertical = RotateFlipFilter.Parameter("Flip V")
flipHorizontal = RotateFlipFilter.Parameter("Flip H")

' Change the parameters.
newAngle = 90 ' Only the values 0, 90, 180, 270 are allowed.


' If the rotation value is 90 or 270, then the resulting video format
' is changed. Thus, the new value can only be set while the live video is
' stopped. Otherwise, an error is returned.
If Abs(angle - newAngle) = 90 Or Abs(angle - newAngle) = 270 Then
    If Not ICImagingControl1.LiveVideoRunning Then
        RotateFlipFilter.Parameter("Rotation Angle") = newAngle
    End If
Else
    RotateFlipFilter.Parameter("Rotation Angle") = newAngle
End If

' The flip parameters do not cause a video format change, so they can be
' set regardless of whether the live video is running.
flipVertical = True
flipHorizontal = True
RotateFlipFilter.Parameter("Flip V") = flipVertical
RotateFlipFilter.Parameter("Flip H") = flipHorizontal

<< IC Imaging Control Standard Filters

Get in touch with us


About The Imaging Source

Established in 1990, The Imaging Source is one of the leading manufacturers of industrial cameras, frame grabbers and video converters for production automation, quality assurance, logistics, medicine, science and security.

Our comprehensive range of cameras with USB 3.1, USB 3.0, USB 2.0, GigE interfaces and other innovative machine vision products are renowned for their high quality and ability to meet the performance requirements of demanding applications.

Automated Imaging Association ISO 9001:2015 certified

Contact us