I have tried to access a vx_image object created by vxCreateImage using vxMapImagePatch, and found that the device memory allocated for it is not continuous.
For example, in main function, I create
vx_image image = vxCreateImage( context, width, height, VX_DF_IMAGE_U8 );
To access it in an OpenVX node, I do the map
vx_rectange_t rect; vx_map_id id; vx_imagepatch_addressding_t addr; vx_uint8 *ptr; vxGetValidRegionImage( image, &rect ); vxMapImagePatch( image, &rect, 0, &id, &addr, (void**)&ptr, VX_READ_ONLY, NVX_MEMORY_TYPE_CUDA, VX_NOGAP_X );
The problem is the parameter addr.stride_y (The physical byte distance between the two first elements of two consecutive rows) is greater than sizeof( vx_uint8 ) * width, which means a row in the image is not stored immediately following its precedent one on physical memory.
Why does this happen? And how could I create a continuous vx_image object, please?
Thank in advance