Forums - FastCV BGCodeBook vs OPENCV BGCodeBook

4 posts / 0 new
Last post
FastCV BGCodeBook vs OPENCV BGCodeBook
Arunakp
Join Date: 30 Mar 13
Posts: 2
Posted: Mon, 2013-04-15 07:03

Hi,

I am trying to use fastcv fcvCreateBGCodeBookModel and related APIs for foreground detection. The qulaity of foreground detected in my implementation using the FastCV implementation is bad compared to OPenCV 2.0 implementation. The openCV 2.0  implementation is same as https://code.ros.org/trac/opencv/browser/trunk/opencv/samples/c/bgfg_cod....

The FastCV implementation for codebook does not provide a way to set the color thresholds as below

/*Color Thresholds*/
   bg_model->modMin[0] = 5;
   bg_model->modMin[1] = bg_model->modMin[2] = 5;
   bg_model->modMax[0] = 10;
   bg_model->modMax[1] = bg_model->modMax[2] = 10;

   bg_model->cbBounds[0] = bg_model->cbBounds[1] = bg_model->cbBounds[2] = 10;

*/

When I run the code snippet at the link below , after replacing OpenCV 2.0 calls with FastCV  calls,  the quality of foreground detection goes bad after the first 10 frames(post training). 15 frames are used for training, while stale threshold was 7.

https://code.ros.org/trac/opencv/browser/trunk/opencv/samples/c/bgfg_cod...

I have tried this implementation on Nexus4(Snapdragon s4), Xperiapro\(Snapdragon s2) and NexusPrime devices

 

Thanks in Advance

  • Up0
  • Down0
lei
Join Date: 16 Apr 13
Posts: 2
Posted: Tue, 2013-04-16 19:17

Hi,

Is the performance issue caused by the different bg_model configuration in OpenCV and FastCV?

Thanks,

Lei

  • Up0
  • Down0
Arunakp
Join Date: 30 Mar 13
Posts: 2
Posted: Wed, 2013-04-17 04:46

Lei,

I am not aware of a possible way to configure bg_model in FastCV. If you are aware of one, please let me know.

API in FastCV

 

FASTCV_API fcvBGCodeWord ** fcvCreateBGCodeBookModel (uint32_t srcWidth, uint32_t srcHeight, void **__restrict cbmodel)

 API in OPENCV 2.0

CvBGCodeBookModel *cbmodel= cvCreateBGCodeBookModel();

 

Thanks,

Arun

  • Up0
  • Down0
lei
Join Date: 16 Apr 13
Posts: 2
Posted: Wed, 2013-04-17 18:27

Hi Arun,

I'm so sorry that currently there is no API to customize the configuration.

Do you really need to change to model setting for your case, otherwise it will lead to the foreground detection issue that you mentioned?

Thanks,

Lei

  • 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.