ingenuitas/SimpleCV — pull request #345 by rajatkapoor (2013-03-27 23:57:56+00:00)
Title: runningAverage functionality added

This method finds the running average of a linescan.Only the name of the algorithm has to be provided(either 'uniform' or 'gaussian') and the corresponding kernel is generated and convolved with the image.

Syntax:

linescan.runningAverage(diameter=3,algo="uniform")

Example:

import matplotlib.pyplot as plt
ls = img.getLineScan(x=10)
ra = ls.runningAverage()
rag = ls.runningAverage(15,algo="gaussian")
plt.plot(ls)
plt.plot(ra)
plt.plot(rag)
plt.show()