[Beginner Question] How do I crop "nvxcu_pitch_linear_image_t" object?

Hello,

I have one “nvxcu_pitch_linear_image_t” object and I want to create another “nvxcu_pitch_linear_image_t” object which is the cropped version of the first.

nvxcu_pitch_linear_image_t frame = createImage(sourceParams.frameWidth, sourceParams.frameHeight, sourceParams.format);

nvxcu_pitch_linear_image_t croppedFrame = createImage(225, 20, NVXCU_DF_IMAGE_U8);

nvxcuio::FrameSource::FrameStatus status = source->fetch(eventData.frame);

// Here I want to crop "frame" to "croppedFrame" object

How can I do that? I am very beginner as you see.

Thanks

Hi,

Sorry for the late reply.

Do you find something like vxCreateImageFromROI()?
This VisionWorks tutorial can give you some hint on ROI function(p.36):