1515import cv
1616import numpy
1717from PIL import Image , ImageDraw
18- from scipy import mat , linalg
18+ # from scipy import mat, linalg
1919from math import sqrt , sin , cos , radians
2020
2121def generateVideoClip (videoDir = "./video/" ):
@@ -228,6 +228,9 @@ def calculateBlobPCA(array):
228228 Given the 2D numpy array perform Principle Component Analysis
229229 on the pixels to find the center of gravity as well as the principle
230230 direction vectors to represent strongest rotation direction.
231+ NOTE: this method requires the scipy library but more to make for
232+ easier install requirements this mehtod is disabled and always returns
233+ None for now.
231234 """
232235 S = numpy .sum (array )
233236
@@ -252,9 +255,11 @@ def calculateBlobPCA(array):
252255 oj *= (1.0 / S )
253256 oij *= (1.0 / S )
254257
255- C = mat ([[oi ,oij ],[oij ,oj ]]) #covarience matrix
256- la ,v = linalg .eig (C ) #eigen vectors/values
257- return (ui ,uj ), (v [:,0 ]* sqrt (la [0 ]), v [:,1 ]* sqrt (la [1 ]))
258+ #TODO: requires scipy dependency
259+ #C = mat([[oi,oij],[oij,oj]]) #covarience matrix
260+ #la,v = linalg.eig(C) #eigen vectors/values
261+ #return (ui,uj), (v[:,0]*sqrt(la[0]), v[:,1]*sqrt(la[1]))
262+ return None #return None until scipy required
258263
259264def createMeanImage (image , radius = 1 ):
260265 """
0 commit comments