你所描述是matched filter和所有你需要的是一個cross-correlation功能應該是任何合理的DSP庫的一部分。根據您選擇的處理器體系結構和語言,您甚至可以找到可以更高效地執行此操作的矢量化庫。
如果你真的不關心性能,你可以使用Python ...
$ python
Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import scipy
>>> interesting_clip = [ 5, 7, 2, 1]
>>> full_stream = [ 1, 5, 7, 2, 1, 4, 3, 2, 4, 7, 1, 2, 2, 5, 1]
>>> correlation = scipy.correlate (full_stream, interesting_clip)
>>> print correlation
[56 79 55 28 41 49 44 53 73 48 28 35]
>>> for offset, value in enumerate(correlation) :
... if (value > 60) :
... print "match at position", offset, "with value of", value
...
match at position 1 with value of 79
match at position 8 with value of 73
我上面的閾值是任意的。您應該通過實驗確定適合您的內容。
請記住,「有趣的剪輯」越長,計算相關所需的時間就越長。雖然較長的片段可以幫助實際比賽更好地從非比賽中脫穎而出,但您可能不會超過幾秒鐘。
音頻剪輯是否包含語音,聲音,音樂,所有這些? – mdma 2010-05-15 02:28:02
您是否有特定的語言或處理器架構? – 2010-05-15 04:55:32
順便說一句,我創建了自己的實現,經過2年的發展,它可用於商業exploatation :) http://www.videophill.com/index.php?page=playkontrol – 2012-04-03 19:05:23