VCLib Documentation  6.12.2

Test Pattern Generators

Test Pattern Generators

Functions

void impulse (image *src, U32 value)
 Set only the Center Pixel to a Value and the Rest to 0. More...
 
void TestPattern1 (image *a)
 Draws a Test Pattern. More...
 
I32 TestPattern2 (image *a)
 Draws a Test Pattern. More...
 
I32 BayerTest (image *bayer, U32 r, U32 gr, U32 gb, U32 b)
 Set Bayer Image to a Constant Color Value. More...
 
I32 ColorBar (image *rgb, U32 amplitude, U32 saturation)
 Color Bar Test Chart. More...
 
I32 ColorGraph (image *dst, I32 y, I32 sat, I32 mode, F32 start_color)
 Color Graph Test Chart. More...
 
void ChangeValue (I32 *ParValue, I32 Min, I32 Max, I32 Step, char *text)
 Interactive Parameter Input for Integers. More...
 
void print_image (image *src)
 Prints Image Content as Hex Values to the Terminal. More...
 
void print_imgvar (image *a)
 Prints Image Variable Information to the Terminal. More...
 
void print_bits_U64 (U64 val)
 Prints out Bits and Hex Value of an U64 Variable. More...
 
void wedge (image *a)
 Test Image of grey Wedges. More...
 

Detailed Description

Functions in this group provide test images and do syntax checking

Function Documentation

◆ impulse()

void impulse ( image src,
U32  value 
)

This function sets an image of type IMAGE_GREY completely to zero except the pixel at the floored position ( src->dx/2, src->dy/2) to the color value.

◆ TestPattern1()

void TestPattern1 ( image source)

The Function draws a Test Pattern to an Image of Type IMAGE_GREY. The Test Pattern looks like this:

*      +--+--+------------------+--+--+
*      +--+--+------------------+--+--+
*      +--+--+------------------+--+--+
*      |  |  |                  |  |  |
*      |  |  |                  |  |  |
*      |  |  |        .         |  |  |
*      |  |  |                  |  |  |
*      |  |  |                  |  |  |
*      +--+--+------------------+--+--+
*      +--+--+------------------+--+--+
*      +--+--+------------------+--+--+
*  

◆ TestPattern2()

I32 TestPattern2 ( image source)

The Function draws a Test Pattern to an Image of Type IMAGE_GREY. The Test Pattern looks like this:

*    .    ....     
*                 
*      ..         
*      ..         
*                 
*    .    ....    
*    .    ....    
*    .    ....    
*    .    ....    
*  

◆ BayerTest()

I32 BayerTest ( image bayer,
U32  r,
U32  gr,
U32  gb,
U32  b 
)

The function writes a test pattern with constant color values into an image of type IMAGE_BAYER The bayer pattern is assumed to start with red:

RGr
GbB

◆ wedge()

void wedge ( image a)

This function generates horizontal by one incrementing grey values. After reaching the grey value 255 it is reset to 0.

Parameters
aImage to be filled.

◆ ColorBar()

I32 ColorBar ( image rgb,
U32  amplitude,
U32  saturation 
)

This function creates a color bar test chart with vertical bars of white, yellow, cyan, green, magenta, red, blue, black colors(from left to right). amplitude and saturation specify the values for the color bar amplitude and saturation. Allowed values range from 0 (zero amplitude, saturation) to 255 (maximum amplitude, saturation). The following tables may be helpful:

100% amplitude, 100% saturation amplitude = 255, saturation = 255

Channel White Yellow Cyan Green Magenta Red Blue Black
R 255 255 0 0 255 255 0 0
G 255 255 255 255 0 0 0 0
B 255 0 255 0 255 0 255 0
Y 255 226 179 150 105 76 29 0
Cb 128 0 171 44 212 85 255 128
Cr 128 149 0 21 235 255 107 128

75% amplitude, 75% saturation amplitude = 191, saturation = 191

Channel White Yellow Cyan Green Magenta Red Blue Black
R 191 191 47 47 191 191 47 47
G 191 191 191 191 47 47 47 47
B 191 47 191 47 191 47 191 47
Y 191 175 148 132 107 90 63 47
Cb 128 56 152 80 176 104 200 128
Cr 128 140 56 68 188 200 116 128

The image variable rgb may currently be of type IMAGE_RGB or IMAGE_CBCR444.

Returns
Standard Error Code.
See also
ColorGraph().

◆ ColorGraph()

I32 ColorGraph ( image dst,
I32  y,
I32  sat,
I32  mode,
float  start_color 
)

This function creates a color graph test chart showing all colors with constant luminance y and constant saturation sat. The colors are stored in the image described by image variable dst. They can be stored horizontally (i.e. different colors moving from left to right, but constant colors moving vertically) or vertically depending on the value of the parameter mode. A start color can be defined by start_color ranging from 0 to 2pi . Allowed values for y, sat range from 0 (zero amplitude, saturation) to 255 (maximum amplitude, saturation).

The image variable rgb may currently be of type IMAGE_RGB, IMAGE_CBCR444 or IMAGE_YUVNORM.

See also
ColorBar().
Return values
ERR_TYPEif Image Type is not IMAGE_RGB, IMAGE_CBCR444 or IMAGE_YUVNORM.

◆ ChangeValue()

void ChangeValue ( I32 ParValue,
I32  Min,
I32  Max,
I32  Step,
char *  text 
)

This function provides a method to modify a value at the terminal by using cursor keys.

Parameters
ParValuePointer to Parameter for Input.
Min,MaxMinimum and Maximum Value.
StepIncrement Steps.
textText for Output.

◆ print_image()

void print_image ( image src)

This function prints the image content as hex values to the terminal.

Parameters
srcThe Source Image.

◆ print_imgvar()

void print_imgvar ( image src)

This function prints the contents of the image variable struct to the terminal, including type, st, dx, dy, pitch, ccmp1, ccmp2.

Parameters
srcThe Source Image.

◆ print_bits_U64()

void print_bits_U64 ( U64  val)
  • This function prints out bits and hex value of an U64 variable (or other with cast).