Ask Your Question
3

How to decrease flickering effect of bounding box in object detection by cascade classifier

asked 2017-12-11 02:44:30 -0600

Shivanshu gravatar image

updated 2020-11-14 05:46:05 -0600

I am using opencv 3.0.0 on a windows machine with visual studio 2012.. i have written a code regarding face detection using HAAR cascade classifier.The problem i am facing is that,in real-time face detect,bounding box is flickering around face,it is not holding accurate and static(stable) position around face,at each frame coordinates of bounding box is changing by approx(3-5 px).The box isn't stable about face .can someone help on this?

edit retag flag offensive close merge delete

Comments

yes, known problem. what is your "use-case" ?

berak gravatar imageberak ( 2017-12-11 03:01:40 -0600 )edit
1

you can try this

sturkmen gravatar imagesturkmen ( 2017-12-11 04:12:35 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
3

answered 2017-12-11 06:07:59 -0600

This issue is known for any object detection algorithm out there. Although not always visible for the human eye, between two consecutive frames there is the possibility of illumination differences, pixel shifting, noise, ... which can slightly change where the face is finally found and located.

Only way to solve this problem is by implementing some temporal smoothing, where you average out the face location over time (a number of frames). This can be done by adding a tracker for example and putting the weight of the new detection in relation to the shift of the frame compared to the previous one.

edit flag offensive delete link more

Comments

mr.Puttman .thank you for answering my question but will you elaborate on sentence "This can be done by adding a tracker for example and putting the weight of the new detection in relation to the shift of the frame compared to the previous one" .yes! actually u are right i image has lot of noise.i am using my laptop webcam. its about 1.2~1MP camera

Shivanshu gravatar imageShivanshu ( 2017-12-11 10:12:38 -0600 )edit

I cant find usefull introduction to temporal smoothening its new to me??!!any link?

Shivanshu gravatar imageShivanshu ( 2017-12-12 10:45:17 -0600 )edit
1

also take a look at detection based tracker

sturkmen gravatar imagesturkmen ( 2017-12-15 01:50:01 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-12-11 02:44:30 -0600

Seen: 4,114 times

Last updated: Dec 11 '17