Struct representing parameters for DataConditioner.
Definition at line 44 of file DataConditioner.h.
Data Fields | |
float32_t | meanValue [DW_MAX_IMAGE_PLANES] |
Mean value to be subtracted. Range [0, 255]. Default is 0. More... | |
float32_t | stdev [DW_MAX_IMAGE_PLANES] |
Standard deviation with range [0, 255]. More... | |
const dwImageCUDA * | meanImage |
Mean image to be subtracted. More... | |
bool | splitPlanes |
Boolean indicating whether planes should be split. Default is true. More... | |
float32_t | scaleCoefficient |
Scale pixel intensities. Default is 1.0. More... | |
bool | ignoreAspectRatio |
Boolean indicating whether the aspect ratio of the input image should be kept (false) or the image should be stretched to the roi specified (true). More... | |
bool | doPerPlaneMeanNormalization |
Boolean indicating whether to perform per-plane mean normalization. Default false. More... | |
uint32_t | channelIdx [DW_MAX_IMAGE_PLANES] |
Index of each channel determining the channel order. channelIdx[x] = y means that the calculation on channel x will write to output channel y. More... | |
bool | convertToGray |
Boolean to decide whether to convert pixels to gray before computing tensor. More... | |
uint32_t dwDataConditionerParams::channelIdx[DW_MAX_IMAGE_PLANES] |
Index of each channel determining the channel order. channelIdx[x] = y means that the calculation on channel x will write to output channel y.
Definition at line 72 of file DataConditioner.h.
bool dwDataConditionerParams::convertToGray |
Boolean to decide whether to convert pixels to gray before computing tensor.
Definition at line 74 of file DataConditioner.h.
bool dwDataConditionerParams::doPerPlaneMeanNormalization |
Boolean indicating whether to perform per-plane mean normalization. Default false.
Definition at line 70 of file DataConditioner.h.
bool dwDataConditionerParams::ignoreAspectRatio |
Boolean indicating whether the aspect ratio of the input image should be kept (false) or the image should be stretched to the roi specified (true).
Default false
Definition at line 68 of file DataConditioner.h.
const dwImageCUDA* dwDataConditionerParams::meanImage |
Mean image to be subtracted.
Default is nullptr. Mean image is expected to be float16 or float32. The pixel format is required to be R or RGBA with interleaved channels. The dimensions of the mean image must meet the dimensions of network input. Pixel range: [0, 255]. Default is nullptr.
Definition at line 61 of file DataConditioner.h.
float32_t dwDataConditionerParams::meanValue[DW_MAX_IMAGE_PLANES] |
Mean value to be subtracted. Range [0, 255]. Default is 0.
Definition at line 47 of file DataConditioner.h.
float32_t dwDataConditionerParams::scaleCoefficient |
Scale pixel intensities. Default is 1.0.
Definition at line 65 of file DataConditioner.h.
bool dwDataConditionerParams::splitPlanes |
Boolean indicating whether planes should be split. Default is true.
Definition at line 63 of file DataConditioner.h.
float32_t dwDataConditionerParams::stdev[DW_MAX_IMAGE_PLANES] |
Standard deviation with range [0, 255].
Default is 1.0. The results are computed using the following formula, where R, G and B are from the input image and have range of [0, 255] meanImage is optional and is 0 if it is not set perPlaneMeanX is the mean per plane for that channel and is optional and 0 if it is not set R' = ((R - meanValue[0] - meanImage[pixelIndex] - perPlaneMeanR) / stdev[0]) * scaleCoefficient G' = ((G - meanValue[1] - meanImage[pixelIndex] - perPlaneMeanG) / stdev[1]) * scaleCoefficient B' = ((B - meanValue[2] - meanImage[pixelIndex] - perPlaneMeanB) / stdev[2]) * scaleCoefficient
Definition at line 56 of file DataConditioner.h.