5
IP image
processing macros
This chapter introduces and provides reference pages for the IP image processing macros provided as part of the Data Visualization Kit.
5.1 Introduction
The AVS/Express Image Processing Kit provides objects that perform common image processing functions.
5.1.1 ip_Image data format
To use the IP objects of any data type the data must be in ip_Image format. ip_Image is defined in v/ip_pkg.v.
5.1.2 ip_Roi data format
To use region of interest (ROI) objects with IP objects, data must be in ip_Roi format. ip_Roi is defined in v/ip_pkg.v.
5.1.3 Format conversion
Various macros are provided that convert data between AVS/Express Field format and ip_Image and ip_Roi formats:
- IPfldToImage - Converts from Field format to ip_Image format.
- IPfldtoROI - Converts from Field format to ip_Roi format.
- IPread_AVS_Image - Reads an AVS image (suffix .x) from disk and converts it to an ip_Image.
- IPimageToFld - Converts an ip_Image into two outputs: a Field that can be further processed; and a DataObject that can be sent directly to a renderer.
- IPimageToROI - Converts an ip_Image to an ip_Roi
5.1.4 Viewing images in a renderer
To view the output of one of the IP image processing macros, you have a choice between two dimensional and three dimensional rendering.
All renderers can be found under Libraries.Main.Viewers.
5.1.4.1 2D cameras
A two dimensional rendering means that the image is displayed as an X pixmap in a 2D camera. You can translate and scale the image, but you cannot rotate it in the (nonexistent) Z plane.
Viewer2D
SimpleViewer2D
Viewer use the objs_2d_in input port
SimpleViewer use the objs_2d_in input port5.1.4.2 3D cameras
A three dimensional rendering means that the image is displayed as a mesh in a 3D camera. You can translate, scale, and rotate the image in X, Y, and Z. Note that rendering an image as a mesh is slower than rendering it in a 2D camera as an X pixmap.
Viewer3D
SimpleViewer3D
Viewer use the objs_3d_in input port
SimpleViewer use the objs_3d_in input port5.1.4.3 To see an image
Before transforming (moving, scaling) an image, you should first select:
Viewer ObjEditors-->Object
SimpleViewer Editors-->ObjectThen press Reset, Normalize, and Center on the Object Editor panel. Reset resets the input to its orginal position. Normalize makes the image fill the view. Center sets the center of transformations performed on the object to the center of its extents instead of its lower left hand corner.
5.1.5 Network Editor locations
The IP image processing macros are located in these paths in the Network Editor:
IP macros with user interfaces
- Libraries.Accessories.Utility_Modules.Imaging
Libraries.Imaging.ModulesFormat conversion macros
- Libraries.Accessories.Utility_Modules.Imaging
Libraries.Imaging.ConvertorsBase modules and definitions
- Libraries.Imaging.User_Interface
Libraries.Imaging.Base_Types
Libraries.Imaging.Base_Functions5.1.6 V locations
The Image Processing Kit objects are defined in these V files:
- IP macros with user interfaces.
- IP base modules and data object definitions.