Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

IppFGHistogramModel

douglaswinfield
Beginner
1,052 Views
I'm still having issues with IppFGHistogramModel....

The code below seems to "basically" work in extracting moving objects. However, I'm not using **ppState as the manual indicates -- so I get a compiler warning "unreferenced local variable". I've been also changing some of the parameters such as pModel.updBGRef and the results don't seem to change. As I posted earlier (and got no repliesSad smiley [:(] ), the background image in after calling ippiForegroundHistogramUpdate several times is nothing.

I'm sure I'm doing something wrong. Any ideas? Any sample code? Am I the only one trying to use this function?

THANKS smiley [:-)]

//////////////////////////////////////////////////////////////////////////////////
IppFGHistogramModel pModel;
IppFGHistogramState_8u_C1R *pState;
IppFGHistogramState_8u_C1R **ppState;

status = ippiForegroundHistogramInitAlloc_8u_C1R(imgIPP, width, ROI, &pModel, &pState);
statusString = ippGetStatusString( status );
status = ippiForegroundHistogram_8u_C1R(imgIPP, width, foreground, width, ROI, pState);
statusString = ippGetStatusString( status );

status = ippiForegroundHistogramUpdate_8u_C1R(imgIPP, width, foreground, width, background, width, ROI, pState);
statusString = ippGetStatusString( status );
//
//Get another image --> imgIPP2
//
status = ippiForegroundHistogram_8u_C1R(imgIPP2, width, foreground, width, ROI, pState);
statusString = ippGetStatusString( status );
status = ippiForegroundHistogramUpdate_8u_C1R(imgIPP2, width, foreground, width, background, width, ROI, pState);
statusString = ippGetStatusString( status );
/////////////////////////////////////////////////////////////////////
0 Kudos
4 Replies
dvj1
Beginner
1,052 Views
I'm doing something similar and I am having just as much difficulty. The parameters don't seem to influence the results properly, and the model doesn't seem to update correctly.
0 Kudos
douglaswinfield
Beginner
1,052 Views
Hi,
I know what you mean. I'm wondering if any of the developers have run an example?
0 Kudos
Alexander_T_Intel
1,052 Views

Hi.

There is a sample code in attach. It uses IPP (BGFG functions) and OpenCV (input, output).

Alexander

0 Kudos
douglaswinfield
Beginner
1,052 Views
Alexander,
Thanks for the example - it's works well.
I've used the OpenCV version of bgfg detection but found it to be slow. This runs much faster.
Cheers :)
0 Kudos
Reply