Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

faster blur

Hi,

I am writing software for real time tracking of cells flowing in a microfluidic channel. My tracking software (apparently) works fine at about 30fps but I am trying to accelerate it so I can flow the cells faster.

I ran the visual studio profiler and found that these are my main bottlenecks:

Frame[jj] = Frame[jj] - ImageBG;  //background subtraction: 7% of execution time
blur(Frame[jj], Blurred, Size(3, 3));// remove speckle noise from image: 35% of execution time
compare(Blurred, Scalar(THRESHOLD), ImageBin, CMP_GT);// 8% of execution time
findContours(ImageBin, contours, hierarchy, CV_RETR_EXTERNAL, CV_CHAIN_APPROX_SIMPLE);//8.5% of execution time

By comparison image acquisition is only ~2% of the execution time.

The image coming from the camera is 500x1120;CV_16UC1 (which is why I use compare rather than threshold).

I would be interested in any ideas on how to make these routines (in particular blur) run faster. I do not have a GPU available on this system.

I am using Visual C++ 2013 + OpenCV2.4.10

guy