Please provide the following info (check/uncheck the boxes after creating this topic):
Software Version
DRIVE OS Linux 5.2.6
DRIVE OS Linux 5.2.6 and DriveWorks 4.0
DRIVE OS Linux 5.2.0
DRIVE OS Linux 5.2.0 and DriveWorks 3.5
NVIDIA DRIVE™ Software 10.0 (Linux)
NVIDIA DRIVE™ Software 9.0 (Linux)
other DRIVE OS version
other
Target Operating System
Linux
QNX
other
Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)
NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)
other
SDK Manager Version
1.8.1.10392
other
Host Machine Version
native Ubuntu 18.04
other
Hello, I am trying to resize an NvMedia image using the NVIDIA DriveWorks API: Image Transformation.
But the image that dwImageTransformation_copyFullImage
outputs is all green :
The input image looks like this :
Here is how I resize the image :
#include "tools/ImageTransformer.h"
ImageTransformer::ImageTransformer(DriveworksApiWrapper* driveworksApiWrapper, int outputWidth, int outputHeight,
dwImageProperties inputImgProperties)
: driveworksApiWrapper_(driveworksApiWrapper)
, outputWidth_(outputWidth)
, outputHeight_(outputHeight)
, imgProperties_(inputImgProperties)
{
imgProperties_.width = outputWidth_;
imgProperties_.height = outputHeight_;
params_.ignoreAspectRatio = false;
dwImageTransformation_initialize(&ImageTransformationEngine_, params_, driveworksApiWrapper_->context_handle_);
dwImageTransformation_setBorderMode(DW_IMAGEPROCESSING_BORDER_MODE_ZERO, ImageTransformationEngine_);
dwImageTransformation_setInterpolationMode(DW_IMAGEPROCESSING_INTERPOLATION_LINEAR, ImageTransformationEngine_);
}
ImageTransformer::~ImageTransformer()
{
dwImageTransformation_release(ImageTransformationEngine_);
}
void ImageTransformer::transform_image(dwImageHandle_t* input, dwImageHandle_t* output)
{
CHK_DW(dwImageTransformation_copyFullImage(*output, *input, ImageTransformationEngine_));
}
const dwImageProperties& ImageTransformer::getImgProperties() const
{
return imgProperties_;
}
The image comes directly from the camera, like so :
CHK_DW(dwSensorCamera_getImage(&imageHandleOutOfCamera_, DW_CAMERA_OUTPUT_NATIVE_PROCESSED, cameraFrameHandle_));
dwImageHandle_t imageHandleTransformed_;
CHK_DW(dwImage_create(&imageHandleTransformed_, imageTransformer_->getImgProperties(),
driveworksApiWrapper_->context_handle_));
imageTransformer_->transform_image(&imageHandleOutOfCamera_, &imageHandleTransformed_);
Any idea what could cause the issue ?
Thanks !