Hi,
I am a newbie to FastCV. I am using fcvFilterGaussian11x11u8 but got NULL output.
Here is a part of my code.
BYTE * I_Bytes = matToBytes(I_ori); //I_bytes is a byte arrayuint8_t * pI_ori = (uint8_t *)I_Bytes;uint8_t * tempdst = NULL;fcvFilterGaussian11x11u8(pI_ori, src.width, src.height, tempdst, 0);
I_ori is the mat of the initial image read by opencv function, imread()
I transformed I_ori into a byte array I_Bytes with a function called matToBytes
I checked every input, the src is not NULL, the srcWidth and srcHeight are both multiple of 8, and the blurBorder is set to be 0, but the output turned out to be NULL.
Is there anything that I am missing in this function?
Thank you in advance!
Sharon
Hi Sharon,
in your code, you need to allocate memory to your destination as follow:
uint8_t * tempdst = (uint8_t*) fcvMemAlloc(src.width * src.height * sizeof(uint8_t), 16);
I assume that src.width and src.height are defined beforehand in your code.
As well don't forget to deallocate this memory using fcvMemFree().
Ariel
Hi Ariel,
Thank you for replying!
It works fine now.
I didn't notice that I have to allocate the memory.
Thank you so much!
Sharon
Hi
You mentioned that you read the initial image I_ori by opencv function, imread().
Which SDK or IDE are you using? I do not think opencv functions are supported on qualcomm platform.
BR
Tao