This class implements a layer which resizes a set of two-dimensional multi-channel images.
// The side of the image that will be added to or deleted from
enum TImageSide {
IS_Left = 0, // left
IS_Right, // right
IS_Top, // top
IS_Bottom, // bottom
IS_Count,
};
void SetDelta( TImageSide side, int delta );
Specifies the difference between the original and the resized image. If the difference is negative, the corresponding amount of columns or rows will be deleted from the specified side of the image. If the difference is greater than 0, the columns or rows will be added.
The default value is 0
: the image will not be resized.
void SetDefalutValue( float value );
Sets the value with which new pixels will be filled. The default is 0
.
The layer has no trainable parameters.
The single input accepts a blob with a set of images, of the dimensions:
BatchLength * BatchWidth * ListSize
- the number of imagesHeight
- the images' heightWidth
- the images' widthDepth * Channels
- the number of channels the image format uses
The single output contains a blob with the resized images. Its dimensions will be:
BatchLength
,BatchWidth
,ListSize
,Depth
, andChannels
are equal to the input dimensions.Height
is equal toHeight + GetDelta( IS_Top ) + GetDelta( IS_Bottom )
calculated from the inputHeight
.Width
is equal toWidth + GetDelta( IS_Left ) + GetDelta( IS_Right )
calculated from the inputWidth
.