Error running VisionWorks video_stabilizer demo

Hello ,

I’m fairly new to the VisionWorks and I’m trying to get the video_stabilizer demo working on a Ubuntu 18 host machine, which has VisionWorks 1.6 and cuda 10.2 installed. The compilation step works fine, but when I try to run the demo with default input, I get the following error:

[NVX LOG] vxuColorConvert: Internal CUDA error
Error: vxuColorConvert(context_, frame, gray) failure [status = -1002] in file stabilizer.cpp line 188

The error message is not particularly informative, and I have attempted to google it without much success. Any advice on how to resolve this would be appreciated.

Thanks,
Oliver

PS. I have also posted my question here

but felt this place was more appropriate, so reposting it here now

Hi again,

I have now created a ‘minimal version’ of my program to better illustrate the problem I’ve run into, see below. Basically, all the code does is load a color image and attempt to convert it to a gray scale image. When I run the code on my computer, I get the status -1002, indicating that the conversion has failed although I don’t understand exactly how it has failed and why.

It is unclear if there is a problem with my code, or with my software/hardware environment. As mentioned in my original post, I am running VisionWorks 1.6 and CUDA 10.2 on an Ubuntu 18.04 desktop machine.

Thanks,
Oliver

#include <iostream>
#include <sstream>
#include <iomanip>
#include <string>
#include <memory>
#include <NVX/nvx.h>
#include <OVX/UtilityOVX.hpp>
#include <OVX/FrameSourceOVX.hpp>
#include <NVX/Application.hpp>
#include <OVX/RenderOVX.hpp>

int main(int argc, char* argv[])
{
    std::string imgFilePath = "../data/baboon.jpg";

    nvxio::Application &app = nvxio::Application::get();
    app.init(argc, argv);

    vx_context context = vxCreateContext();
    vx_image frame = ovxio::loadImageFromFile(context, imgFilePath, VX_DF_IMAGE_RGBX);

    vx_df_image format = VX_DF_IMAGE_VIRT;
    vx_uint32 width = 0;
    vx_uint32 height = 0;

    vxQueryImage(frame, VX_IMAGE_ATTRIBUTE_FORMAT, &format, sizeof(format));
    vxQueryImage(frame, VX_IMAGE_ATTRIBUTE_WIDTH, &width, sizeof(width));
    vxQueryImage(frame, VX_IMAGE_ATTRIBUTE_HEIGHT, &height, sizeof(height));

    vx_image gray = vxCreateImage(context, width, height, VX_DF_IMAGE_U8);
    vx_status status = vxuColorConvert(context, frame, gray);

    std::cout << status << std::endl;

    vxReleaseImage(&frame);
    vxReleaseContext(&context);
}