Defining Image Protocols for an ImgIn Interface Class

You need to define the image protocols you want this ImgIn interface class to support. Define one protocol after the other until all protocols you want to specify are there.

Related Operators in VisualApplets

 

After integration of the VA IP Core into your FPGA design, the developer of the image processing application instantiates an ImgIn operator in VisualApplets and defines which of the protocols supported by the ImgIn interface (and the operator itself) is implemented by this operator instance in a given application.

   
  1. Click on the arrow in column Format and select the format of your choice from the format list:

Find more detailed description on the supported image formats in Supported Image Formats.

  1. Double-click on the field in column Pix.Width.

Enter the required pixel data bit width (value range: [1..64]).

The pixel data width is limited to 64 bit. The pixel data width for all non-gray color formats must be a multiple of 3 and is limited to 63 bit.

  1. Double-click on the field in column Parall. Enter the required parallelism.

The parallelism P defines the number of pixels which are contained in a single data word at the interface port. It must be chosen from the following set of allowed values: P = {1, 2, 4, 8, 16, 32, 64}. Packing of image data into words of a given interface width N (Port width, see above) must follow certain rules:

  • The data of all P pixels must fit in a single word of length N. The data is stored LSB aligned which means that for a pixel width Z (Z=X for grey, Z=Y for color) data is distributed as follows: Pixel[0]->Bits[0..Z-1] .. Pixel[P-1]->Bits[(P-1)*Z..P*Z-1].
  • For RGB images the three color components are packed LSB aligned into a sub word [0..Y-1] in the following order: red uses the bits [0..Y/3-1 ], green the bits [Y/3..2*Y/3-1] and blue the bits [2*Y/3..3*Y/3-1].
  • For HSI color images the same rules than for RGB applies where H takes the role of red, S that of green and I the role of blue.
  • For HSL color images the same rules than for RGB applies where H takes the role of red, S that of green and L the role of blue.
  • For HSV color images the same rules than for RGB applies where H takes the role of red, S that of green and V the role of blue.
  • For YUV color images the same rules than for RGB applies where Y takes the role of red, U that of green and V the role of blue.
  • For YCrCb color images the same rules than for RGB applies where Y takes the role of red, Cr that of green and Cb the role of blue.
  • For LAB color images the same rules than for RGB applies where L takes the role of red, A that of green and B the role of blue.
  • For XYZ color images the same rules than for RGB applies where X takes the role of red, Y that of green and Z the role of blue.
  1. Click on the arrow in column Dimension to select the image dimension of the protocol you are defining.

The meaning of the dimension is as follows:

  • Area (default): The image is structured by end-of-line and end-of-frame markers. In VisualApplets, image dimension Area is named “2D”. An area camera could be an 2-D image source.
  • Line: The image is structured by end-of-line markers. There are no end-of-frame markers which divide the incoming lines into frames. In VisualApplets, image dimension Line is named “1D”. A line camera could be an 1-D image source.
  • Raw: There are no end-of-line and no end-of-frame markers which divide the incoming image data into lines and frames. The image-in stream consists of an endless pixel stream with a width of 1 pixel. In VisualApplets, image dimension Raw is named “0D”.
  1. Click on the arrow in column Signedness and select the image dimension of the protocol you are defining.

  • Unsigned (default): Pixel data are interpreted as unsigned pixel components.
  • Signed: Pixel data are interpreted as signed pixel components
  1. Repeat steps 1 - 5 until you have defined all image protocols you want the image class to support.

Internal ID for Image Protocol Definitions

 

Implicitly it is assumed that the kernel size is 1x1. Each listed protocol is numbered, the list starts from zero. These numbers form the protocol IDs for a given ImgIn class. The ID is not displayed on the GUI. Thus, each ImgIn class you define has an internal ID list of the image protocols you define.

In one of the next steps, you can define one or more VisualApplets ImgIn operators the instances of which can connect to the defined ImgIn class (details how to define operators you find in Defining Hardware-Specific Operators). To each of these operators you can assign all or a subset of the image protocols you specified for the concerning image port.

In VisualApplets, the ImgIn operator will provide a parameter where the VisualApplets user can select an image format from a list of options. According to the selection, the corresponding ID will be assigned to the related IP core ImgIn port (ov..FID_D). This enables the attached glue logic to adapt its behavior according to the selected format.