CPixelToImageLayer Class
June 16, 2020 ยท View on GitHub
This class implements a layer that creates a set of two-dimensional images using a set of pixel sequences with specified coordinates.
Settings
Resulting image height
void SetImageHeight( int newHeight );
Sets the height of the output images.
Resulting image width
void SetImageWidth( int newWidth );
Sets the width of the output images.
Trainable parameters
The layer has no trainable parameters.
Inputs
The layer has two inputs.
The first accepts a blob with pixel sequences, of the dimensions:
BatchLengthis equal to1BatchWidthis the number of sequences in the setListSizeis the length of each sequenceHeight,Width, andDepthare equal to1Channelsis the number of channels the pixels sequences (and the output images) use.
The second input accepts a blob with int data that contains lists of pixel coordinates, of the dimensions:
BatchWidthequals first inputBatchWidthChannelsequals first inputListSize- the other dimensions equal
1
The coordinates of a pixel (col, row) are represented in this blob by a single integer number equal to row * GetImageWidth() + col.
Outputs
The single output returns a blob of the dimensions:
BatchLengthequals1BatchWidthequals inputs'BatchWidthListSizeequals1HeightequalsGetImageHeight()WidthequalsGetImageWidth()Depthequals1Channelsequals the first inputChannels
The blob contains the set of images with the pixel sequences written into the specified coordinates. The pixels that were not given are filled with zeros.