Reputation: 580
I am working on opencv gesture identification and have hit a small snitch. Suppose i am showing the number 3..the webcam identifies 3. What i have done is print the number 3 or write the text 3 on the image. However..due to minute variations..the output changes in small intervals of time..hence fluctuations arise.showing 2 for 0.1 second..and 3 for the next 1 second. I need some help to find a way to display..say the average number for a certain period of time(average rounded off to the nearest integer) Thanks in advance for any help!
Upvotes: 0
Views: 44
Reputation: 82
how about some kind of lowpass filter. A concrete implementation of that would be a weighted average. (This is the direct answer to your question) But regarding that the fluctuations are unwanted artifacts I would recommend to set a hard treshold regarding the minimum time interval a number has to be found over serveral images. e.g. you want to detect a three, but the two will appear serveral times for lets say less than a second -> you only want to update the displayed number if the new number was detected for more than 1 second.
Upvotes: 2