Introduction to the Common Vision Image OCX

<< Click to Display Table of Contents >>

Navigation:  Image Manager > Image Manager API > ActiveX Controls > Image Control >

Introduction to the Common Vision Image OCX

 

The Common Vision Image Control provides a simple way of integrating images in your own applications.

When the Common Vision Image Control has been included in the project a CV Image control can be inserted in your own application using the following icon :

 

CVimage_32x32

 

The Common Vision Image Control is used for opening and saving image files as well as for checking the image properties.

An image file can be addressed using the Filename property or with the LoadImageByDialog and LoadImageByUSerDialog methods.

The following image formats are supported:

 

1.Windows bitmap (*.bmp): 256 gray scale and True Color formats.

2.Common Vision Blox image object (*.mio): 256 gray scale values, high bit image data, True Color format images in any dimension including information on the coordinate system.

3.Driver files (*.vin): Common Vision Blox driver files.

4.Other file formats are read with the aid of CVCFile.DLL which again accesses the ImageGear library from Accusoft. The following additional file formats are supported at present:

TIF

TGA

PCX

JPG

vbfiledemo1

When an attribute has changed, the image is loaded and the image properties, such as its size and dimension, are ascertained.

An image can be accessed directly by means of the Image property .

The Common Vision Display Control is normally used for display purposes.

 

The assignment CVDisplay.Image = CVImage.Image displays the image.

Filename and Image can be set during development and later at runtime.

All remaining properties of the Control are write-protected and serve only to provide the image information.

 

The SerialNumber property is a special attribute used in querying the serial number of the Common Vision Box protection device.

In addition, the Control allows an AOI to be saved and the coordinate system of the image to be changed.

This can be done both when the application program is designed and at runtime.

The coordinate system can be scaled and rotated independently in the x and y directions.

 

Another capability of the Image control is to acquire live images.

In this process the control uses the CVCDriver and CVCAcq libraries.

Live images are acquired in a separate thread.

The Control triggers the ImageSnaped event for every new image.

Within this event, the image is then processed and the display may be refreshed.

 

You can set all properties by means of the Properties dialog.

You can also make the settings in the Properties window of the Common Vision Image Control .

 

imageocx1

The General tab contains the general options for the Image Control, like determining the Image Filename.

 

imageocx2

The Set Area and Origin tab contains special options for the Image Control defining the image origin and the Area of interest.

 

Changes are passed to control by means of the Apply button.

 

 

Related Topics

 

Image file handling (load and save)

File formats