Hi
i can’t explain why i read this message into the console every time a process my graph:
[LOG] Failed to allocate image at node[0] user.kernel.dsi_to_world_wc parameter[0]
I think this is a standard message of OpenVX system, but where i can find more info about
the origin of this message?
The node is constructed in this way:
vx_kernel kernel = vxAddKernel(context, const_cast<vx_char*>("user.kernel.dsi_to_world_wc"), USER_KERNEL_DSI_TO_WORLD_WC,
DSItoWorldWC_kernel,
DISPLAY_DSI_TO_WORLD_WC_KERNEL_NUM_PARAMETERS, // numParams
DSItoWorldWC_input_validate,
DSItoWorldWC_output_validate,
NULL, // init
NULL // deinit
);
The kernel function is implemented as follow:
vx_status DSItoWorldWC_kernel(vx_node node, const vx_reference *parameters, vx_uint32 num)
{
//#############################################################
//# --> Kernel processing code here
//#
vx_context context = vxGetContext((vx_reference)node);
//check number of parameters
if (num != DISPLAY_DSI_TO_WORLD_WC_KERNEL_NUM_PARAMETERS)
{
std::cout << "DSItoWorldWC_kernel(): invalid num of params! Expected " << (vx_int32)DISPLAY_DSI_TO_WORLD_WC_KERNEL_NUM_PARAMETERS << " params but node recieves " << num << std::endl;
return VX_FAILURE;
}
//set input/output parameters
vx_image src_image = (vx_image)parameters[0]; //DSI image
... other kernel parameters..
vx_status src_image_status = vxGetStatus((vx_reference)src_image);
if(src_image_status != VX_SUCCESS){
std::cout<<"Problem with DSI image! Image status: " << src_image_status <<std::endl;
return VX_FAILURE;
}
Into the graph i connected the node in this way:
//
// NOTE the input image is a field declared as "vx_image vx_dsi_image;" of a structure
vx_array RearR_rows_x = vxCreateArray(context_, VX_TYPE_FLOAT32, RearR_img_width_*RearR_img_height_ );
CHECK_VX_OBJECT(RearR_rows_x);
vx_array RearR_cols_y = vxCreateArray(context_, VX_TYPE_FLOAT32, RearR_img_width_*RearR_img_height_ );
CHECK_VX_OBJECT(RearR_cols_y);
vx_array RearR_height_z = vxCreateArray(context_, VX_TYPE_FLOAT32, RearR_img_width_*RearR_img_height_ );
CHECK_VX_OBJECT(RearR_height_z);
RearR_dsi_to_world_node_ = DSItoWorldWCNode(main_graph_, stereo_systems[sp::Rear].vx_dsi_image, ... other parameters);
CHECK_VX_OBJECT(RearR_dsi_to_world_node_);
The dsi image is loaded into memory before to process the graph.