Hi All,
I have an image, but only a part of it is really interesting to me. So let's say that I would like to apply some transform on a region with widthXheight (e.g. 64x64), and this region is located at coordinates 100x100.
The stride value for mostof the functions help if the region's line starts at 0. I think that for this purpose I need to copy the region to a separate image. But do you know a function in fastcv that can copy some specific ROI?
Thank you,
Lubos
Hi,
With stride parameter it's easy to specify ROI in an image. You set source pointer (usually src by convention) to the top left corner of ROI, and srcWidth and srcHeight to be the width and height of the desired ROI. Then you specify stride of the original image so that memory access is correctly handled by the API.
Hope this is clear.
Cheers,
-Jeff
Thank you Jef,
indeed that's the right thing. I don't know why but i was computing new stride for ROI which is wrong. Thank you for the help.
Anyway, for different purpouse, is there a function for copying part of the image somewhere else? To me this is like a basic functionality.
The system function memcpy is already optimized for speed performance. There is no need to duplicate the function in FastCV.
Cheers,
-Jeff
I think memcpy with stride would do the job, but it doesn't support stride as far as I know.
One can always use a loop for that but ...
Lubos