vxWarpPerspectiveNode does not generate output

Hi,

I am tryin to transform a 1280x720 image to 400x900 i.e, create a Bird’s Eye view image using vxWarpPerspectiveNode. But some reason i am getting blank output, i have checked both the input image and homography matrix they are correct but still i get wrong output. below is the code snippet which i have been trying. any pointers will be of great help.

/*
m_vxHomographyMat = {

-0.394614 , -1.21505 , 465.901
-6.22146e-16, -5.98319 , 1427.24
-6.7288e-19,  -0.00576408 1

}
*/

Mat ImageTransform::ConvertImagetoWorld(Mat &_inputImage)
{
    Mat returnImg = Mat::zeros(900,400,CV_8UC1) ;
    Mat temp;
    cvtColor(_inputImage,temp,CV_BGR2GRAY);
    imshow("_inputImage Image", _inputImage);
    //_inputImage.copyTo(m_camImg);

    m_nvxTransforMationGraph = vxCreateGraph(context_);
    NVXIO_CHECK_REFERENCE(m_nvxTransforMationGraph);

	
    vx_image vx_src = nvx_cv::createVXImageFromCVMat(context_, temp);
    vx_image vx_dst = nvx_cv::createVXImageFromCVMat(context_, returnImg);
    
    
    
    //warpPerspective(_inputImage, returnImg, m_homography, m_worldImageSz,CV_INTER_LINEAR);
    vx_node warpNode = vxWarpPerspectiveNode(m_nvxTransforMationGraph,vx_src,m_vxHomographyMat,VX_INTERPOLATION_TYPE_BILINEAR,vx_dst);
    NVXIO_CHECK_REFERENCE(m_nvxTransforMationGraph);
    
    const char* option = "-O3";
                    NVXIO_SAFE_CALL( vxSetGraphAttribute(m_nvxTransforMationGraph, NVX_GRAPH_VERIFY_OPTIONS, option, strlen(option)) );
     
//verifying graph               
     vx_status verify_status = vxVerifyGraph(m_nvxTransforMationGraph);

//calling processing graph
     NVXIO_SAFE_CALL( vxProcessGraph(m_nvxTransforMationGraph) );
     
    //returnImg.copyTo(m_worldImg);
    std::unique_ptr<ovxio::Render> renderer;
    renderer = (ovxio::createDefaultRender(
                    context_, "Homography demo ", _inputImage.cols, _inputImage.rows));
  
    renderer->putImage(vx_dst);
    renderer->flush();

    vx_float32 matV[3][3];
    vx_float32 *data = (vx_float32*)matV;
    vxCopyMatrix(m_vxHomographyMat, matV, VX_READ_ONLY, VX_MEMORY_TYPE_HOST);
    for (int i = 0; i <9; i++)
    {
        std::cout << "H Matrix Data : " << *(data+i) << std::endl;
    }

    vxReleaseImage(&vx_src);
    vxReleaseImage(&vx_dst);
    cout<<returnImg.cols<<"<<<<__________"<<endl;
    imshow("Return Image", returnImg);
    waitKey();
    renderer->close();
    return returnImg;
}

Hi,

Could you check the functionality of vx_image and render first?
Try to display the source image directly:

renderer->putImage(<b>vx_src</b>);

Thanks.

Hi,

it displays the input image.

Thanks

Hi,

Could you set m_vxHomographyMat to identity and give it a try?
Thanks.