Forums - Using fcvFilterGaussian11x11u8 but got NULL output

4 posts / 0 new
Last post
Using fcvFilterGaussian11x11u8 but got NULL output
dancingflamedesert
Join Date: 14 Apr 15
Posts: 3
Posted: Sun, 2015-08-16 19:45
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 array
uint8_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
  • Up0
  • Down0
ariel.benitah
Join Date: 14 Apr 15
Posts: 5
Posted: Mon, 2015-08-17 00:24

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

 

  • Up0
  • Down0
dancingflamedesert
Join Date: 14 Apr 15
Posts: 3
Posted: Mon, 2015-08-17 03:06

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

  • Up0
  • Down0
gutao
Join Date: 6 Jun 17
Posts: 9
Posted: Sun, 2017-06-18 22:51

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

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.