Hi,
I have an input having width=1440, height=1080 and input is in Gray.
I am using some fastcv API' to process above input images. i,e fcvMultiplyScalars16, fcvElementMultiplyu8u16, fcvAddWeightedu8 and fcvBoxFilter3x3u8.
There is no clear details on how to calculate stride and width for each of above API.
input source Stride=0, output stride = 0
fcvMultiplyScalars16(int16src,srcWidth*3, srcHeight,srcStride,1,0,bitBufferdata, dstStride);
Here we are giving srcWidth as srcwidth*3 i.e 1440*3 and srcStride=0, dstStride=0
fcvElementMultiplyu8u16(bitBuffercpy, srcWidth*3, srcHeight, srcStride, bitBuffercpy, srcStride, squareBufferdata,dstStride);
Here also input width is srcWidth*3(1440*3), inputsource and output stride is 0
fcvMultiplyScalars16, fcvElementMultiplyu8u16 are working if i give width and stride as above.
But fcvAddWeightedu8 and fcvBoxFilter3x3u8 are not working if i give width and stride like above.
fcvAddWeightedu8(input1, srcWidth*3, srcHeight, srcStride,input2,srcStride,(1.0-0.8),0.8,output,dstStride );
fcvBoxFilter3x3u8(input,srcWidth, srcHeight,ImgSrcStride,lascaCountsdata,ImgdstStride);
I have also tried by giving just width as srcWidth and InputsrcStride=width, outputstride=width
fcvBoxFilter3x3u8(input,srcWidth, srcHeight,ImgSrcStride,lascaCountsdata,ImgdstStride);
Does this width, stride calculations changes for every fastcv API?
Does this widht, stride calculation depends on input and output data format i.e uint8_t*, uint16_t*?
Could you help me out giving proper width and stride to fastcv API's
Thanks and Regards
Rajesh Chanda
Hi,
The concept of stride is to allow padding of image to meet alignment requirements if necessary. It's measured in bytes in general. So yes it matters if input is uint8_t or uint16_t format. If there's no padding stride is same as width for 8-bit grayscale image. For uint16_t stride is 2xwidth, for example.
Cheers,
-Jeff