VisionWorks OpenVX vx_array access problem.

Hi , i can not access vx_array it returns pointer. How can i turn vx_array to cv::Mat or other array type that i can use it.

vxuOpticalFlowPyrLK(context,(vx_pyramid)vxGetReferenceFromDelay(pyr_delay, -1), (vx_pyramid)vxGetReferenceFromDelay(pyr_delay, 0),
            (vx_array)vxGetReferenceFromDelay(pts_delay, -1), (vx_array)vxGetReferenceFromDelay(pts_delay, -1),
            vxflow, VX_TERM_CRITERIA_BOTH,s_lk_epsilon_, s_lk_num_iters_, initial_estimate, window_dimension);

In this sample vxflow is vx_array and i want to make mathematical operations with this array. But for example i want to print array in normal “cout” or “printf” it returns address (like 0x101b4cb0).

Hi,

Here is sample to access vx_array value for your reference:
https://devtalk.nvidia.com/default/topic/1032913/jetson-tk1/vx_array-access-feature_tracker-demo/post/5396508/#5396508

Thanks.

Hi, Thanks for your answer.

Hi,

Could you help to check the value of numItems.

Segmentation fault is usually cased by the accessing of invalid memory.
Please help to check if the numItems return a value larger than zero first.

Thanks.