Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Object detection using background Subtraction

Okay I have ezperimented with lot of haar cascades, HOG and all but none of them was very efficient to meet my purpose. I am working on a video processing project which include tracking of humans (mainly). I have a static background in hand (always). So I thought detecting the foreground objects would be very easy. I used subtracting method like this :

cv::Mat temp;
cv::subtract(camFrame,backImage,temp);
cv::threshold(temp,temp,25,255,cv::THRESH_BINARY);

But this doesnt seem to work well in getting only the foreground objects. Is there anything I am missing in this process??. Everybody said its very easy if theres a static background. I am very new to image processing in opencv. I will be glad if somebody can help me out and appreciate some code as well

Object detection using background Subtraction

Okay I have ezperimented with lot of haar cascades, HOG and all but none of them was very efficient to meet my purpose. I am working on a video processing project which include tracking of humans (mainly). I have a static background in hand (always). So I thought detecting the foreground objects would be very easy. I used subtracting method like this :

cv::Mat temp;
cv::subtract(camFrame,backImage,temp);
cv::threshold(temp,temp,25,255,cv::THRESH_BINARY);

But this doesnt seem to work well in getting only the foreground objects. objects.I thk the varying lighting effects is also given as foreground from this. Is there anything I am missing in this process??. Everybody said its very easy if theres a static background. I am very new to image processing in opencv. I will be glad if somebody can help me out and appreciate some code as well